@arkade-os/sdk 0.2.2 → 0.2.3
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.
|
@@ -47,6 +47,11 @@ class Worker {
|
|
|
47
47
|
this.indexerProvider = undefined;
|
|
48
48
|
this.vtxoSubscription = undefined;
|
|
49
49
|
}
|
|
50
|
+
async reload() {
|
|
51
|
+
if (this.vtxoSubscription)
|
|
52
|
+
this.vtxoSubscription.abort();
|
|
53
|
+
await this.onWalletInitialized();
|
|
54
|
+
}
|
|
50
55
|
async onWalletInitialized() {
|
|
51
56
|
if (!this.wallet ||
|
|
52
57
|
!this.arkProvider ||
|
|
@@ -44,6 +44,11 @@ export class Worker {
|
|
|
44
44
|
this.indexerProvider = undefined;
|
|
45
45
|
this.vtxoSubscription = undefined;
|
|
46
46
|
}
|
|
47
|
+
async reload() {
|
|
48
|
+
if (this.vtxoSubscription)
|
|
49
|
+
this.vtxoSubscription.abort();
|
|
50
|
+
await this.onWalletInitialized();
|
|
51
|
+
}
|
|
47
52
|
async onWalletInitialized() {
|
|
48
53
|
if (!this.wallet ||
|
|
49
54
|
!this.arkProvider ||
|
|
@@ -13,6 +13,7 @@ export declare class Worker {
|
|
|
13
13
|
constructor(vtxoRepository?: VtxoRepository, messageCallback?: (message: ExtendableMessageEvent) => void);
|
|
14
14
|
start(withServiceWorkerUpdate?: boolean): Promise<void>;
|
|
15
15
|
clear(): Promise<void>;
|
|
16
|
+
reload(): Promise<void>;
|
|
16
17
|
private onWalletInitialized;
|
|
17
18
|
private processVtxoSubscription;
|
|
18
19
|
private handleClear;
|