Merge branch 'master' into DID-9
This commit is contained in:
@@ -13,6 +13,8 @@ class Store {
|
||||
_userData = {}
|
||||
|
||||
_keysArray = []
|
||||
|
||||
_transactionsInfo = {}
|
||||
|
||||
constructor() {
|
||||
makeAutoObservable(this);
|
||||
@@ -20,6 +22,8 @@ class Store {
|
||||
this.fetchNodeInfo()
|
||||
|
||||
reaction(() => this.tokenKey, () => this.getData())
|
||||
reaction(() => this.tokenKey, () => this.fetchNewAccountData())
|
||||
reaction(() => this.tokenKey, () => this.fetchTransactionsInfo())
|
||||
};
|
||||
|
||||
getData() {
|
||||
@@ -47,6 +51,17 @@ class Store {
|
||||
networkIdentifier: this.nodeInfo.networkIdentifier,
|
||||
lastBlockID: this.nodeInfo.lastBlockID
|
||||
}).then((res) => this.keysArrayFetchChange(res))
|
||||
|
||||
fetchTransactionsInfo() {
|
||||
fetchWrapper.getAuth(`http://3.125.47.101/api/account/transactions/${this.accountMadeTransaction}?moduleID=1001&assetID=11`, {
|
||||
networkIdentifier: this.nodeInfo.networkIdentifier,
|
||||
lastBlockID: this.nodeInfo.lastBlockID
|
||||
})
|
||||
.then((res)=>this.saveInfoTransactions(res))
|
||||
}
|
||||
|
||||
get accountMadeTransaction() {
|
||||
return "b444b7ff3118cf2a30cbd54cfcdb8fd5d805017a"
|
||||
}
|
||||
|
||||
userDataFetchChange(res) {
|
||||
@@ -65,6 +80,10 @@ class Store {
|
||||
return this._userData;
|
||||
}
|
||||
|
||||
get transactionsInfo() {
|
||||
return this._transactionsInfo
|
||||
}
|
||||
|
||||
savePassPhrase(phrase) {
|
||||
this._passPhrase = phrase
|
||||
}
|
||||
@@ -73,6 +92,10 @@ class Store {
|
||||
this._accountData = data;
|
||||
};
|
||||
|
||||
saveInfoTransactions(transaction) {
|
||||
this._transactionsInfo = transaction
|
||||
}
|
||||
|
||||
fetchNodeInfo() {
|
||||
getNodeInfo()
|
||||
.then((info) => this.fetchNodeInfoSuccess(info))
|
||||
|
||||
Reference in New Issue
Block a user