From 3c71b1db554dcb1f0b95373795d22089b471a0cf Mon Sep 17 00:00:00 2001 From: Michael Merz Date: Tue, 5 Dec 2023 12:30:50 -0500 Subject: [PATCH] fix: osmosis api --- package.json | 2 +- public/manifest.json | 4 ++-- src/data/external/osmosis.ts | 14 +++++++++----- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index a03a03f17..a587a823b 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "repository": "github:terra-money/station", "license": "MIT", "scripts": { - "start": "react-scripts start", + "start": "npm run fix-extension-polyfills && react-scripts start", "build-scripts": "webpack --config scripts/webpack.config.js", "build": "cross-env react-app-rewired build && npm run build-scripts", "test": "react-scripts test", diff --git a/public/manifest.json b/public/manifest.json index 3b4b933ce..b6ad89faf 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,8 +1,8 @@ { "manifest_version": 3, "name": "Station Wallet", - "version": "7.4.11", - "version_name": "7.4.11", + "version": "7.4.12", + "version_name": "7.4.12", "background": { "service_worker": "background.js" }, diff --git a/src/data/external/osmosis.ts b/src/data/external/osmosis.ts index 3a5b18a9f..539c85240 100644 --- a/src/data/external/osmosis.ts +++ b/src/data/external/osmosis.ts @@ -64,11 +64,15 @@ export const useGammTokens = () => { const gammTokens = new Map() if (fetch.data) { - for (const [poolId, poolAsset] of Object.entries(fetch.data) ?? {}) { - gammTokens.set( - "gamm/pool/" + poolId, - poolAsset.map((asset) => asset.symbol).join("-") + " LP" - ) + for (const [poolId, poolAsset] of Object.entries(fetch.data)) { + if (Array.isArray(poolAsset)) { + gammTokens.set( + "gamm/pool/" + poolId, + poolAsset.map((asset) => asset.symbol).join("-") + " LP" + ) + } else { + console.error("Invalid API response format") + } } }