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
Shielded tip from a contact: check that the username still belongs to that contact #6200
A tip opened from a saved DashPay contact passes only the contact's DPNS name to the wallet (review_shielded_tip / send_shielded_tip take a username). If that name has since moved to another identity, the wallet correctly resolves it to the new owner. On a first tip to that name, the review reports New with no warning, so the sender can pay an identity that is not the contact they picked.
Found in review of #6197 (KotlinExampleApp tip screens). The Swift tip screens have the same entry point.
Proposed fix (wallet, not the hosts)
Let the review and the send take an optional expected recipient identity (the contact's id). Rust refuses with a typed error when the name resolves to a different identity. Hosts pass the contact id when the tip starts from a contact and nothing when the user typed a name. The comparison lives in platform-wallet (wallet/shielded/tip_payment.rs), with the FFI, JNI, Swift and Kotlin wrappers marshalling the extra argument.
Test: a name that moved to another identity before the first tip from a contact is refused at review and at send; a typed name is unchanged.
Until then
The hosts show the resolved recipient's identity id on the review. Neither app compares it with the contact, because that check is a wallet rule.
Activity
fix(kotlin-example-app): no contact tip shortcut until the wallet che…
feat(platform-wallet): refuse a tip whose contact's name moved to ano…
feat(platform-wallet): refuse a tip whose contact's name moved to ano…
feat(kotlin-example-app): tip a contact again, with the wallet checki…