From 1bd327ae0451f31f35d914631af4efac22b566a7 Mon Sep 17 00:00:00 2001 From: Aaron Date: Mon, 5 Jul 2021 16:09:06 +1000 Subject: [PATCH 1/3] Destroy sdk if notify re-initialized --- src/notify.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/notify.ts b/src/notify.ts index 2cccd19..919db33 100644 --- a/src/notify.ts +++ b/src/notify.ts @@ -67,11 +67,13 @@ import { createEmitter } from './utilities' import { version } from '../package.json' let notify: any +let blocknative function init(options: InitOptions): API { if (notify) { console.warn('notify has already been initialized') notify.$destroy() + blocknative && blocknative.destroy() } validateInit(options) @@ -85,8 +87,6 @@ function init(options: InitOptions): API { transactionHandlers.push(transactionHandler) } - let blocknative - if (dappId) { blocknative = new BlocknativeSdk({ dappId, From 82b5d5a48ef6175ee8bc62ff3b7c28d3dc495501 Mon Sep 17 00:00:00 2001 From: Aaron Date: Mon, 5 Jul 2021 16:09:14 +1000 Subject: [PATCH 2/3] Update yarn.lock --- yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index 14c8f99..ee38790 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1274,10 +1274,10 @@ bindings@^1.5.0: dependencies: file-uri-to-path "1.0.0" -bnc-sdk@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/bnc-sdk/-/bnc-sdk-3.3.0.tgz#a690abe7570a43745936a308006fa52c1d806017" - integrity sha512-5MaL1uhKQn3dY3uBfW5HujXCS988/vMX0MY7LtkDjmA396a3DSbGcGySsHVsJZCBVopUupl0geI5w28+p8PG9g== +bnc-sdk@^3.3.4: + version "3.4.0" + resolved "https://registry.yarnpkg.com/bnc-sdk/-/bnc-sdk-3.4.0.tgz#402874a4a794ccf5dd8ba8fba6925e24b38f772e" + integrity sha512-JVDDyIYucFQyq+ZfHSBVZG+R2Ophhdi+HIK5zj1gE2MYSCK/Ax8Budqys9/LyZkGdewWHZ5EWi2TUehxAbx0Rw== dependencies: crypto-es "^1.2.2" rxjs "^6.6.3" From bb667a9e75f1150edd7d216324ebbe6950ec9d78 Mon Sep 17 00:00:00 2001 From: Aaron Date: Mon, 5 Jul 2021 16:42:02 +1000 Subject: [PATCH 3/3] Increment version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 75d8209..b14bb33 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bnc-notify", - "version": "1.6.2", + "version": "1.6.2-0.1.0", "description": "Show web3 users realtime transaction notifications", "keywords": [ "ethereum",