2018-06-23 08:52:45 +02:00
|
|
|
import React, { Component } from 'react'
|
|
|
|
import PropTypes from 'prop-types'
|
2018-07-14 22:47:07 +02:00
|
|
|
import ConfirmTokenTransactionBase from '../confirm-token-transaction-base'
|
2018-06-23 08:52:45 +02:00
|
|
|
|
|
|
|
export default class ConfirmApprove extends Component {
|
|
|
|
static propTypes = {
|
2018-07-14 22:47:07 +02:00
|
|
|
tokenAmount: PropTypes.number,
|
2018-07-15 08:36:42 +02:00
|
|
|
tokenSymbol: PropTypes.string,
|
2018-06-23 08:52:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
render () {
|
2018-07-15 08:36:42 +02:00
|
|
|
const { tokenAmount, tokenSymbol } = this.props
|
2018-06-23 08:52:45 +02:00
|
|
|
|
|
|
|
return (
|
2018-07-14 22:47:07 +02:00
|
|
|
<ConfirmTokenTransactionBase
|
|
|
|
tokenAmount={tokenAmount}
|
2018-07-15 08:36:42 +02:00
|
|
|
warning={`By approving this action, you grant permission for this contract to spend up to ${tokenAmount} of your ${tokenSymbol}.`}
|
2018-06-23 08:52:45 +02:00
|
|
|
/>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|