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 (
|
||||
transactions: Event[]
|
||||
): Promise<WalletTransaction[]> => {
|
||||
const txs = [];
|
||||
|
||||
for (const transaction of transactions) {
|
||||
const txs = await Promise.all(
|
||||
transactions.map(async (transaction) => {
|
||||
const tx: WalletTransaction = {
|
||||
token: transaction.args?.token ? transaction.args?.token : "",
|
||||
blockNumber: transaction.blockNumber ? transaction.blockNumber : -1,
|
||||
@ -82,8 +81,10 @@ const filterLockStatus = async (
|
||||
? transaction.transactionHash
|
||||
: "",
|
||||
};
|
||||
txs.push(tx);
|
||||
}
|
||||
|
||||
return tx;
|
||||
})
|
||||
);
|
||||
|
||||
return txs;
|
||||
};
|
||||
|
@ -118,7 +118,9 @@ onClickOutside(infoMenuRef, () => {
|
||||
:to="'/faq'"
|
||||
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
|
||||
</span>
|
||||
</RouterLink>
|
||||
|
Loading…
x
Reference in New Issue
Block a user