aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-04-01 04:32:47 +0800
committerkumavis <aaron@kumavis.me>2017-04-01 04:32:47 +0800
commit60a48e713fb341c0eba893bd0c37e02315c8b320 (patch)
tree2bbec4765bacfa6a3c779c91a9caa87fd4c41227 /app
parent49d8877fd78b8251b6856292ca71a55773a74b0e (diff)
downloadtangerine-wallet-browser-60a48e713fb341c0eba893bd0c37e02315c8b320.tar
tangerine-wallet-browser-60a48e713fb341c0eba893bd0c37e02315c8b320.tar.gz
tangerine-wallet-browser-60a48e713fb341c0eba893bd0c37e02315c8b320.tar.bz2
tangerine-wallet-browser-60a48e713fb341c0eba893bd0c37e02315c8b320.tar.lz
tangerine-wallet-browser-60a48e713fb341c0eba893bd0c37e02315c8b320.tar.xz
tangerine-wallet-browser-60a48e713fb341c0eba893bd0c37e02315c8b320.tar.zst
tangerine-wallet-browser-60a48e713fb341c0eba893bd0c37e02315c8b320.zip
ui - move popup auto-close after tx conf to ui entrypoint
Diffstat (limited to 'app')
-rw-r--r--app/scripts/popup.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/scripts/popup.js b/app/scripts/popup.js
index f6dcb829b..ce18dc422 100644
--- a/app/scripts/popup.js
+++ b/app/scripts/popup.js
@@ -17,13 +17,17 @@ global.METAMASK_UI_TYPE = windowType
closePopupIfOpen(windowType)
// setup stream to background
-const extensionPort = extension.runtime.connect({ windowType })
+const extensionPort = extension.runtime.connect({ name: windowType })
const connectionStream = new PortStream(extensionPort)
// start ui
const container = document.getElementById('app-content')
startPopup({ container, connectionStream }, (err, store) => {
if (err) return displayCriticalError(err)
+ store.subscribe(() => {
+ const state = store.getState()
+ if (state.appState.shouldClose) notificationManager.closePopup()
+ })
})