mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Add empty object default value for tokenData (#3493)
This commit is contained in:
parent
4b2e52795d
commit
d84341f323
@ -63,8 +63,8 @@ function mapDispatchToProps (dispatch, ownProps) {
|
|||||||
updateTokenExchangeRate: () => dispatch(actions.updateTokenExchangeRate(symbol)),
|
updateTokenExchangeRate: () => dispatch(actions.updateTokenExchangeRate(symbol)),
|
||||||
editTransaction: txMeta => {
|
editTransaction: txMeta => {
|
||||||
const { token: { address } } = ownProps
|
const { token: { address } } = ownProps
|
||||||
const { txParams, id } = txMeta
|
const { txParams = {}, id } = txMeta
|
||||||
const tokenData = txParams.data && abiDecoder.decodeMethod(txParams.data)
|
const tokenData = txParams.data && abiDecoder.decodeMethod(txParams.data) || {}
|
||||||
const { params = [] } = tokenData
|
const { params = [] } = tokenData
|
||||||
const { value: to } = params[0] || {}
|
const { value: to } = params[0] || {}
|
||||||
const { value: tokenAmountInDec } = params[1] || {}
|
const { value: tokenAmountInDec } = params[1] || {}
|
||||||
|
Loading…
Reference in New Issue
Block a user