Skip to content

Commit

Permalink
refactor: use next nonce in maxAmount
Browse files Browse the repository at this point in the history
Nonce is only used to calculate fee, so it doesn't fix anything, but looks more accurate.
  • Loading branch information
davidyuk committed Mar 3, 2024
1 parent 75a8c46 commit b525f07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/composables/maxAmount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export function useMaxAmount({ formModel }: MaxAmountOptions) {
const aeSdk = await getAeSdk();
try {
nonce.value = (await aeSdk.api
.getAccountByPubkey(getAccount().address))?.nonce;
.getAccountNextNonce(getAccount().address)).nextNonce;
} catch (error: any) {
if (!error.message.includes('Account not found')) handleUnknownError(error);
}
Expand Down

0 comments on commit b525f07

Please sign in to comment.