@leofcoin/peernet 0.14.24 → 0.14.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser/peernet.js
CHANGED
|
@@ -9093,7 +9093,8 @@ class Peernet {
|
|
|
9093
9093
|
this.id = JSON.parse(new TextDecoder().decode(pub)).walletId;
|
|
9094
9094
|
let accounts = await walletStore.get('accounts');
|
|
9095
9095
|
accounts = new TextDecoder().decode(accounts);
|
|
9096
|
-
|
|
9096
|
+
const selected = await walletStore.get('selected-account');
|
|
9097
|
+
globalThis.peernet.selectedAccount = new TextDecoder().decode(selected);
|
|
9097
9098
|
|
|
9098
9099
|
// fixing account issue (string while needs to be a JSON)
|
|
9099
9100
|
// TODO: remove when on mainnet
|
|
@@ -9111,8 +9112,10 @@ class Peernet {
|
|
|
9111
9112
|
|
|
9112
9113
|
await walletStore.put('version', String(1));
|
|
9113
9114
|
await walletStore.put('accounts', JSON.stringify(accounts));
|
|
9115
|
+
await walletStore.put('selected-account', accounts[0][1]);
|
|
9114
9116
|
await walletStore.put('identity', JSON.stringify(identity));
|
|
9115
9117
|
|
|
9118
|
+
globalThis.peernet.selectedAccount = accounts[0][1];
|
|
9116
9119
|
this.id = identity.walletId;
|
|
9117
9120
|
}
|
|
9118
9121
|
this._peerHandler = new PeerDiscovery(this.id);
|
package/dist/browser/peernet.mjs
CHANGED
|
@@ -9063,7 +9063,8 @@ class Peernet {
|
|
|
9063
9063
|
this.id = JSON.parse(new TextDecoder().decode(pub)).walletId;
|
|
9064
9064
|
let accounts = await walletStore.get('accounts');
|
|
9065
9065
|
accounts = new TextDecoder().decode(accounts);
|
|
9066
|
-
|
|
9066
|
+
const selected = await walletStore.get('selected-account');
|
|
9067
|
+
globalThis.peernet.selectedAccount = new TextDecoder().decode(selected);
|
|
9067
9068
|
|
|
9068
9069
|
// fixing account issue (string while needs to be a JSON)
|
|
9069
9070
|
// TODO: remove when on mainnet
|
|
@@ -9081,8 +9082,10 @@ class Peernet {
|
|
|
9081
9082
|
|
|
9082
9083
|
await walletStore.put('version', String(1));
|
|
9083
9084
|
await walletStore.put('accounts', JSON.stringify(accounts));
|
|
9085
|
+
await walletStore.put('selected-account', accounts[0][1]);
|
|
9084
9086
|
await walletStore.put('identity', JSON.stringify(identity));
|
|
9085
9087
|
|
|
9088
|
+
globalThis.peernet.selectedAccount = accounts[0][1];
|
|
9086
9089
|
this.id = identity.walletId;
|
|
9087
9090
|
}
|
|
9088
9091
|
this._peerHandler = new PeerDiscovery(this.id);
|
package/dist/commonjs/peernet.js
CHANGED
|
@@ -626,7 +626,8 @@ class Peernet {
|
|
|
626
626
|
this.id = JSON.parse(new TextDecoder().decode(pub)).walletId;
|
|
627
627
|
let accounts = await walletStore.get('accounts');
|
|
628
628
|
accounts = new TextDecoder().decode(accounts);
|
|
629
|
-
|
|
629
|
+
const selected = await walletStore.get('selected-account');
|
|
630
|
+
globalThis.peernet.selectedAccount = new TextDecoder().decode(selected);
|
|
630
631
|
|
|
631
632
|
// fixing account issue (string while needs to be a JSON)
|
|
632
633
|
// TODO: remove when on mainnet
|
|
@@ -644,8 +645,10 @@ class Peernet {
|
|
|
644
645
|
|
|
645
646
|
await walletStore.put('version', String(1));
|
|
646
647
|
await walletStore.put('accounts', JSON.stringify(accounts));
|
|
648
|
+
await walletStore.put('selected-account', accounts[0][1]);
|
|
647
649
|
await walletStore.put('identity', JSON.stringify(identity));
|
|
648
650
|
|
|
651
|
+
globalThis.peernet.selectedAccount = accounts[0][1];
|
|
649
652
|
this.id = identity.walletId;
|
|
650
653
|
}
|
|
651
654
|
this._peerHandler = new PeerDiscovery(this.id);
|
package/dist/module/peernet.js
CHANGED
|
@@ -600,7 +600,8 @@ class Peernet {
|
|
|
600
600
|
this.id = JSON.parse(new TextDecoder().decode(pub)).walletId;
|
|
601
601
|
let accounts = await walletStore.get('accounts');
|
|
602
602
|
accounts = new TextDecoder().decode(accounts);
|
|
603
|
-
|
|
603
|
+
const selected = await walletStore.get('selected-account');
|
|
604
|
+
globalThis.peernet.selectedAccount = new TextDecoder().decode(selected);
|
|
604
605
|
|
|
605
606
|
// fixing account issue (string while needs to be a JSON)
|
|
606
607
|
// TODO: remove when on mainnet
|
|
@@ -618,8 +619,10 @@ class Peernet {
|
|
|
618
619
|
|
|
619
620
|
await walletStore.put('version', String(1));
|
|
620
621
|
await walletStore.put('accounts', JSON.stringify(accounts));
|
|
622
|
+
await walletStore.put('selected-account', accounts[0][1]);
|
|
621
623
|
await walletStore.put('identity', JSON.stringify(identity));
|
|
622
624
|
|
|
625
|
+
globalThis.peernet.selectedAccount = accounts[0][1];
|
|
623
626
|
this.id = identity.walletId;
|
|
624
627
|
}
|
|
625
628
|
this._peerHandler = new PeerDiscovery(this.id);
|
package/package.json
CHANGED
package/src/peernet.js
CHANGED
|
@@ -202,7 +202,8 @@ export default class Peernet {
|
|
|
202
202
|
this.id = JSON.parse(new TextDecoder().decode(pub)).walletId;
|
|
203
203
|
let accounts = await walletStore.get('accounts')
|
|
204
204
|
accounts = new TextDecoder().decode(accounts)
|
|
205
|
-
|
|
205
|
+
const selected = await walletStore.get('selected-account')
|
|
206
|
+
globalThis.peernet.selectedAccount = new TextDecoder().decode(selected)
|
|
206
207
|
|
|
207
208
|
// fixing account issue (string while needs to be a JSON)
|
|
208
209
|
// TODO: remove when on mainnet
|
|
@@ -220,8 +221,10 @@ export default class Peernet {
|
|
|
220
221
|
|
|
221
222
|
await walletStore.put('version', String(1))
|
|
222
223
|
await walletStore.put('accounts', JSON.stringify(accounts))
|
|
224
|
+
await walletStore.put('selected-account', accounts[0][1])
|
|
223
225
|
await walletStore.put('identity', JSON.stringify(identity))
|
|
224
226
|
|
|
227
|
+
globalThis.peernet.selectedAccount = accounts[0][1]
|
|
225
228
|
this.id = identity.walletId
|
|
226
229
|
}
|
|
227
230
|
this._peerHandler = new PeerDiscovery(this.id)
|