From e837f7cc89c8a302eb7a6ac9ec2f9bf8b4d1840c Mon Sep 17 00:00:00 2001 From: Daria Golova Date: Fri, 8 Jul 2022 18:06:32 +0300 Subject: [PATCH 1/6] added onblur, fixed seed, moved default values --- src/pages/digitalId/ProfileId.jsx | 37 +++++++++++++------------------ 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/src/pages/digitalId/ProfileId.jsx b/src/pages/digitalId/ProfileId.jsx index 85b59d1..6a00234 100644 --- a/src/pages/digitalId/ProfileId.jsx +++ b/src/pages/digitalId/ProfileId.jsx @@ -7,6 +7,14 @@ import Header from '../../partials/Header'; import ProfileTable from '../../partials/digitalId/ProfileTable'; import Image from '../../images/transactions-image-04.svg'; +const defaultValues = { + label: '', + value: '', + seed: parseInt(Math.floor(Math.random() * 90000000000000000000), 10) +}; + +const initialPropertyValues = ['First name', 'Second name', 'Birthdate', 'Gender', 'National doctype', 'National doc id', 'National doc issue date', 'National doc expiry date']; + const Profile = observer (() => { const [sidebarOpen, setSidebarOpen] = useState(false); const [buttonPanelOpen, setButtonPanelOpen] = useState(true); @@ -16,14 +24,6 @@ const Profile = observer (() => { const [addPanelOpen, setAddPanelOpen] = useState(false); const [updatePanelOpen, setUpdatePanelOpen] = useState(false); const [selectedItems, setSelectedItems] = useState([]); - - const defaultValues = { - label: '', - value: '', - seed: Math.floor(Math.random() * 90000000000000000000) - }; - - const initialPropertyValues = ['First name', 'Second name', 'Birthdate', 'Gender', 'National doctype', 'National doc id', 'National doc issue date', 'National doc expiry date']; const [propertyValues, setPropertyValues] = useState([]); const [updatedValues, setUpdatedValues] = useState([defaultValues]); const [addedValues, setAddedValues] = useState(defaultValues); @@ -35,26 +35,18 @@ const Profile = observer (() => { } const changeAddedValues = (value, field) => { - setAddedValues((prevState) => ( - field !== 'seed' ? { + setAddedValues((prevState) => ({ ...prevState, [field]: value - } : { - ...prevState, - [field]: +value, })) }; const changeUpdatedValues = (value, field, key) => { setUpdatedValues((prevState) => prevState.map((elem) => ( - (elem.key === key && field !== 'seed') ? { - ...elem, - [field]: value, - } : (elem.key === key) ? { ...elem, - [field]: +value, + [field]: value, } : elem )) ) @@ -71,7 +63,7 @@ const Profile = observer (() => { .map(elem => ( (!elem.seed) ? { ...elem, - seed: Math.floor(Math.random() * 90000000000000000000) + seed: parseInt(Math.floor(Math.random() * 90000000000000000000), 10) }: elem))); if (selectedItems.length > 0) { setButtonPanelOpen(false); @@ -95,7 +87,9 @@ const Profile = observer (() => { } const sendAddedData = () => { - if (!userDataStore.decryptedData.some((element) => element.label === addedValues.label) && (addedValues.seed.toString().length === 20)) { + const checkingAddedData = !userDataStore.decryptedData + some((element) => element.label === addedValues.label) && (addedValues.seed.length === 20); + if (checkingAddedData) { setAddPanelOpen(false); setButtonPanelOpen(true); setAddedValues(defaultValues); @@ -245,11 +239,12 @@ const Profile = observer (() => { onInput={(e) => handleInput(e.target.value, 'label')} value={addedValues.label} onClick={openHint} + onBlur={() => setPropertyValues([])} />
0) || 'hidden'}`}>
From 47dfcf347ca2a051df18b6dec1b42bf85134869f Mon Sep 17 00:00:00 2001 From: Daria Golova Date: Mon, 11 Jul 2022 15:08:12 +0300 Subject: [PATCH 2/6] added stacking context for the hint --- src/pages/digitalId/ProfileId.jsx | 116 +++++++++++++++--------------- 1 file changed, 60 insertions(+), 56 deletions(-) diff --git a/src/pages/digitalId/ProfileId.jsx b/src/pages/digitalId/ProfileId.jsx index 6a00234..fae4309 100644 --- a/src/pages/digitalId/ProfileId.jsx +++ b/src/pages/digitalId/ProfileId.jsx @@ -10,10 +10,10 @@ import Image from '../../images/transactions-image-04.svg'; const defaultValues = { label: '', value: '', - seed: parseInt(Math.floor(Math.random() * 90000000000000000000), 10) + seed: String(Math.floor(Math.random() * 90000000000000000000), 10) }; -const initialPropertyValues = ['First name', 'Second name', 'Birthdate', 'Gender', 'National doctype', 'National doc id', 'National doc issue date', 'National doc expiry date']; +const initialPropertyValues = ['First name', 'Second name', 'Birthdate', 'Gender', 'National doctype', 'National doc ID', 'National doc issue date', 'National doc expiry date']; const Profile = observer (() => { const [sidebarOpen, setSidebarOpen] = useState(false); @@ -52,18 +52,24 @@ const Profile = observer (() => { ) }; - const closeHint = (element) => { + const selectHint = (element) => { changeAddedValues(element, 'label'); setPropertyValues([]); } + const closeHint = (eventTarget) => { + if (!eventTarget || eventTarget.tabIndex !== -1) { + setPropertyValues([]); + } + }; + const handleSelectedItems = (selectedItems) => { setSelectedItems([...selectedItems]); setUpdatedValues(userDataStore.decryptedData.filter(({ key }) => selectedItems.includes(key)) .map(elem => ( (!elem.seed) ? { ...elem, - seed: parseInt(Math.floor(Math.random() * 90000000000000000000), 10) + seed: String(Math.floor(Math.random() * 90000000000000000000), 10) }: elem))); if (selectedItems.length > 0) { setButtonPanelOpen(false); @@ -88,7 +94,7 @@ const Profile = observer (() => { const sendAddedData = () => { const checkingAddedData = !userDataStore.decryptedData - some((element) => element.label === addedValues.label) && (addedValues.seed.length === 20); + .some((element) => element.label === addedValues.label) && (addedValues.seed.length === 20); if (checkingAddedData) { setAddPanelOpen(false); setButtonPanelOpen(true); @@ -226,57 +232,55 @@ const Profile = observer (() => {
{/* Add panel */} -
-
-
- - handleInput(e.target.value, 'label')} - value={addedValues.label} - onClick={openHint} - onBlur={() => setPropertyValues([])} - /> -
0) || 'hidden'}`}> -
    - {propertyValues.map((element, index) => ( -
  • closeHint(element)}>{element}
  • - ))} -
-
-
-
- - setPropertyValues([])} - onChange={(e) => changeAddedValues(e.target.value, 'value')} - value={addedValues.value} - /> -
-
- - setPropertyValues([])} - onChange={(e) => changeAddedValues(e.target.value, 'seed')} - value={addedValues.seed} - /> -
+
+
+ + handleInput(e.target.value, 'label')} + value={addedValues.label} + onClick={openHint} + onBlur={(e) => closeHint(e.relatedTarget)} + /> +
0) || 'hidden'}`}> +
    + {propertyValues.map((element, index) => ( +
  • selectHint(element)}>{element}
  • + ))} +
+
-
+
+ + setPropertyValues([])} + onChange={(e) => changeAddedValues(e.target.value, 'value')} + value={addedValues.value} + /> +
+
+ + setPropertyValues([])} + onChange={(e) => changeAddedValues(e.target.value, 'seed')} + value={addedValues.seed} + /> +
+
Store data on blockchain
@@ -288,7 +292,7 @@ const Profile = observer (() => {
{/* Buttons */} -
+
) -} +}) export default Validate; diff --git a/src/pages/digitalId/ValidationLog.jsx b/src/pages/digitalId/ValidationLog.jsx index 75d24b2..8a17a68 100644 --- a/src/pages/digitalId/ValidationLog.jsx +++ b/src/pages/digitalId/ValidationLog.jsx @@ -1,115 +1,14 @@ -import React, { useState } from 'react'; +import React, {useState} from 'react'; import ValidateRoadMap from "../../partials/validationlog/ValidateRoadMap"; +import {validationLogStore} from "../../store/validationLogStore"; +import {observer} from "mobx-react-lite"; import Sidebar from '../../partials/Sidebar'; import Header from '../../partials/Header'; -import User05 from "../../images/user-28-05.jpg"; -import User08 from "../../images/user-28-08.jpg"; -import User09 from "../../images/user-28-09.jpg"; -import User06 from "../../images/user-28-06.jpg"; -import User03 from "../../images/user-28-03.jpg"; -import User01 from "../../images/user-28-01.jpg"; -function ValidationLog () { +const ValidationLog = observer(()=>{ const [sidebarOpen, setSidebarOpen] = useState(false); - const logItems = [ - { - id: '20', - name: 'Today', - data: '7234ABC342342352345', - usersImges: [ - { - size: 24, - img: User06, - imgId: "249" - }, - { - size: 24, - img: User08, - imgId: "212" - }, - { - size: 24, - img: User09, - imgId: "217" - }, - { - size: 24, - img: User05, - imgId: "276" - }, - ], - items: [ - { - dataSeason: '7234ABC342342352345', - id: '434', - text: 'Second name', - checked: true - }, - { - dataSeason: '7234ABC342342352345', - id: '476', - text: 'First name by', - checked: true - }, - { - dataSeason: '7234ABC342342352345', - id: '422', - text: 'Document name by', - checked: true - }, - ] - }, - { - id: '30', - name: 'Last Week', - data: '7234ABC342342352345', - usersImges: [ - { - size: 24, - img: User06, - imgId: "145" - }, - { - size: 24, - img: User08, - imgId: "182" - }, - { - size: 24, - img: User09, - imgId: "154" - }, - { - size: 24, - img: User05, - imgId: "114" - }, - ], - items: [ - { - dataSeason: '7234ABC342342352345', - id: '654', - text: 'Gender name by', - checked: true - }, - { - dataSeason: '7234ABC342342352345', - id: '617', - text: 'Second name Updated', - checked: false - }, - { - dataSeason: '7234ABC342342352345', - id: '643', - text: 'Gender name by', - checked: true - }, - ] - }, - ] - return (
{/* Sidebar */} @@ -129,61 +28,9 @@ function ValidationLog () {
{/* PostsID */} - {logItems.map(item => { - return + {validationLogStore.transactionData.map(item=>{ + return })} - {/* Post */} -
-
-
-

Even earlier

-
-
-
-
- {/* Avatars */} - -
·
-
-
- {/* List */} -
    - {/* List item */} -
  • -
    - - -

    Product V1 - Early Access

    -
    -
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
    -
  • - {/* List item */} -
  • -
    - -

    Web3 Compatibility

    -
    -
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
    -
  • -
-
-
-
@@ -191,6 +38,6 @@ function ValidationLog () {
) -} +}) export default ValidationLog; diff --git a/src/partials/validationlog/ValidateRoadMap.jsx b/src/partials/validationlog/ValidateRoadMap.jsx index bab0627..fdda6c0 100644 --- a/src/partials/validationlog/ValidateRoadMap.jsx +++ b/src/partials/validationlog/ValidateRoadMap.jsx @@ -1,7 +1,6 @@ import React from "react"; import ValidationSeasonItem from "./ValidationSeasonItem"; -import ValidationUsersImg from "./ValidationUsersImg"; function ValidateRoadMap({ season }) { @@ -9,25 +8,19 @@ function ValidateRoadMap({ season }) {
-

{season.name}

+

{''}

-
+
{/* Avatars */} -
- {season.usersImges.map(pic => { - return - })} -
-
·
{/* List */}
    {/* List item(s) */} - {season.items.map((item, index) => { - return + {season.assets.map((item, index) => { + return })}
diff --git a/src/partials/validationlog/ValidationSeasonItem.jsx b/src/partials/validationlog/ValidationSeasonItem.jsx index 430ca56..d8925d7 100644 --- a/src/partials/validationlog/ValidationSeasonItem.jsx +++ b/src/partials/validationlog/ValidationSeasonItem.jsx @@ -5,21 +5,21 @@ function ValidationSeasonItem({ length, item, index }) {
  • {length-1!==index && } -
    -
    {`0x${item.dataSeason}`}
    +
    {item.transaction_id}
    Transactions ID
    -
    {item.dataSeason}
    +
    {item.value}
    Validated data
    Explore -> diff --git a/src/store/store.js b/src/store/store.js index 92d8de7..c959a32 100644 --- a/src/store/store.js +++ b/src/store/store.js @@ -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)) diff --git a/src/store/validationLogStore.js b/src/store/validationLogStore.js new file mode 100644 index 0000000..0cb820e --- /dev/null +++ b/src/store/validationLogStore.js @@ -0,0 +1,39 @@ +import {makeAutoObservable, reaction} from "mobx"; +import {registrationStore} from "./store"; + +const labelMap = { + firstname: 'First name', + secondname: 'Second name', + gender: "Gender", + birthdate: "Birthdate" +}; + +class ValidationLogStore { + _transactionData = []; + + constructor() { + makeAutoObservable(this) + + reaction(() => ({data: registrationStore.transactionInfo}), ({data}) => { + this._transactionData = data.data; + }) + } + + get transactionData() { + return this._transactionData.map(item=>{ + return { + id: item.id, + assets: item.asset.features.map(asset=>{ + return { + transaction_id: item.id, + address: item.asset.recipientAddress, + value: asset.value, + label: labelMap[asset.label], + } + }) + } + }) + } +} + +export const validationLogStore = new ValidationLogStore() From bc364d1b855d1acb8834c65781e63c9803c63aee Mon Sep 17 00:00:00 2001 From: DwCay Date: Wed, 13 Jul 2022 14:30:11 +0300 Subject: [PATCH 4/6] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BD=D0=B5=D0=B9=D0=BC=D0=B8=D0=BD=D0=B3=20?= =?UTF-8?q?=D0=B2=20store=20=D0=B8=20transactionsStore.=20=D0=92=D0=BE?= =?UTF-8?q?=D0=B7=D0=B2=D1=80=D0=B0=D1=89=D0=B5=D0=BD=D1=8B=20=D0=B8=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D0=BA=D0=B8=20=D1=8E=D0=B7=D0=B5=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=20=D0=BD=D0=B0=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86?= =?UTF-8?q?=D1=83=20ValidationLog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/digitalId/Validate.jsx | 4 +- src/pages/digitalId/ValidationLog.jsx | 4 +- .../validationlog/ValidateRoadMap.jsx | 11 +++- .../validationlog/ValidationUsersImg.jsx | 5 +- src/store/store.js | 16 +++--- src/store/transactionsStore.js | 51 +++++++++++++++++++ 6 files changed, 75 insertions(+), 16 deletions(-) create mode 100644 src/store/transactionsStore.js diff --git a/src/pages/digitalId/Validate.jsx b/src/pages/digitalId/Validate.jsx index 5153e85..36ead06 100644 --- a/src/pages/digitalId/Validate.jsx +++ b/src/pages/digitalId/Validate.jsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import {observer} from "mobx-react-lite"; -import {validationLogStore} from "../../store/validationLogStore"; +import {transactionsStore} from "../../store/transactionsStore"; import Sidebar from '../../partials/Sidebar'; import Header from '../../partials/Header'; import ValidateTable from "../../partials/validate/ValidateTable"; @@ -58,7 +58,7 @@ const Validate = observer(()=>{

    Digital ID validation log ✨

    - {validationLogStore.transactionData.map(item => { + {transactionsStore.transactionsData.map(item => { return })}
    diff --git a/src/pages/digitalId/ValidationLog.jsx b/src/pages/digitalId/ValidationLog.jsx index 8a17a68..a1190b2 100644 --- a/src/pages/digitalId/ValidationLog.jsx +++ b/src/pages/digitalId/ValidationLog.jsx @@ -1,7 +1,7 @@ import React, {useState} from 'react'; import ValidateRoadMap from "../../partials/validationlog/ValidateRoadMap"; -import {validationLogStore} from "../../store/validationLogStore"; +import {transactionsStore} from "../../store/transactionsStore"; import {observer} from "mobx-react-lite"; import Sidebar from '../../partials/Sidebar'; import Header from '../../partials/Header'; @@ -28,7 +28,7 @@ const ValidationLog = observer(()=>{
    {/* PostsID */} - {validationLogStore.transactionData.map(item=>{ + {transactionsStore.transactionsData.map(item=>{ return })}
    diff --git a/src/partials/validationlog/ValidateRoadMap.jsx b/src/partials/validationlog/ValidateRoadMap.jsx index fdda6c0..c086b80 100644 --- a/src/partials/validationlog/ValidateRoadMap.jsx +++ b/src/partials/validationlog/ValidateRoadMap.jsx @@ -1,6 +1,7 @@ import React from "react"; import ValidationSeasonItem from "./ValidationSeasonItem"; +import ValidationUsersImg from "./ValidationUsersImg"; function ValidateRoadMap({ season }) { @@ -14,13 +15,19 @@ function ValidateRoadMap({ season }) {
    {/* Avatars */} +
    + {season.users_images.map(pic => { + return + })} +
    +
    ·
    {/* List */}
      {/* List item(s) */} - {season.assets.map((item, index) => { - return + {season.transaction.map((item, index) => { + return })}
    diff --git a/src/partials/validationlog/ValidationUsersImg.jsx b/src/partials/validationlog/ValidationUsersImg.jsx index 7f6b941..4b29d26 100644 --- a/src/partials/validationlog/ValidationUsersImg.jsx +++ b/src/partials/validationlog/ValidationUsersImg.jsx @@ -1,9 +1,10 @@ import React from "react"; function ValidationUsersImg({ image }) { + return ( - - {image.img} + + {image.image} ); } diff --git a/src/store/store.js b/src/store/store.js index c959a32..c9a084e 100644 --- a/src/store/store.js +++ b/src/store/store.js @@ -12,7 +12,7 @@ class Store { _userData = {} - _transactionInfo = {} + _transactionsInfo = {} constructor() { makeAutoObservable(this); @@ -20,7 +20,7 @@ class Store { this.fetchNodeInfo() reaction(() => this.tokenKey, () => this.fetchNewAccountData()) - reaction(() => this.tokenKey, () => this.fetchTransactionInfo()) + reaction(() => this.tokenKey, () => this.fetchTransactionsInfo()) }; fetchNewAccountData() { @@ -38,12 +38,12 @@ class Store { .then(()=>this.fetchNewAccountData()) } - fetchTransactionInfo() { + fetchTransactionsInfo() { 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)) + .then((res)=>this.saveInfoTransactions(res)) } userDataFetchChange(res) { @@ -54,8 +54,8 @@ class Store { return this._userData } - get transactionInfo() { - return this._transactionInfo + get transactionsInfo() { + return this._transactionsInfo } savePassPhrase(phrase) { @@ -66,8 +66,8 @@ class Store { this._accountData = data; }; - saveInfoTransaction(transaction) { - this._transactionInfo = transaction + saveInfoTransactions(transaction) { + this._transactionsInfo = transaction } fetchNodeInfo() { diff --git a/src/store/transactionsStore.js b/src/store/transactionsStore.js new file mode 100644 index 0000000..a14ad80 --- /dev/null +++ b/src/store/transactionsStore.js @@ -0,0 +1,51 @@ +import {makeAutoObservable, reaction} from "mobx"; +import {registrationStore} from "./store"; +import User05 from "../../src/images/user-28-05.jpg"; +import User08 from "../../src/images/user-28-08.jpg"; +import User09 from "../../src/images/user-28-09.jpg"; +import User06 from "../../src/images/user-28-06.jpg"; + +const labelMap = { + firstname: 'First name', + secondname: 'Second name', + gender: "Gender", + birthdate: "Birthdate" +}; + +const usersImages = [User08,User06,User05,User09]; + +class TransactionsStore { + _transactionsData = []; + + constructor() { + makeAutoObservable(this) + + reaction(() => ({data: registrationStore.transactionsInfo}), ({data}) => { + this._transactionsData = data.data; + }) + } + + get transactionsData() { + return this._transactionsData.map(item=>{ + return { + id: item.id, + users_images: usersImages.map(image=>{ + return { + image: image, + size: 24 + } + }), + transaction: item.asset.features.map(asset=>{ + return { + transaction_id: item.id, + address: item.asset.recipientAddress, + value: asset.value, + label: labelMap[asset.label], + } + }) + } + }) + } +} + +export const transactionsStore = new TransactionsStore() From 5eb4ee16c0f05c51a6e54efba29844f769090fcd Mon Sep 17 00:00:00 2001 From: DwCay Date: Wed, 13 Jul 2022 14:31:27 +0300 Subject: [PATCH 5/6] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=20Vali?= =?UTF-8?q?dationLogStore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/validationLogStore.js | 39 --------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 src/store/validationLogStore.js diff --git a/src/store/validationLogStore.js b/src/store/validationLogStore.js deleted file mode 100644 index 0cb820e..0000000 --- a/src/store/validationLogStore.js +++ /dev/null @@ -1,39 +0,0 @@ -import {makeAutoObservable, reaction} from "mobx"; -import {registrationStore} from "./store"; - -const labelMap = { - firstname: 'First name', - secondname: 'Second name', - gender: "Gender", - birthdate: "Birthdate" -}; - -class ValidationLogStore { - _transactionData = []; - - constructor() { - makeAutoObservable(this) - - reaction(() => ({data: registrationStore.transactionInfo}), ({data}) => { - this._transactionData = data.data; - }) - } - - get transactionData() { - return this._transactionData.map(item=>{ - return { - id: item.id, - assets: item.asset.features.map(asset=>{ - return { - transaction_id: item.id, - address: item.asset.recipientAddress, - value: asset.value, - label: labelMap[asset.label], - } - }) - } - }) - } -} - -export const validationLogStore = new ValidationLogStore() From 9820692cd9ddac1091837e2ad9b81ab851b656d2 Mon Sep 17 00:00:00 2001 From: DwCay Date: Wed, 13 Jul 2022 15:39:20 +0300 Subject: [PATCH 6/6] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=B0=D0=B4=D1=80=D0=B5=D1=81=D1=81=20=D0=B0=D0=BA?= =?UTF-8?q?=D0=BA=D0=B0=D1=83=D0=BD=D1=82=D0=B0=20=D1=81=D0=BE=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D1=88=D0=B8=D0=B2=D1=88=D0=B5=D0=B3=D0=BE=20=D1=82=D1=80?= =?UTF-8?q?=D0=B0=D0=BD=D0=B7=D0=B0=D0=BA=D1=86=D0=B8=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/store.js | 6 +++++- src/store/transactionsStore.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/store/store.js b/src/store/store.js index c9a084e..82b1c69 100644 --- a/src/store/store.js +++ b/src/store/store.js @@ -39,13 +39,17 @@ class Store { } fetchTransactionsInfo() { - fetchWrapper.getAuth(`http://3.125.47.101/api/account/transactions/b444b7ff3118cf2a30cbd54cfcdb8fd5d805017a?moduleID=1001&assetID=11`, { + 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) { this._userData = res; } diff --git a/src/store/transactionsStore.js b/src/store/transactionsStore.js index a14ad80..e2c6f9a 100644 --- a/src/store/transactionsStore.js +++ b/src/store/transactionsStore.js @@ -38,7 +38,7 @@ class TransactionsStore { transaction: item.asset.features.map(asset=>{ return { transaction_id: item.id, - address: item.asset.recipientAddress, + address: registrationStore.accountMadeTransaction, value: asset.value, label: labelMap[asset.label], }