mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
ui - tx conf - only show special token tx conf screen for token send
This commit is contained in:
parent
3595d71c2d
commit
3e79941658
@ -63,10 +63,14 @@ PendingTx.prototype.componentWillMount = async function () {
|
||||
isFetching: false,
|
||||
})
|
||||
}
|
||||
const tokenData = txParams && abiDecoder.decodeMethod(txParams.data)
|
||||
|
||||
// inspect tx data for supported special confirmation screens
|
||||
let isTokenTransaction = false
|
||||
if (txParams.data) {
|
||||
const tokenData = abiDecoder.decodeMethod(txParams.data)
|
||||
const { name: tokenMethodName } = tokenData || {}
|
||||
const isTokenTransaction = ['transfer', 'approve', 'transferFrom']
|
||||
.find(possibleName => tokenMethodName === possibleName)
|
||||
isTokenTransaction = (tokenMethodName === 'transfer')
|
||||
}
|
||||
|
||||
if (isTokenTransaction) {
|
||||
const token = util.getContractAtAddress(txParams.to)
|
||||
|
Loading…
Reference in New Issue
Block a user