diff options
author | Dan Miller <danjm.com@gmail.com> | 2018-10-26 13:50:36 +0800 |
---|---|---|
committer | Dan Miller <danjm.com@gmail.com> | 2018-12-04 11:36:22 +0800 |
commit | e3f015c88f30fb4243ebbb3d2f109be8f3d68196 (patch) | |
tree | 62f96055f085624acf1a5fe91365f207daee2f0a /ui/app/actions.js | |
parent | 9b9a2cc2e00618167d5fac8103e928fc16153b2d (diff) | |
download | tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.tar tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.tar.gz tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.tar.bz2 tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.tar.lz tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.tar.xz tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.tar.zst tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.zip |
Adds speed up slide-in gas customization sidebar
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r-- | ui/app/actions.js | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index b747a97fb..cd24aed0a 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -325,6 +325,8 @@ var actions = { clearPendingTokens, createCancelTransaction, + createSpeedUpTransaction, + approveProviderRequest, rejectProviderRequest, clearApprovedOrigins, @@ -1837,6 +1839,28 @@ function createCancelTransaction (txId, customGasPrice) { } } +function createSpeedUpTransaction (txId, customGasPrice) { + log.debug('background.createSpeedUpTransaction') + let newTx + + return dispatch => { + return new Promise((resolve, reject) => { + background.createSpeedUpTransaction(txId, customGasPrice, (err, newState) => { + if (err) { + dispatch(actions.displayWarning(err.message)) + reject(err) + } + + const { selectedAddressTxList } = newState + newTx = selectedAddressTxList[selectedAddressTxList.length - 1] + resolve(newState) + }) + }) + .then(newState => dispatch(actions.updateMetamaskState(newState))) + .then(() => newTx) + } +} + // // config // @@ -1937,12 +1961,13 @@ function hideModal (payload) { } } -function showSidebar ({ transitionName, type }) { +function showSidebar ({ transitionName, type, props }) { return { type: actions.SIDEBAR_OPEN, value: { transitionName, type, + props, }, } } |