fix(web): fix #1063 add confirmation dialog for auto top up transfer - #1167
Merged
vjuliaife merged 1 commit intoAug 27, 2026
Merged
Conversation
|
@Owolabenjade Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Close issue #1063
This PR addresses issue #1063 where the
auto_top_updashboard button (apps/web/app/app/page.tsx) executed an on-chain fund transfer moving collateral shortfall from reserve to collateral escrow immediately upon a single click, with no preview or confirmation step.Unlike
DepositWizardwhich provides preview and confirmation steps before executing financial transactions, theauto_top_upbutton previously lacked any confirmation safeguard. This created a security and usability risk where importers could accidentally execute an irrevocable on-chain fund transfer without reviewing the exact transfer amount or confirming their intent.Solution & Flow
apps/web/app/app/page.tsxto introduce a localshowTopUpConfirmstate (useState(false)).auto_top_upbuttononClickhandler to triggersetShowTopUpConfirm(true)instead of invokinghandleTopUp()directly.fixed inset-0 z-50 bg-black/60 backdrop-blur-sm) that displays:stroopsToXlm(shortfall.toString())).setShowTopUpConfirm(false)), leaving balances completely unchanged without executingapi.autoTopUp.handleTopUp().disabled={busy !== null || shortfall === 0n}) on the primary trigger button.Value & Impact
This change resolves financial transaction safety concerns for issue #1063, ensuring importers preview exact transfer amounts and confirm intent before initiating on-chain transfers.
Changed
apps/web/app/app/page.tsx: Added a confirmation modal step forauto_top_upfund transfers showing the exact transfer amount in XLM with cancellation safety while preserving disabled behavior when no shortfall exists, fixing auto_top_up button executes an on-chain fund transfer with a single click and no confirmation #1063.Testing
The component modifications were verified using the following static analysis scripts: