aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/pages/confirm-approve/confirm-approve.component.js
blob: b71eaa1d4804a5798827961e84f6c8fcb2b8255a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import ConfirmTokenTransactionBase from '../confirm-token-transaction-base'

export default class ConfirmApprove extends Component {
  static propTypes = {
    tokenAmount: PropTypes.number,
    tokenSymbol: PropTypes.string,
  }

  render () {
    const { tokenAmount, tokenSymbol } = this.props

    return (
      <ConfirmTokenTransactionBase
        tokenAmount={tokenAmount}
        warning={`By approving this action, you grant permission for this contract to spend up to ${tokenAmount} of your ${tokenSymbol}.`}
      />
    )
  }
}