diff --git a/src/store/store.js b/src/store/store.js index 71b69ef..1b9c370 100644 --- a/src/store/store.js +++ b/src/store/store.js @@ -28,6 +28,8 @@ class Store { constructor() { makeAutoObservable(this,{}); + this.fetchNodeInfo() + reaction(() => this.keysArray, () => this.fetchSharedData()) onBecomeObserved(this, "decryptedUserData", () => this.fetchNewAccountData()) onBecomeObserved(this, "sharedData", ()=>this.fetchKeysArray()) @@ -101,6 +103,12 @@ class Store { this._accountData = data; }; + fetchNodeInfo() { + getNodeInfo() + .then((info)=>this.fetchNodeInfoSuccess(info)) + .catch((err) => this.fetchNodeInfoFailed(err)) + } + saveInfoTransactions(transaction) { this._transactionsInfo = transaction.data }