Skip to content

Commit

Permalink
Merge pull request #95 from aeternity/fix/notification-network
Browse files Browse the repository at this point in the history
Refactor for getting the right active network
  • Loading branch information
mradkov authored Mar 27, 2020
2 parents 92e7a9f + a1d9b6e commit c0abd0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/notifications.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { setInterval } from 'timers';
import iconUrl from './icons/icon_48.png';
import { getSDK } from './lib/background-utils';
import { getSDK, getNodes } from './lib/background-utils';
import { NOTIFICATION_METHODS } from './popup/utils/constants';
import { detectBrowser } from './popup/utils/helper';

Expand All @@ -13,6 +13,7 @@ export default class Notification {

async init() {
this.client = await getSDK();
this.network = (await getNodes()).network;
setInterval(() => {
this.checkTxReady();
}, 2000);
Expand All @@ -23,6 +24,7 @@ export default class Notification {

async [NOTIFICATION_METHODS.SWITCH_NETWORK]() {
this.client = await getSDK();
this.network = (await getNodes()).network;
}

async getAllNotifications() {
Expand Down

0 comments on commit c0abd0f

Please sign in to comment.