aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Wei <chenwei@byzantine-lab.io>2019-07-08 17:41:42 +0800
committerChen Wei <chenwei@byzantine-lab.io>2019-07-08 17:41:42 +0800
commit6663d30beb42d91df955e80a6c0674c01c031ea2 (patch)
tree5a6481956bf1a232196969f7945a98c7887bcca5
parentfd5ec586a677bd3098885677de22880be9877364 (diff)
downloadtangerine-wallet-browser-6663d30beb42d91df955e80a6c0674c01c031ea2.tar.gz
tangerine-wallet-browser-6663d30beb42d91df955e80a6c0674c01c031ea2.tar.zst
tangerine-wallet-browser-6663d30beb42d91df955e80a6c0674c01c031ea2.zip
force update gas
-rw-r--r--ui/app/pages/confirm-transaction/confirm-transaction.component.js15
-rw-r--r--ui/app/store/store.js11
2 files changed, 20 insertions, 6 deletions
diff --git a/ui/app/pages/confirm-transaction/confirm-transaction.component.js b/ui/app/pages/confirm-transaction/confirm-transaction.component.js
index c8819dac3..7745e718b 100644
--- a/ui/app/pages/confirm-transaction/confirm-transaction.component.js
+++ b/ui/app/pages/confirm-transaction/confirm-transaction.component.js
@@ -85,7 +85,20 @@ export default class ConfirmTransaction extends Component {
totalUnapprovedCount,
} = this.props
- if (paramsTransactionId && transactionId && prevProps.paramsTransactionId !== paramsTransactionId) {
+ let thisGas
+ let prevGas
+ try {
+ thisGas = this.props.transaction.txParams.gas
+ prevGas = prevProps.transaction.txParams.gas
+ } catch (e) {
+ thisGas = undefined
+ prevGas = undefined
+ }
+
+ if (
+ (paramsTransactionId && transactionId && prevProps.paramsTransactionId !== paramsTransactionId) ||
+ (thisGas !== prevGas)
+ ) {
clearConfirmTransaction()
getContractMethodData(data)
setTransactionToConfirm(paramsTransactionId)
diff --git a/ui/app/store/store.js b/ui/app/store/store.js
index 9f12f469e..e25e2a56c 100644
--- a/ui/app/store/store.js
+++ b/ui/app/store/store.js
@@ -2,17 +2,18 @@ const createStore = require('redux').createStore
const applyMiddleware = require('redux').applyMiddleware
const thunkMiddleware = require('redux-thunk').default
const rootReducer = require('../ducks')
-const createLogger = require('redux-logger').createLogger
+// const createLogger = require('redux-logger').createLogger
global.METAMASK_DEBUG = process.env.METAMASK_DEBUG
module.exports = configureStore
-const loggerMiddleware = createLogger({
- predicate: () => global.METAMASK_DEBUG,
-})
+// const loggerMiddleware = createLogger({
+// predicate: () => global.METAMASK_DEBUG,
+// })
-const middlewares = [thunkMiddleware, loggerMiddleware]
+// const middlewares = [thunkMiddleware, loggerMiddleware]
+const middlewares = [thunkMiddleware]
const createStoreWithMiddleware = applyMiddleware(...middlewares)(createStore)