0

The keys are revealed on the corresponding network, also, if I try to transfer the amount below the requirement (I designed in the smart contract), I can confirm the contract has been run through by the error message in the console log:

TezosOperationError {..., name: 'TezosOperationError', ..., message: 'the amount must be larger than 1 tezos'}

However if I try to transfer legitimate amount, "Public key cannot be exposed" will pop up.

The js function (May focus on ".send({ amount: stake_amount })"):

const bet = async (stake_amount,bool_bet) => {
try {
  const op = await ledgerInstance.methods.bet(bool_bet).send({ amount: stake_amount, mutez: false });
  await op.confirmation(30);
  if (op.includedInBlock !== Infinity) {
    const newBalance = await tezos.rpc.getBalance(userAddress);
    setBalance(newBalance);
    alert("Transaction is done!")
  } else {
    throw Error("Transation not included in block");
  }
} catch (error) {
  console.log(error);
}

}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.