fix(wallet): gate the received-payment toast on status, not absent pending #169
No reviewers
Labels
No labels
app:activities
app:chat
app:chatelet
app:events
app:forum
app:libra
app:market
app:restaurant
app:tasks
app:wallet
app:webapp
bug
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aiolabs/webapp!169
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/wallet-payment-toast-guard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The last remaining reader of the phantom
pendingfield, same root cause as #161. It is a pydantic@propertyand never appears in the payload, so!payment.pendingwas always true. The guard reduced toamount > 0alone and never actually suppressed an unsettled payment, which is the one thing it was there to do.Now checks
status === 'success'.Stacked on #168. That one unbreaks the build, so this is cut from it to be verifiable. Merge #168 first and this reduces to its own commit.
Also removed: an unreachable branch
The enclosing condition already required
amount > 0, so the "Sent" toast could never fire.I dropped it rather than repairing it. A send made from this app is already confirmed by SendDialog's own success toast, so re-announcing it here would double up. An outgoing payment made from another client on the same wallet still appears in the history list; it just does not raise a toast. Say the word if you would rather have that toast and I will widen the guard instead.
Verification
A real settled payment over the websocket:
Found while checking that the six merged wallet PRs behaved correctly together, which is also how #168 surfaced.
pending18304984ce