From f27edb97bb09c629840d9a2b113ecf5dca3671a6 Mon Sep 17 00:00:00 2001 From: DwCay Date: Thu, 21 Jul 2022 11:21:55 +0300 Subject: [PATCH] Change methods for new transactions data --- .../validationLog/ValidateRoadMap.jsx | 2 +- .../validationLog/ValidationSeasonItem.jsx | 8 +++---- src/store/store.js | 23 ++++++++++++++++--- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/partials/validationLog/ValidateRoadMap.jsx b/src/partials/validationLog/ValidateRoadMap.jsx index c086b80..126a5b1 100644 --- a/src/partials/validationLog/ValidateRoadMap.jsx +++ b/src/partials/validationLog/ValidateRoadMap.jsx @@ -11,7 +11,7 @@ function ValidateRoadMap({ season }) {

{''}

-
+
{/* Avatars */} diff --git a/src/partials/validationLog/ValidationSeasonItem.jsx b/src/partials/validationLog/ValidationSeasonItem.jsx index d8925d7..8cabd4e 100644 --- a/src/partials/validationLog/ValidationSeasonItem.jsx +++ b/src/partials/validationLog/ValidationSeasonItem.jsx @@ -5,13 +5,13 @@ function ValidationSeasonItem({ length, item, index }) {
  • {length-1!==index && } -
    @@ -20,7 +20,7 @@ function ValidationSeasonItem({ length, item, index }) {
    {item.value}
    - Validated data + {item.address ? "Validated data" : "Updated data"}
    Explore ->
  • diff --git a/src/store/store.js b/src/store/store.js index 9e3410d..09c14c4 100644 --- a/src/store/store.js +++ b/src/store/store.js @@ -23,6 +23,8 @@ class Store { _sharedData = [] + _personalAccount = {} + _transactionsInfo = [] constructor() { @@ -71,12 +73,23 @@ class Store { } fetchTransactionsInfo() { - fetchWrapper.get(`account/transactions/${this.accountMadeTransaction}?moduleID=1001&assetID=11`, { + fetchWrapper.get(`account/transactions/${this.accountMadeTransaction}`, { networkIdentifier: this.nodeInfo.networkIdentifier, lastBlockID: this.nodeInfo.lastBlockID }).then((res) => this.saveInfoTransactions(res)) } + fetchPersonalAccount() { + fetchWrapper.get(`account/${this.accountMadeTransaction}`, { + networkIdentifier: this.nodeInfo.networkIdentifier, + lastBlockID: this.nodeInfo.lastBlockID + }).then((res)=>this.savePersonalAccount(res)) + } + + savePersonalAccount(res) { + this._personalAccount=res.data + } + fetchSharedData() { this._keysArray.forEach((elem) => fetchWrapper.get(`data/shared/${elem}`).then((res) => this.changeSharedData(res))) }; @@ -151,7 +164,7 @@ class Store { transaction: item.asset.features.map(asset => { return { transaction_id: item.id, - address: this.accountMadeTransaction, + address: item.asset.recipientAddress && "b444b7ff3118cf2a30cbd54cfcdb8fd5d805017a", value: asset.value, label: labelMap[asset.label], } @@ -181,7 +194,11 @@ class Store { } get accountMadeTransaction() { - return "b444b7ff3118cf2a30cbd54cfcdb8fd5d805017a" + return "71ccaeefe22050abc9b36ce0c1744316c11c49e1" + } + + get personalAccount() { + return this._personalAccount } get keysArray() {