Интеграция страницы ValidationLog с сервером
This commit is contained in:
@@ -12,12 +12,15 @@ class Store {
|
||||
|
||||
_userData = {}
|
||||
|
||||
_transactionInfo = {}
|
||||
|
||||
constructor() {
|
||||
makeAutoObservable(this);
|
||||
|
||||
this.fetchNodeInfo()
|
||||
|
||||
reaction(() => this.tokenKey, () => this.fetchNewAccountData())
|
||||
reaction(() => this.tokenKey, () => this.fetchTransactionInfo())
|
||||
};
|
||||
|
||||
fetchNewAccountData() {
|
||||
@@ -35,6 +38,14 @@ class Store {
|
||||
.then(()=>this.fetchNewAccountData())
|
||||
}
|
||||
|
||||
fetchTransactionInfo() {
|
||||
fetchWrapper.getAuth(`http://3.125.47.101/api/account/transactions/b444b7ff3118cf2a30cbd54cfcdb8fd5d805017a?moduleID=1001&assetID=11`, {
|
||||
networkIdentifier: this.nodeInfo.networkIdentifier,
|
||||
lastBlockID: this.nodeInfo.lastBlockID
|
||||
})
|
||||
.then((res)=>this.saveInfoTransaction(res))
|
||||
}
|
||||
|
||||
userDataFetchChange(res) {
|
||||
this._userData = res;
|
||||
}
|
||||
@@ -43,6 +54,10 @@ class Store {
|
||||
return this._userData
|
||||
}
|
||||
|
||||
get transactionInfo() {
|
||||
return this._transactionInfo
|
||||
}
|
||||
|
||||
savePassPhrase(phrase) {
|
||||
this._passPhrase = phrase
|
||||
}
|
||||
@@ -51,6 +66,10 @@ class Store {
|
||||
this._accountData = data;
|
||||
};
|
||||
|
||||
saveInfoTransaction(transaction) {
|
||||
this._transactionInfo = transaction
|
||||
}
|
||||
|
||||
fetchNodeInfo() {
|
||||
getNodeInfo()
|
||||
.then((info) => this.fetchNodeInfoSuccess(info))
|
||||
|
||||
Reference in New Issue
Block a user