wait for RPC hash before showing success screen#524
Conversation
this over optimization led to bad edge cases - if a tx hash is returned, the tx will most likely work show full address in send confirmation - this is a security feature
|
I've reviewed PR #524 against the actual code. Here's my assessment. SummaryThe PR makes two scoped changes:
Overall this is a sound, well-reasoned change. A few things worth flagging. What's good
Issues1. Unguarded try {
...
await submissionService.balanceTransfer(...);
unawaited(RecentAddressesService()...);
setState(() { // <-- no `mounted` check
_submitting = false;
_errorMessage = null;
});
if (mounted) {
Navigator.push(...);
}Previously the await returned almost instantly, so unmount-during-await was effectively impossible. Now the await genuinely blocks on an RPC round-trip (plus up to 3 retries with backoff). That widens the unmount window a lot. If the widget unmounts during submission, this 2. No bounded timeout now that the UI blocks on submit (consideration)
3. Optimistic pattern still used elsewhere (consistency / out of scope?) The multisig flows ( 4. Two address representations on one screen (minor/UI) On the review screen the hero card renders a truncated address via VerdictApprove with one recommended fix (the unguarded success-path Want me to apply the |
The blocking submit (#524) widens the unmount window while awaiting the RPC. If the screen unmounts mid-submission, the unguarded setState threw and was caught by the failure handler, reporting a successful send as failed and skipping navigation to the success screen.
Uh oh!
There was an error while loading. Please reload this page.