diff options
author | kumavis <kumavis@users.noreply.github.com> | 2018-04-06 23:32:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-06 23:32:21 +0800 |
commit | 90bcf9f7d27d2a5240840a1eeb28dede9bfad7a3 (patch) | |
tree | 33c8a0cbe3fccfd6d27c3ea06bd242c05bdeb293 /app/scripts/migrations/015.js | |
parent | 77486a23654a7709091f99bc7ef76d894a46113a (diff) | |
parent | d4e30040a2186a1320a44f86849506729b2dafad (diff) | |
download | tangerine-wallet-browser-90bcf9f7d27d2a5240840a1eeb28dede9bfad7a3.tar tangerine-wallet-browser-90bcf9f7d27d2a5240840a1eeb28dede9bfad7a3.tar.gz tangerine-wallet-browser-90bcf9f7d27d2a5240840a1eeb28dede9bfad7a3.tar.bz2 tangerine-wallet-browser-90bcf9f7d27d2a5240840a1eeb28dede9bfad7a3.tar.lz tangerine-wallet-browser-90bcf9f7d27d2a5240840a1eeb28dede9bfad7a3.tar.xz tangerine-wallet-browser-90bcf9f7d27d2a5240840a1eeb28dede9bfad7a3.tar.zst tangerine-wallet-browser-90bcf9f7d27d2a5240840a1eeb28dede9bfad7a3.zip |
Merge pull request #3907 from MetaMask/fix-all-migrations
migrations - back fixes
Diffstat (limited to 'app/scripts/migrations/015.js')
-rw-r--r-- | app/scripts/migrations/015.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/app/scripts/migrations/015.js b/app/scripts/migrations/015.js index 4b839580b..5e2f9e63b 100644 --- a/app/scripts/migrations/015.js +++ b/app/scripts/migrations/015.js @@ -28,11 +28,14 @@ module.exports = { function transformState (state) { const newState = state - const transactions = newState.TransactionController.transactions - newState.TransactionController.transactions = transactions.map((txMeta) => { - if (!txMeta.err) return txMeta - else if (txMeta.err.message === 'Gave up submitting tx.') txMeta.status = 'failed' - return txMeta - }) + const { TransactionController } = newState + if (TransactionController && TransactionController.transactions) { + const transactions = TransactionController.transactions + newState.TransactionController.transactions = transactions.map((txMeta) => { + if (!txMeta.err) return txMeta + else if (txMeta.err.message === 'Gave up submitting tx.') txMeta.status = 'failed' + return txMeta + }) + } return newState } |