diff options
Diffstat (limited to 'ui/app/components')
-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) + } }) } } |