2018-05-28 21:53:15 +02:00
|
|
|
// @flow
|
|
|
|
import React from 'react';
|
|
|
|
import { Modal } from 'modal/modal';
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
address: string,
|
|
|
|
amount: number,
|
|
|
|
closeModal: () => void,
|
|
|
|
sendToAddress: (string, number) => void,
|
|
|
|
};
|
|
|
|
|
|
|
|
class ModalConfirmTransaction extends React.PureComponent<Props> {
|
|
|
|
onConfirmed() {
|
|
|
|
const { closeModal, sendToAddress, amount, address } = this.props;
|
|
|
|
sendToAddress(address, amount);
|
|
|
|
closeModal();
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
const { amount, address, closeModal } = this.props;
|
|
|
|
return (
|
|
|
|
<Modal
|
|
|
|
isOpen
|
2018-09-26 19:48:07 +02:00
|
|
|
title={__('Send LBC')}
|
2018-05-28 21:53:15 +02:00
|
|
|
contentLabel={__('Confirm Transaction')}
|
|
|
|
type="confirm"
|
2018-09-26 19:48:07 +02:00
|
|
|
confirmButtonLabel={__('Send')}
|
2018-05-28 21:53:15 +02:00
|
|
|
onConfirmed={() => this.onConfirmed()}
|
|
|
|
onAborted={closeModal}
|
|
|
|
>
|
2018-09-26 19:48:07 +02:00
|
|
|
<section className="card__content">
|
|
|
|
<p>{__('Sending: ')}</p>
|
|
|
|
<blockquote>{amount} LBC</blockquote>
|
|
|
|
<p>{__('To address: ')}</p>
|
|
|
|
<blockquote>{address}</blockquote>
|
|
|
|
<p>{__('Once the transaction is sent, it cannot be reversed.')}</p>
|
|
|
|
</section>
|
2018-05-28 21:53:15 +02:00
|
|
|
</Modal>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ModalConfirmTransaction;
|