-
Notifications
You must be signed in to change notification settings - Fork 350
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
Feat/live 15542 aptos send receive fix send funds simulation failed when amount to send is slightly above max spendable amount #8766
base: feat/integrate-aptos
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
const expectedGas = BigNumber(gasLimit * gasPrice); | ||
if (transaction.amount.plus(expectedGas).isGreaterThan(account.spendableBalance)) { | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to move this check to an early exit before line 54 const simulation = await aptosClient.simulateTransaction(publicKeyEd, tx);
?
It seems like it to me, and that would result in tidier code (not a fan of test inside default cases)
…eceive-fix-send-funds-simulation-failed-when-amount-to-send-is-slightly-above-max-spendable-amount
Desktop Bundle Checks
Mobile Bundle Checks
|
✅ Checklist
npx changeset
was attached.📝 Description
During simulation of transaction, if the tx amount is lower then account balance, but we don't have enough founds to cover fees, then we get the "Abort" error from the network.
To avoid additional message during this errors the amount check is added for the unprocessed errors.
❓ Context
🧐 Checklist for the PR Reviewers