0
openNCALayerChooseKeyDialog = (callback) => {
  this.callback = callback;
  const base64 = this.b64EncodeUnicode(callback);
  console.log('openNCALayerChooseKeyDialog');
  this.setMissedHeartbeatsLimitToMax();
  const object = {
       "module": "kz.gov.pki.knca.commonUtils",
       "method": "createCMSSignatureFromBase64",
       "args": ["PKCS12", "SIGNATURE", base64, false]
     };
  //getActiveTokens
  // getKeyInfo
  // signXml
  // createCMSSignatureFromFile
  // showFileChooser
  // createCMSSignatureFromBase64
     this.webSocket.send(JSON.stringify(object));
 };

ncalayer.openNCALayerChooseKeyDialog(({errorCode, result}) => {
        console.log('ncalayer');
            console.log(errorCode, result);
            if (errorCode !== undefined &&  result !== undefined) {
                console.log('errorCode');
                ncalayer.setStorePath(result);
                console.log(errorCode);
                if (ncalayer.password !== null) {
                    console.log('getXMLDocument');
                    this.getXMLDocument();
                } else {
                    console.log('showSetPasswordModal');
                    this.showSetPasswordModal();
                }
            }
        });

Hello. I can't undestand why my function do not return anything error to i just catch than i call ncalayer and check password and after i put on sign buttun on my ncalayer, i doesnt have any move next to this

Basszilla
  • 11
  • 5

1 Answers1

0

Update OpenNCALayerChooseKeyDialog to

openNCALayerChooseKeyDialog = (callback) => {
  this.callback = callback;
  const base64 = this.b64EncodeUnicode(callback);
  console.log('openNCALayerChooseKeyDialog');
  this.setMissedHeartbeatsLimitToMax();
  const object = {
       "module": "kz.gov.pki.knca.commonUtils",
       "method": "createCMSSignatureFromBase64",
       "args": ["PKCS12", "SIGNATURE", base64, false]
     };
 
     this.callback(this.webSocket.send(JSON.stringify(object)));
 };
Rahul Pal
  • 476
  • 3
  • 10