Change methods for new transactions data
This commit is contained in:
@@ -11,7 +11,7 @@ function ValidateRoadMap({ season }) {
|
||||
<div className="w-32 shrink-0">
|
||||
<h2 className="text-xl leading-snug font-bold text-slate-800 xl:leading-7 mb-4 xl:mb-0">{''}</h2>
|
||||
</div>
|
||||
<div className="grow pb-6">
|
||||
<div className="grow pb-6 border-b border-slate-200">
|
||||
<header>
|
||||
<div className="flex flex-nowrap items-center space-x-2 mb-6">
|
||||
{/* Avatars */}
|
||||
|
||||
@@ -5,13 +5,13 @@ function ValidationSeasonItem({ length, item, index }) {
|
||||
<li className="relative pt-2 pb-2.5">
|
||||
<div className="flex items-center mb-2.5">
|
||||
{length-1!==index && <div className="absolute left-0 h-full w-0.5 bg-slate-200 self-start ml-2.5 -translate-x-1/2 translate-y-3" aria-hidden="true"></div>}
|
||||
<div className="absolute left-0 rounded-full bg-indigo-500" aria-hidden="true">
|
||||
<div className={`${item.address ? "bg-indigo-500" : "bg-[#FF0000]"} absolute left-0 rounded-full`} aria-hidden="true">
|
||||
<svg className="w-5 h-5 fill-current text-white" viewBox="0 0 20 20">
|
||||
<path d="M14.4 8.4L13 7l-4 4-2-2-1.4 1.4L9 13.8z"/>
|
||||
{item.address && <path d="M14.4 8.4L13 7l-4 4-2-2-1.4 1.4L9 13.8z"/>}
|
||||
</svg>
|
||||
</div>
|
||||
<h3 className="text-lg font-bold text-slate-800 pl-9">
|
||||
{`${item.label} by`} <a className="cursor-pointer font-bold text-indigo-500 hover:text-indigo-600 underline hover:no-underline" >{item.address}</a>
|
||||
{`${item.label} ${item.address ? "by" : "Updated"}`} <a className="cursor-pointer font-bold text-indigo-500 hover:text-indigo-600 underline hover:no-underline" >{item.address}</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div className="block text-slate-800 w-fit pl-9">
|
||||
@@ -20,7 +20,7 @@ function ValidationSeasonItem({ length, item, index }) {
|
||||
</div>
|
||||
<div className="mb-3.5 block text-slate-800 w-fit pl-9">
|
||||
<div className="text-base font-semibold underline mb-[-10px]">{item.value}</div>
|
||||
<span className="font-normal text-slate-600 text-[10px]">Validated data</span>
|
||||
<span className="font-normal text-slate-600 text-[10px]">{item.address ? "Validated data" : "Updated data"}</span>
|
||||
</div>
|
||||
<a className="cursor-pointer pl-9 font-normal text-sm text-indigo-500 hover:text-indigo-600">Explore -></a>
|
||||
</li>
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user