2021-02-04 19:15:23 +01:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import ConfirmTransactionBase from '../confirm-transaction-base';
|
|
|
|
import { SEND_ROUTE } from '../../helpers/constants/routes';
|
2018-06-23 08:52:45 +02:00
|
|
|
|
|
|
|
export default class ConfirmSendEther extends Component {
|
|
|
|
static contextTypes = {
|
|
|
|
t: PropTypes.func,
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2018-06-23 08:52:45 +02:00
|
|
|
|
|
|
|
static propTypes = {
|
|
|
|
editTransaction: PropTypes.func,
|
|
|
|
history: PropTypes.object,
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2018-06-23 08:52:45 +02:00
|
|
|
|
2020-11-03 00:41:28 +01:00
|
|
|
handleEdit({ txData }) {
|
2021-02-04 19:15:23 +01:00
|
|
|
const { editTransaction, history } = this.props;
|
2021-07-16 18:06:32 +02:00
|
|
|
editTransaction(txData).then(() => {
|
|
|
|
history.push(SEND_ROUTE);
|
|
|
|
});
|
2018-06-23 08:52:45 +02:00
|
|
|
}
|
|
|
|
|
2020-11-03 00:41:28 +01:00
|
|
|
render() {
|
2018-06-23 08:52:45 +02:00
|
|
|
return (
|
|
|
|
<ConfirmTransactionBase
|
2019-11-18 16:08:47 +01:00
|
|
|
actionKey="confirm"
|
2020-11-03 00:41:28 +01:00
|
|
|
onEdit={(confirmTransactionData) =>
|
|
|
|
this.handleEdit(confirmTransactionData)
|
|
|
|
}
|
2018-06-23 08:52:45 +02:00
|
|
|
/>
|
2021-02-04 19:15:23 +01:00
|
|
|
);
|
2018-06-23 08:52:45 +02:00
|
|
|
}
|
|
|
|
}
|