Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to override signer when original sender address is not in wallet #69

Closed
petitnau opened this issue Jun 21, 2022 · 3 comments
Closed

Comments

@petitnau
Copy link

petitnau commented Jun 21, 2022

It seems that if I want to sign a transaction using the overrideSigner option of the signTransaction method, I need to have the original address that is present in the from/sender field as an account in MyAlgoWallet.

Here is an example to reproduce the error. ACC1 is an account not present in MyAlgoWallet, while ACC2 is an account that is present.

const ACC1 = "..."
const ACC2 = "..."

const node = 'https://node.testnet.algoexplorerapi.io';

const myAlgoConnect = new MyAlgoConnect({ disableLedgerNano: false,  });
myAlgoConnect.connect();

const algodClient = new algosdk.Algodv2('', node, '');

const params = await algodClient.getTransactionParams().do();
const txn = algosdk.makePaymentTxnWithSuggestedParamsFromObject({
  suggestedParams: { ...params },
  from: ACC1,
  to: ACC1,
  amount: 10,
});

const signedTxn = await myAlgoConnect.signTransaction(txn.toByte(), { overrideSigner  : ACC2 });
Error: Account does not exist in the storage
    at MyAlgoConnect.signTransaction (main.js:356:1)

If instead both ACC1 and ACC2 are added onto the wallet, then everything works fine.

@petitnau petitnau changed the title Overriding signer when original from address is not in wallet Unable to override signer when original sender address is not in wallet Jun 21, 2022
@M-Picco
Copy link
Contributor

M-Picco commented Jun 27, 2022

Hey @petitnau! Thank you for reporting this issue. We'll be taking a look into this.

@gidonkatten
Copy link

would be great if this could be fixed

@M-Picco
Copy link
Contributor

M-Picco commented Nov 16, 2022

I'm closing this since a fix has been deployed with the last release

@M-Picco M-Picco closed this as completed Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants