async function signAndSendTransaction(keylessInstance, transactionData) {
  const userPassword = document.getElementById('sign-tranx-user-password')
    .value;
  const tranxDetails = Object.assign({}, transactionData, {
    password: userPassword
  });

  const tranxResponse = await keylessInstance.signAndSendTx(tranxDetails);

  hideLoader();
  if (tranxResponse.error) {
    document.getElementById('error-message').innerHTML = tranxResponse.error;
    document.getElementById('error-message').style.display = 'block';
    return { status: false };
  } else if (tranxResponse.response) {
    document.getElementById('error-message').style.display = 'none';

    return { status: true, hash: tranxResponse.response.transactionHash };
  }
}
// Sign & Send Transaction helper method.
Sign & Send Transaction helper method.
Sign & Send Transaction helper method .
async function signAndSendTransaction(keylessInstance, transactionData) {
  const userPassword = document.getElementById('sign-tranx-user-password')
    .value;
  const tranxDetails = Object.assign({}, transactionData, {
    password: userPassword
  });
  const tranxResponse = await keylessInstance.signAndSendTx(tranxDetails);
  hideLoader();
  if (tranxResponse.error) {
    document.getElementById('error-message').innerHTML = tranxResponse.error;
    document.getElementById('error-message').style.display = 'block';
    return { status: false };
  } else if (tranxResponse.response) {
    document.getElementById('error-message').style.display = 'none';
    return { status: true, hash: tranxResponse.response.transactionHash };
  }
}
async function signAndSendTransaction ( keylessInstance , transactionData ) { const userPassword = document . getElementById ( 'sign-tranx-user-password' ) . value ; const tranxDetails = Object . assign ( { } , transactionData , { password : userPassword } ) ; const tranxResponse = await keylessInstance . signAndSendTx ( tranxDetails ) ; hideLoader ( ) ; if ( tranxResponse . error ) { document . getElementById ( 'error-message' ) . innerHTML = tranxResponse . error ; document . getElementById ( 'error-message' ) . style . display = 'block' ; return { status : false } ; } else if ( tranxResponse . response ) { document . getElementById ( 'error-message' ) . style . display = 'none' ; return { status : true , hash : tranxResponse . response . transactionHash } ; } }
Sign & Send Transaction helper method.
Sign & Send Transaction helper method .