A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ciphermask/ui/app/components/pages/confirm-approve/confirm-approve.container.js

29 lines
648 B

import { connect } from 'react-redux'
import ConfirmApprove from './confirm-approve.component'
const mapStateToProps = state => {
const { confirmTransaction } = state
const {
tokenData = {},
txData: { txParams: { to: tokenAddress } = {} } = {},
tokenProps: { tokenSymbol } = {},
} = confirmTransaction
const { params = [] } = tokenData
let toAddress = ''
let tokenAmount = ''
if (params && params.length === 2) {
[{ value: toAddress }, { value: tokenAmount }] = params
}
return {
toAddress,
tokenAddress,
tokenAmount,
tokenSymbol,
}
}
export default connect(mapStateToProps)(ConfirmApprove)