lbry-redux/flow-typed/CoinSwap.js
infiinte-persistence 5f3a40a420 CoinSwap: websocket + multi-coin
- For the active swap, switch from polling to websocket. The returned data is now the Charge data from the commerce, so some parsing will be required.

- Only save the 'chargeCode' to the wallet. The other data can be repopulated from this.
2021-04-07 14:35:15 -04:00

28 lines
503 B
JavaScript

declare type CoinSwapInfo = {
chargeCode: string,
coins: Array<string>,
sendAddresses: { [string]: string},
sendAmounts: { [string]: number },
lbcAmount: number,
status?: {
status: string,
receipt_txid: string,
lbc_txid: string,
},
}
declare type CoinSwapState = {
coinSwaps: Array<CoinSwapInfo>,
};
declare type CoinSwapAddAction = {
type: string,
data: CoinSwapInfo,
};
declare type CoinSwapRemoveAction = {
type: string,
data: {
chargeCode: string,
},
};