You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
platform-wallet: a top-up that fails reading its funding inputs reports that nothing was sent #6277
A top-up from Platform addresses that fails while it reads its funding inputs, before anything is signed, reports that nothing was sent, so a host can offer Retry.
Current Behavior
sign_top_up reads the inputs' nonces and balances with fetch_inputs_with_nonce before it builds or signs the transition (top_up_from_addresses.rs#L211). A transport failure there goes through top_up_error as a generic PlatformWalletError::Sdk (#L332) and crosses the FFI as the generic code 99. A host cannot tell it from a failure after the broadcast, so it has to report the payment as possibly sent and withhold Retry, although nothing left the wallet.
The payment class of #5926 / #5928 does not cover it: it tags NeverDelivered from the broadcast outcome, and this error is raised before the broadcast, so it classifies as maybe sent.
Possible Solution
Give errors raised before signing (the funding-input read, and other pre-sign reads of the same operation) the never-delivered class, through the Rust wallet, the FFI and the Swift wrapper, and test a first read that succeeds with a second that fails. Leave the classification of failures after the broadcast as it is.
Context
Found in the review of dashpay/dashwallet-ios#1486 (Platform → someone else's identity in the new Send flow), where such a timeout reads as "Send in progress" with no Retry.
Activity