7cf5c1f6fe
- 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. - Allow the user to send other coins that the commerce supports. - Only save the 'chargeCode' to the wallet. The other data can be repopulated from this. - Store the receipt currency. I'm not sure if the commerce supports sending bits from various coins. Take the coin that came with the 'COMPLETED' message for now. - Fix 'lbc' calculation to match IAPI side. - Allow users to see full detauls from "View Past Swaps". - String cleanup - GUI cleanup.
43 lines
1.3 KiB
JavaScript
43 lines
1.3 KiB
JavaScript
// @flow
|
|
import React from 'react';
|
|
import { Modal } from 'modal/modal';
|
|
import Button from 'component/button';
|
|
import Card from 'component/common/card';
|
|
import I18nMessage from 'component/i18nMessage';
|
|
|
|
type Props = {
|
|
chargeCode: string,
|
|
removeCoinSwap: (string) => void,
|
|
closeModal: () => void,
|
|
};
|
|
|
|
function ModalRemoveBtcSwapAddress(props: Props) {
|
|
const { chargeCode, removeCoinSwap, closeModal } = props;
|
|
|
|
return (
|
|
<Modal isOpen contentLabel={__('Confirm Swap Removal')} type="card" onAborted={closeModal}>
|
|
<Card
|
|
title={__('Remove Swap')}
|
|
subtitle={<I18nMessage tokens={{ address: <em>{`${chargeCode}`}</em> }}>Remove %address%?</I18nMessage>}
|
|
body={<p className="help--warning">{__('This process cannot be reversed.')}</p>}
|
|
actions={
|
|
<>
|
|
<div className="section__actions">
|
|
<Button
|
|
button="primary"
|
|
label={__('OK')}
|
|
onClick={() => {
|
|
removeCoinSwap(chargeCode);
|
|
closeModal();
|
|
}}
|
|
/>
|
|
<Button button="link" label={__('Cancel')} onClick={closeModal} />
|
|
</div>
|
|
</>
|
|
}
|
|
/>
|
|
</Modal>
|
|
);
|
|
}
|
|
|
|
export default ModalRemoveBtcSwapAddress;
|