5f3a40a420
- 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.
28 lines
503 B
JavaScript
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,
|
|
},
|
|
};
|