Skip to content

Confirm a contact's payment address against Platform before an app offers it for payment #6166

Backlog

Description

@QuantumExplorer

What happens

The wallet caches each contact's DashPay profile and refreshes it about once an hour (sync_contact_profiles, skipping contacts checked within the refresh window, and keeping the old result when a fetch fails). Since #6124 the cached profile carries the contact's payment addresses.

SwiftExampleApp's contact detail shows those cached addresses with a Copy button (#6094). A contact who changed or removed an address less than an hour ago, or whose refresh failed, is still shown with the previous one. #6094 labels the section "Last known payment addresses" and says they may have changed, but the app has no way to check.

What is wanted

A wallet operation that fetches one contact's profile from Platform with proof, bypassing the cache window, updates the cache, and tells the caller which of three things it found:

  • the address as published now;
  • confirmed absence (the profile has no such address, or there is no profile);
  • the check failed, with the last known value.

Hosts call it when a contact's address is about to be used (opening the contact, tapping Copy or Pay) and show the result. Whether a host may offer a last-known address when the check failed is a rule for the wallet to state, not each app.

Raised by the review of #6094: #6094 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions