|
|
@ -22,6 +22,7 @@ export default class ConfirmTransactionBase extends Component { |
|
|
|
// Redux props
|
|
|
|
// Redux props
|
|
|
|
balance: PropTypes.string, |
|
|
|
balance: PropTypes.string, |
|
|
|
cancelTransaction: PropTypes.func, |
|
|
|
cancelTransaction: PropTypes.func, |
|
|
|
|
|
|
|
cancelAllTransactions: PropTypes.func, |
|
|
|
clearConfirmTransaction: PropTypes.func, |
|
|
|
clearConfirmTransaction: PropTypes.func, |
|
|
|
clearSend: PropTypes.func, |
|
|
|
clearSend: PropTypes.func, |
|
|
|
conversionRate: PropTypes.number, |
|
|
|
conversionRate: PropTypes.number, |
|
|
@ -43,12 +44,14 @@ export default class ConfirmTransactionBase extends Component { |
|
|
|
sendTransaction: PropTypes.func, |
|
|
|
sendTransaction: PropTypes.func, |
|
|
|
showCustomizeGasModal: PropTypes.func, |
|
|
|
showCustomizeGasModal: PropTypes.func, |
|
|
|
showTransactionConfirmedModal: PropTypes.func, |
|
|
|
showTransactionConfirmedModal: PropTypes.func, |
|
|
|
|
|
|
|
showRejectTransactionsConfirmationModal: PropTypes.func, |
|
|
|
toAddress: PropTypes.string, |
|
|
|
toAddress: PropTypes.string, |
|
|
|
tokenData: PropTypes.object, |
|
|
|
tokenData: PropTypes.object, |
|
|
|
tokenProps: PropTypes.object, |
|
|
|
tokenProps: PropTypes.object, |
|
|
|
toName: PropTypes.string, |
|
|
|
toName: PropTypes.string, |
|
|
|
transactionStatus: PropTypes.string, |
|
|
|
transactionStatus: PropTypes.string, |
|
|
|
txData: PropTypes.object, |
|
|
|
txData: PropTypes.object, |
|
|
|
|
|
|
|
unapprovedTxCount: PropTypes.number, |
|
|
|
// Component props
|
|
|
|
// Component props
|
|
|
|
action: PropTypes.string, |
|
|
|
action: PropTypes.string, |
|
|
|
contentComponent: PropTypes.node, |
|
|
|
contentComponent: PropTypes.node, |
|
|
@ -249,6 +252,25 @@ export default class ConfirmTransactionBase extends Component { |
|
|
|
onEdit({ txData, tokenData, tokenProps }) |
|
|
|
onEdit({ txData, tokenData, tokenProps }) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleCancelAll () { |
|
|
|
|
|
|
|
const { |
|
|
|
|
|
|
|
cancelAllTransactions, |
|
|
|
|
|
|
|
clearConfirmTransaction, |
|
|
|
|
|
|
|
history, |
|
|
|
|
|
|
|
showRejectTransactionsConfirmationModal, |
|
|
|
|
|
|
|
unapprovedTxCount, |
|
|
|
|
|
|
|
} = this.props |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
showRejectTransactionsConfirmationModal({ |
|
|
|
|
|
|
|
unapprovedTxCount, |
|
|
|
|
|
|
|
async onSubmit () { |
|
|
|
|
|
|
|
await cancelAllTransactions() |
|
|
|
|
|
|
|
clearConfirmTransaction() |
|
|
|
|
|
|
|
history.push(DEFAULT_ROUTE) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
handleCancel () { |
|
|
|
handleCancel () { |
|
|
|
const { onCancel, txData, cancelTransaction, history, clearConfirmTransaction } = this.props |
|
|
|
const { onCancel, txData, cancelTransaction, history, clearConfirmTransaction } = this.props |
|
|
|
|
|
|
|
|
|
|
@ -314,6 +336,7 @@ export default class ConfirmTransactionBase extends Component { |
|
|
|
nonce, |
|
|
|
nonce, |
|
|
|
assetImage, |
|
|
|
assetImage, |
|
|
|
warning, |
|
|
|
warning, |
|
|
|
|
|
|
|
unapprovedTxCount, |
|
|
|
} = this.props |
|
|
|
} = this.props |
|
|
|
const { submitting, submitError } = this.state |
|
|
|
const { submitting, submitError } = this.state |
|
|
|
|
|
|
|
|
|
|
@ -337,6 +360,7 @@ export default class ConfirmTransactionBase extends Component { |
|
|
|
dataComponent={this.renderData()} |
|
|
|
dataComponent={this.renderData()} |
|
|
|
contentComponent={contentComponent} |
|
|
|
contentComponent={contentComponent} |
|
|
|
nonce={nonce} |
|
|
|
nonce={nonce} |
|
|
|
|
|
|
|
unapprovedTxCount={unapprovedTxCount} |
|
|
|
assetImage={assetImage} |
|
|
|
assetImage={assetImage} |
|
|
|
identiconAddress={identiconAddress} |
|
|
|
identiconAddress={identiconAddress} |
|
|
|
errorMessage={errorMessage || submitError} |
|
|
|
errorMessage={errorMessage || submitError} |
|
|
@ -344,6 +368,7 @@ export default class ConfirmTransactionBase extends Component { |
|
|
|
warning={warning} |
|
|
|
warning={warning} |
|
|
|
disabled={!propsValid || !valid || submitting} |
|
|
|
disabled={!propsValid || !valid || submitting} |
|
|
|
onEdit={() => this.handleEdit()} |
|
|
|
onEdit={() => this.handleEdit()} |
|
|
|
|
|
|
|
onCancelAll={() => this.handleCancelAll()} |
|
|
|
onCancel={() => this.handleCancel()} |
|
|
|
onCancel={() => this.handleCancel()} |
|
|
|
onSubmit={() => this.handleSubmit()} |
|
|
|
onSubmit={() => this.handleSubmit()} |
|
|
|
/> |
|
|
|
/> |
|
|
|