Skip to content

Commit

Permalink
Merge pull request #296 from terra-money/fix/osmosis-api-fail
Browse files Browse the repository at this point in the history
fix: osmosis api
  • Loading branch information
mwmerz authored Dec 5, 2023
2 parents 9597d0b + 3c71b1d commit b11972d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand Down
14 changes: 9 additions & 5 deletions src/data/external/osmosis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,15 @@ export const useGammTokens = () => {
const gammTokens = new Map<string, string>()

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")
}
}
}

Expand Down

0 comments on commit b11972d

Please sign in to comment.