From 4e785ba4931d0db31f586d624b1a8c628a510e7d Mon Sep 17 00:00:00 2001 From: devtealeaf Date: Sat, 2 Nov 2024 00:32:03 +0200 Subject: [PATCH] upd: AppStore fix --- package.json | 2 +- src/layouts/AppStore.tsx | 15 +++++++++------ tests/e2e/vaults.test.ts | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index e54c4da..3a72d0e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "stability-ui", "type": "module", - "version": "0.13.14-alpha", + "version": "0.13.15-alpha", "scripts": { "dev": "astro dev", "start": "astro dev", diff --git a/src/layouts/AppStore.tsx b/src/layouts/AppStore.tsx index cf5b222..73bde6c 100644 --- a/src/layouts/AppStore.tsx +++ b/src/layouts/AppStore.tsx @@ -572,6 +572,7 @@ const AppStore = (props: React.PropsWithChildren): JSX.Element => { }, Promise.resolve({}) ); + localVaults[chainID] = APIVaults; }; @@ -676,12 +677,14 @@ const AppStore = (props: React.PropsWithChildren): JSX.Element => { const vaultsPromise = await Promise.all( contractVaults[0].map( async (vault: string, index: number) => { - return { - [vault.toLowerCase()]: { - ...localVaults[chain.id][vault.toLowerCase()], - balance: contractBalance[5][index], - }, - }; + if (localVaults[chain.id][vault.toLowerCase()]) { + return { + [vault.toLowerCase()]: { + ...localVaults[chain.id][vault.toLowerCase()], + balance: contractBalance[5][index], + }, + }; + } } ) ); diff --git a/tests/e2e/vaults.test.ts b/tests/e2e/vaults.test.ts index 735c8d9..1784b30 100644 --- a/tests/e2e/vaults.test.ts +++ b/tests/e2e/vaults.test.ts @@ -43,8 +43,8 @@ const STRATEGIES: string[] = [ "IRMF", "CCF", "GQMF", - "GRMF", "TPF", + "GRMF", ]; const SORT_CASES = [