At the moment, when calling the swap request command, the very first question asks which asset of a market fetched from a provider the user wants to send. This command, thus, depends on the daemon! While its goal is to let the user create/accept/complete swaps of assets of his choice.
To fix this, we need to remove the toggle from the first question and let the user specify the hash of the assets that he wants to send and receive, so technically the question would change from:
Which asset do you want to send? LBTC / USDT
to:
Which asset do you want to send? <assetA>
Which asset do you want to receive? <assetB>
To validate the assets provided by the user we would call the asset/:asset_idendpoint of the explorer to check that the asset exists (and eventually get its name and ticker if existing).
At the moment, when calling the
swap request
command, the very first question asks which asset of a market fetched from a provider the user wants to send. This command, thus, depends on the daemon! While its goal is to let the user create/accept/complete swaps of assets of his choice.To fix this, we need to remove the toggle from the first question and let the user specify the hash of the assets that he wants to send and receive, so technically the question would change from:
to:
To validate the assets provided by the user we would call the
asset/:asset_id
endpoint of the explorer to check that the asset exists (and eventually get its name and ticker if existing).