From 60a48e713fb341c0eba893bd0c37e02315c8b320 Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 31 Mar 2017 13:32:47 -0700 Subject: ui - move popup auto-close after tx conf to ui entrypoint --- app/scripts/popup.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app') 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() + }) }) -- cgit v1.2.3