Design guides
User wallet interactions
This guide is aimed at providing clarity on the minimum requirements when implementing user wallet connections and interactions.
Previously, applications using the Link SDK did not have to worry about this because the Link SDK provided an opinionated UI that implemented our best practices. Now, when using the Core SDK with the Wallet SDK, applications may need to implement their own design. Other than the must-haves outlined in this guide, the rest is up the application.
Interactions:​
Connect wallet
Disconnect wallet
List asset
Buy asset
L1 to L2 deposit
L2 to L1 withdrawals
Fiat onramp
Crypto to fiat offramp
Error states
Transaction history
Connect wallet​
Provider list
Provide a mechanism to surface the wallet options
Include user acceptance statement of XpansionChain’s T&C and privacy policy
Email login
If an application chooses to provide the email wallet (provided by Magic) as an option, it must:
Provide a field for the user to enter their email address
Include Magic’s T&C and privacy policy
MetaMask + GameStop
Not mandatory, but useful to include:
An explanation of why there are multiple signature requests from the non-custodial wallet for:
Connecting to a user wallet
Requesting for the user's signature
Setting up an XpansionChain layer 2 wallet key (only needed the first time a user connects with XpansionChain - this is user registration)
If MetaMask and GameStop are both provided as wallet options, explain that having both plugins at the same time can create wallet connection issues (more information available here)
Wallet connected
Not mandatory, but useful to include:
User feedback that wallet is successfully connected
Disconnect wallet​
List asset​
Listing screen
Enable the user to input their listing price
Enable the user to select their listing currency (if multiple options are provided)
Provide breakdown of any maker and taker fees that apply
Not mandatory, but useful to have:
Processing indicator when the user has initiated listing an asset and the transaction has not yet completed
Feedback when an asset has successfully been listed
Buy asset​
L1 to L2 deposit​
L2 to L1 withdrawals​
Withdraw flow
withdraw screen
Partner must
Surface withdrawal flow
Collect currency type (assuming multiple currencies available to be withdrawn)
Collect amount to be withdrawn
Useful to have:
Icon for different currency types
Available L2 balance to be deposited
Notice that withdrawal will require L1 gas to be paid
Notice that withdrawal has 2 stage: preparation & execution of withdrawal (more information available here)
Fiat onramp​
NOTE
Fiat onramp is still under development and not available in the SDK yet.
Crypto to fiat offramp​
NOTE
Crypto to fiat offramp is still under development and not available in the SDK yet.
Error states​
Transaction history​
NOTE
Transaction history is still under development and not available in the SDK yet.
Last updated