diff options
author | Dan Miller <danjm.com@gmail.com> | 2018-07-24 08:50:06 +0800 |
---|---|---|
committer | Dan Miller <danjm.com@gmail.com> | 2018-07-24 08:50:06 +0800 |
commit | 2359062b62cf65f38b36ccb6bb33fa7d15ada1ae (patch) | |
tree | 359b0146502baa8b804171348b01408908a5de14 /ui/app/components/pages | |
parent | b208d33b3b27a7f9c7ca2880e8b292d692651343 (diff) | |
download | tangerine-wallet-browser-2359062b62cf65f38b36ccb6bb33fa7d15ada1ae.tar tangerine-wallet-browser-2359062b62cf65f38b36ccb6bb33fa7d15ada1ae.tar.gz tangerine-wallet-browser-2359062b62cf65f38b36ccb6bb33fa7d15ada1ae.tar.bz2 tangerine-wallet-browser-2359062b62cf65f38b36ccb6bb33fa7d15ada1ae.tar.lz tangerine-wallet-browser-2359062b62cf65f38b36ccb6bb33fa7d15ada1ae.tar.xz tangerine-wallet-browser-2359062b62cf65f38b36ccb6bb33fa7d15ada1ae.tar.zst tangerine-wallet-browser-2359062b62cf65f38b36ccb6bb33fa7d15ada1ae.zip |
UI confirm screen closes confirmation window on submit or cancel of a tx
Diffstat (limited to 'ui/app/components/pages')
-rw-r--r-- | ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js b/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js index e1bf2210f..2811e6157 100644 --- a/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js +++ b/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js @@ -8,6 +8,9 @@ import { INSUFFICIENT_FUNDS_ERROR_KEY, TRANSACTION_ERROR_KEY, } from '../../../constants/error-keys' +import { + ENVIRONMENT_TYPE_NOTIFICATION, +} from '../../../../../app/scripts/lib/enums' export default class ConfirmTransactionBase extends Component { static contextTypes = { @@ -250,8 +253,12 @@ export default class ConfirmTransactionBase extends Component { } else { cancelTransaction(txData) .then(() => { - clearConfirmTransaction() - history.push(DEFAULT_ROUTE) + if (global.METAMASK_UI_TYPE === ENVIRONMENT_TYPE_NOTIFICATION) { + return global.platform.closeCurrentWindow() + } else { + clearConfirmTransaction() + history.push(DEFAULT_ROUTE) + } }) } } @@ -264,8 +271,12 @@ export default class ConfirmTransactionBase extends Component { } else { sendTransaction(txData) .then(() => { - clearConfirmTransaction() - history.push(DEFAULT_ROUTE) + if (global.METAMASK_UI_TYPE === ENVIRONMENT_TYPE_NOTIFICATION) { + return global.platform.closeCurrentWindow() + } else { + clearConfirmTransaction() + history.push(DEFAULT_ROUTE) + } }) } } |