diff --git a/apps/minifront/package.json b/apps/minifront/package.json index bb8c8ec70..61c17c704 100644 --- a/apps/minifront/package.json +++ b/apps/minifront/package.json @@ -5,7 +5,7 @@ "license": "(MIT OR Apache-2.0)", "type": "module", "scripts": { - "build": "vite build", + "build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build", "clean": "rm -rfv dist *.tsbuildinfo", "dev:app": "vite --port 5173", "lint": "eslint src", @@ -68,6 +68,7 @@ "@types/react": "^18.3.2", "@types/react-dom": "^18.3.0", "@types/react-helmet": "^6.1.11", + "cross-env": "^7.0.3", "vite": "^5.2.11", "vitest": "^1.6.0" } diff --git a/apps/minifront/src/components/ibc/deposit-manual/asset-utils.test.ts b/apps/minifront/src/components/ibc/deposit-manual/asset-utils.test.ts index 57d57b641..afd607547 100644 --- a/apps/minifront/src/components/ibc/deposit-manual/asset-utils.test.ts +++ b/apps/minifront/src/components/ibc/deposit-manual/asset-utils.test.ts @@ -2,10 +2,11 @@ import { describe, expect, test } from 'vitest'; import { fromDisplayAmount, toDisplayAmount } from './asset-utils'; import { bigNumConfig } from '@penumbra-zone/types/lo-hi'; import { BigNumber } from 'bignumber.js'; +import { Asset } from '@chain-registry/types'; BigNumber.config(bigNumConfig); -const osmoMetadata = { +const osmoMetadata: Asset = { denom_units: [ { denom: 'osmo', exponent: 6 }, { denom: 'uosmo', exponent: 0 }, @@ -14,9 +15,10 @@ const osmoMetadata = { name: 'Osmosis', display: 'osmo', symbol: 'OSMO', + type_asset: 'sdk.coin', }; -const usdyMetadata = { +const usdyMetadata: Asset = { denom_units: [ { denom: 'ausdy', @@ -32,6 +34,7 @@ const usdyMetadata = { display: 'usdy', name: 'Ondo US Dollar Yield', symbol: 'USDY', + type_asset: 'sdk.coin', }; describe('toDisplayAmount', () => { @@ -81,12 +84,13 @@ describe('fromDisplayAmount', () => { }); test('defaults base exponent to zero when base exponent not found in denom units array', () => { - const noExponentForBase = { + const noExponentForBase: Asset = { denom_units: [{ denom: 'osmo', exponent: 6 }], base: 'uosmo', name: 'Osmosis', display: 'osmo', symbol: 'OSMO', + type_asset: 'sdk.coin', }; const result = fromDisplayAmount(noExponentForBase, 'osmo', '100'); expect(result).toEqual({ denom: 'uosmo', amount: '100000000' }); diff --git a/apps/minifront/src/components/ibc/deposit-manual/chain-dropdown.tsx b/apps/minifront/src/components/ibc/deposit-manual/chain-dropdown.tsx index 0edfb0511..01ca25519 100644 --- a/apps/minifront/src/components/ibc/deposit-manual/chain-dropdown.tsx +++ b/apps/minifront/src/components/ibc/deposit-manual/chain-dropdown.tsx @@ -38,7 +38,7 @@ const useChainInfos = (): ChainInfo[] => { return { chainName: r.name, - label: r.chain.pretty_name, + label: r.chain.pretty_name ?? '', icon: getChainLogo(r.name), chainId: r.chain.chain_id, }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d76409f06..9fe20ec78 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -312,6 +312,9 @@ importers: '@types/react-helmet': specifier: ^6.1.11 version: 6.1.11 + cross-env: + specifier: ^7.0.3 + version: 7.0.3 vite: specifier: ^5.2.11 version: 5.3.3(@types/node@22.10.2)(terser@5.37.0) @@ -7547,6 +7550,11 @@ packages: create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + cross-env@7.0.3: + resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} + engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} + hasBin: true + cross-fetch@3.1.8: resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} @@ -23697,6 +23705,10 @@ snapshots: create-require@1.1.1: {} + cross-env@7.0.3: + dependencies: + cross-spawn: 7.0.3 + cross-fetch@3.1.8: dependencies: node-fetch: 2.7.0