As a swap is done with a centralized entity, some part of the swap is done off-chain.
As such, the user must be able to follow the status of the swap to avoid having them in a situation where they do not know what is happening with their transaction. Therefore, the user can follow the status on the transaction in an history tab on Ledger.
The history tab contains the swap transactions for a given Ledger Live instance.
The following information is displayed to the user:
- Date of Swap and time
- Partner name
- Source account
- Destination account
- Amount of destination token credited
- Amount of source token deducted
- Swap status
By clicking on a given swap, more information is displayed:
- Provider: Link to the provider’s website
- Swap ID: This information is generated by the partner and sent back to Ledger backend at the swap creation. This ID must be used by the user if they need to contact the partner’s support.
- Status: Detail of Status in the next section.
- Date: Date of the Transaction
- From: Name of the source account
- Initial amount: Amount of token sent
- Origin address: Address of the source account
- To: Name of the destination account
- Credited amount: Amount of destination token credited
- Provider address: Destination address of the provider
Users can check the status of the swap transaction in the history tab. Ledger Live backend calls the partner with the Swap ID to get the status for each transaction (until the transaction is “FINISHED”).
The statuses are:
- non final
- Pending: Transaction is ongoing
- OnHold: Provider has received funds but funds on transaction hold on provider’s side
- final (can’t be changed)
- Expired: User’s transaction has failed. funds stay in their wallet
- Finished: Transaction completed and fund sent
- Refunded: Funds are back in user’s wallet
You can add more detailed statuses (KYC, swap withdrawal failure, network congestion, refund failure, etc) by providing a mapping of your status along with the two status above.
Workflow for transaction status between Ledger and the partner
While the transaction is performed, Ledger polls the partner for status updates. Initially, the transaction is pending. The goal is to have the same status as above for clarity.