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: refuse to create again a private document entry whose earlier create may have gone through #6193
A private document create (type 29, PlatformWallet::create_private_document_entry) can end as ShieldedSpendUnconfirmed: the entry may already be in the store. Rust keeps the spent notes reserved and redrives the saved transition. But a new call with the same entry seals a fresh commitment and can pay from other spendable notes, so the user is charged a second fee for the same entry.
Today only the hosts guard against this, and only in memory:
A byte array entered as deadbeef in one create and DEADBEEF in the next encodes the same bytes but a different properties string. That passes the Kotlin hold.
After a restart, neither app remembers the earlier attempt.
Deciding when a request may be sent again is wallet policy, which belongs in Rust, not in each host.
Proposal
Keep pending creates in rs-platform-wallet, keyed by a durable operation identity or by the normalized request, meaning what Rust would seal, not the host's JSON text. A create matching an unresolved earlier attempt should be refused, with a typed error that names that attempt, until a shielded sync settles it. Expose this through the FFI so both apps show the existing attempt instead of deciding themselves.
The same question applies to the DashPay private contact request, which pays the same way.
Activity