Skip to content
This repository has been archived by the owner on Oct 11, 2020. It is now read-only.

Payments Interaction Design

Aviv Eyal edited this page Jan 6, 2019 · 8 revisions

Payment interaction

In this interaction, a user (payer) makes a Spacemesh coins payment to another user (payee).

Step 1 - Specify Payee Info

Payer initiates the interaction by clicking the Pay button in the main wallet UI. The account currently displayed in the wallet (defaults to the HD wallet key-pair at index 0) will be used as the payer account. Payer needs to specify the payee (coins receiver) Spacemesh account id (public key). There are 3 main ways to specify this address:

  1. Paste an address copied from another app
  2. Scan an address QR code (mobile devices only)
  3. Select an address from Contacts - The payer wallet's built-in address book
  4. Type an address - JIC as a fallback method

Design Notes

  • On desktop step 1 is combined with step 2 on the same screen. On mobile these steps are separated to 2 screens.

Visual Elements

  • Payee text field - address can be typed or pasted here. Address automatically filled-in when a QR code is scanned or when a contact payee is specified
  • Cancel button - cancel flow and display main wallet UI (missing from the desktop mock)
  • Continue button - proceed to step 2. Mobile only.
  • Contacts button - access address book and specify an address of a contact (see paying to a contact interaction)
  • Scan button - scan payee address QR code
  • Help button - access help topics for this screen

Step 2 - Amount to send

User needs to specify the Spacemesh Coins amount to transfer to the payee as well as the transaction fees he's willing to pay for the transaction.

Visual Elements

  • SMC Amount field - specify payment amount in Spacemesh Coins
  • Fiat value estimate field - displays the estimated fiat value of the payment in a legacy currency, e.g. USD. User may also input the fiat value and in this case the SMC amount field should be updated based on the fiat value. When user specified an SMC amount in the SMC amount field the estimated USD amount field should be updated to indicate the fiat value
  • Fee field - displays the fee in Spacemesh Cents. The fee is auto calculated based on a gas price oracle. The field should also display the estimated fiat value fee.
  • Fee Options button - enables the user to specify a custom transaction fee in SMC (or fait) amounts - see below.
  • Help button - display help topics for this screen
  • Back button - go back to step 1 (mobile only)
  • Next button - confirm the transaction (proceed to step 3)

Optional step - Fee Options

  • User should be able to specify the fee in Fiat or SMC. This is currently not reflected in the mock
  • The Gas Limit field is only applicable to smart contract transactions and not to standard coin transfer transaction as they have a fixed gas cost
  • Remove usage of gas and use transaction fee - gas is only applicable to smart contract transactions
  • The mocks should be updated to reflect these requirements

Step 3 - User Confirmation

  • User reviews the transaction data (payee address, amount and fee) and clicks on Execute to execute the transaction or back to go back to the previous screen (transaction details)

TODO: missing confirmation screen mock for both desktop and mobile


Step 4 - Transaction Network Confirmation

  • TODO: missing confirmation screen for desktop

This screen displays the transaction status which can be one of:

  1. Submitting transaction to the network...
  2. Submitted to the network
  3. Error - failed to submit transaction to the network (network error, node error or gateway error)

Once the transaction was submitted, the screen displays an URL to track the pending transaction status.

  • TODO: need mocks for these

Available Commands

  • A Copy button copies the tracking URL. User can get transaction info using the url on the Spacemesh network stats web site
  • Save to Contacts - prompt to add payee to contacts if he's not already a contact. Clicking this button prompts user to enter the contact's name and adds the payee address to the wallet's address book
  • Done button - end the interaction and go back to the main wallet screen
  • Transaction should be automatically added to the wallet's transactions log and should be accessible at a later time to the user
  • After a transaction is executed - the app should display the transactions log screen so user can track transaction progress in a non-modal blocking way.