Skip to content

Commit 46fda01

Browse files
committed
add import if the app / specterd is already running
1 parent d58e8ea commit 46fda01

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pyinstaller/electron/main.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,15 @@ app.on('open-url', (_, url) => {
631631
logger.info('Automatic wallet import identified in the URL, setting automaticWalletImport to true.')
632632
automaticWalletImport = true
633633
walletDataFromUrl = data
634+
// Directly import if the app and specterd is already running
635+
if (specterIsRunning) {
636+
logger.info('Performing automatic wallet import ...')
637+
mainWindow.loadURL(`file://${__dirname}/splash.html`)
638+
updatingLoaderMsg('Importing your wallet. This will only work with a node connection.', (showSpinner = true))
639+
setTimeout(() => {
640+
importWallet(walletDataFromUrl)
641+
}, 3000)
642+
}
634643
}
635644
})
636645

0 commit comments

Comments
 (0)