diff options
author | kumavis <kumavis@users.noreply.github.com> | 2017-01-17 16:18:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-17 16:18:34 +0800 |
commit | 5d6041168cbc93ef092ce7c9a8fed5fe6e504724 (patch) | |
tree | ffcd05bfa6d1fb42ef8fdd20381e054a13c93517 /ui/app/conf-tx.js | |
parent | 4bc09be6473539c4889143621af6681ac3a838b6 (diff) | |
parent | a208ed1d83fd72b0dcc5146a733d8cd506a5d2a4 (diff) | |
download | tangerine-wallet-browser-3.0.1.tar tangerine-wallet-browser-3.0.1.tar.gz tangerine-wallet-browser-3.0.1.tar.bz2 tangerine-wallet-browser-3.0.1.tar.lz tangerine-wallet-browser-3.0.1.tar.xz tangerine-wallet-browser-3.0.1.tar.zst tangerine-wallet-browser-3.0.1.zip |
Merge pull request #1018 from MetaMask/i1014-FixSigningv3.0.1
Fix eth.sign
Diffstat (limited to 'ui/app/conf-tx.js')
-rw-r--r-- | ui/app/conf-tx.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js index 8e255a867..a6e03c3ed 100644 --- a/ui/app/conf-tx.js +++ b/ui/app/conf-tx.js @@ -41,12 +41,13 @@ ConfirmTxScreen.prototype.render = function () { var provider = state.provider var unconfTxs = state.unconfTxs var unconfMsgs = state.unconfMsgs + var unconfTxList = txHelper(unconfTxs, unconfMsgs, network) - var index = state.index !== undefined ? state.index : 0 + var index = state.index !== undefined && unconfTxList[index] ? state.index : 0 var txData = unconfTxList[index] || {} - var txParams = txData.txParams + var txParams = txData.params || {} var isNotification = isPopupOrNotification() === 'notification' - if (!txParams) return null + if (unconfTxList.length === 0) return null return ( @@ -116,15 +117,19 @@ ConfirmTxScreen.prototype.render = function () { } function currentTxView (opts) { - if ('txParams' in opts.txData) { + const { txData } = opts + const { txParams, msgParams } = txData + + if (txParams) { // This is a pending transaction return h(PendingTx, opts) - } else if ('msgParams' in opts.txData) { + } else if (msgParams) { // This is a pending message to sign return h(PendingMsg, opts) } } ConfirmTxScreen.prototype.checkBalanceAgainstTx = function (txData) { + if (!txData.txParams) return false var state = this.props var address = txData.txParams.from || state.selectedAccount var account = state.accounts[address] |