change from for of iterator to javascript map
This commit is contained in:
parent
94640c4492
commit
189d4e0f33
@ -62,9 +62,8 @@ const getLockStatus = async (id: [BigNumber]): Promise<number> => {
|
|||||||
const filterLockStatus = async (
|
const filterLockStatus = async (
|
||||||
transactions: Event[]
|
transactions: Event[]
|
||||||
): Promise<WalletTransaction[]> => {
|
): Promise<WalletTransaction[]> => {
|
||||||
const txs = [];
|
const txs = await Promise.all(
|
||||||
|
transactions.map(async (transaction) => {
|
||||||
for (const transaction of transactions) {
|
|
||||||
const tx: WalletTransaction = {
|
const tx: WalletTransaction = {
|
||||||
token: transaction.args?.token ? transaction.args?.token : "",
|
token: transaction.args?.token ? transaction.args?.token : "",
|
||||||
blockNumber: transaction.blockNumber ? transaction.blockNumber : -1,
|
blockNumber: transaction.blockNumber ? transaction.blockNumber : -1,
|
||||||
@ -82,8 +81,10 @@ const filterLockStatus = async (
|
|||||||
? transaction.transactionHash
|
? transaction.transactionHash
|
||||||
: "",
|
: "",
|
||||||
};
|
};
|
||||||
txs.push(tx);
|
|
||||||
}
|
return tx;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
return txs;
|
return txs;
|
||||||
};
|
};
|
||||||
|
@ -118,7 +118,9 @@ onClickOutside(infoMenuRef, () => {
|
|||||||
:to="'/faq'"
|
:to="'/faq'"
|
||||||
class="menu-button gap-2 px-4 rounded-md cursor-pointer"
|
class="menu-button gap-2 px-4 rounded-md cursor-pointer"
|
||||||
>
|
>
|
||||||
<span class="text-gray-900 py-4 text-end font-semibold text-sm whitespace-nowrap">
|
<span
|
||||||
|
class="text-gray-900 py-4 text-end font-semibold text-sm whitespace-nowrap"
|
||||||
|
>
|
||||||
Perguntas frequentes
|
Perguntas frequentes
|
||||||
</span>
|
</span>
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user