From 5eb4ee16c0f05c51a6e54efba29844f769090fcd Mon Sep 17 00:00:00 2001 From: DwCay Date: Wed, 13 Jul 2022 14:31:27 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=20Validati?= =?UTF-8?q?onLogStore?= 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()