Skip to content

Commit

Permalink
Merge pull request #115 from planetarium/fix-nonce
Browse files Browse the repository at this point in the history
fix: fetch next nonce correctly
  • Loading branch information
moreal authored Jul 26, 2024
2 parents 628d5fa + 50cda3d commit f98ac54
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion background/src/wallet/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ export default class Wallet {
"createSequentialWallet",
"createPrivateKeyWallet",
"sendNCG",
"nextNonce",
"getPrivateKey",
"sign",
"signTx",
Expand Down
3 changes: 0 additions & 3 deletions popup/src/api/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@ export default {
) => {
return await callWallet("sendNCG", [sender, receiver, amount, nonce]);
},
nextNonce: async (address: string) => {
return await callWallet<number>("nextNonce", [address]);
},
getPrivateKey: async (address: string, passphrase: string) => {
return await callWallet<string>("getPrivateKey", [address, passphrase]);
},
Expand Down
2 changes: 1 addition & 1 deletion popup/src/views/Send.vue
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export default defineComponent({
throw new Error("'account' state seems not loaded yet.");
}
if (await (this.$refs["sendForm"] as VForm).validate()) {
this.nonce = await bg.wallet.nextNonce(this.account.address);
this.nonce = await bg.graphql("getNextTxNonce", this.account.address);
this.confirmDialog = true;
}
},
Expand Down

0 comments on commit f98ac54

Please sign in to comment.