As a buyer, when I make a purchase I want to be able to choose the compatible coin from one of my wallets I use to pay for the purchase.
As a buyer, it would be useful to know what my balance is when choosing a coin, so I don't pick a coin that doesn't have enough funds.
As a buyer, I only want to see moderators that want to moderate orders using the coin I chose to use to pay for the purchase.
Functional Requirements
[ ] There should be a control that allows the buyer to pick which of their coins they want to use when purchasing this listing.
They should only be able to choose a coin that is compatible with the list of coins the listing can accept.
The control element can either only show compatible coins, or incompatible coins can be disabled.
It would be nice to indicate how much funds each coin has when selecting it, so the buyer doesn't select a coin they can't pay with. This gets tricky because they may not know the total price yet at this point, and don't have any way to know what the fee will be.
Choosing the coin affects which moderators can be selected (some of the moderators on the order may not support the chosen coin. ex: an old BTC SPV only moderator on a listing that accepts BTC and BCH).
We may want to encourage the user to choose the coin before they choose the moderator (if any) to avoid confusing interactions.
[ ] Only moderators compatible with the chosen payment coin should be shown.
Compatible means the coin is on their accepted coin list. This should only be an issue in the near future for mods that haven't upgraded to multi wallet nodes yet.
QUESTION: Should incompatible moderators be hidden, or disabled? It might be useful for a buyer to know if they pick a different coin which moderators will be selectable.
[ ] The user may pick a moderator, then choose a coin that moderator can't accept. Doing that should de-select the moderator and revert the order to unmoderated. The user should probably be warned if this happens so they don't just click pay assuming the moderator is still selected.
alternately, we could have a "moderated payment, but no moderator selected" state, and show an error if the buyer has no moderator selected and tries to pay.
API Changes
[ ] ob/purchase
Each item will need a coinType (coinCode?) field.
When the purchase is made, the moderator (if any) should be validated to confirm they are capable of accepting the coin used for payment.
User Story
Functional Requirements
[ ] There should be a control that allows the buyer to pick which of their coins they want to use when purchasing this listing.
[ ] Only moderators compatible with the chosen payment coin should be shown.
API Changes