Closed kauffj closed 3 years ago
@seanyesmunt will flesh out this ticket and provide documentation, then hand to @infinite-persistence
@infinite-persistence I updated this ticket with screenshots of the UI to build. Most of it should be able to be built just from using the same styles as the send/tip confirmation modal. https://github.com/lbryio/lbry-desktop/blob/master/ui/component/walletSendTip/view.jsx#L173-L197
There is also another response type from the status
call. "error"
. I'm not sure how that should look yet, but probably just go back to the first view and trigger an error snack bar.
@infinite-persistence the vendor we decided to use for processing supports multiple coins. Can you update this PR to support them? @tiger5226 has the details.
Views: This is the first view. Use
Lbryio.call('btc', 'rate', { satoshis: amountFromInput })
to get the LBC estimateWhen users clicks "Start Swap" button, call `Lbryio.call('btc', 'swap', { lbc_satoshi_requested: lbcAmountFromRateCall, btc_satoshi_provided: btcAmountFromInput, pay_to_wallet_address: usersLbcWalletAddress })
After calling
swap
, callLbryio.call('btc', 'status', { pay_to_address: usersLbcWalletAddress })
"pending"
"processing"
"success"