Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
grod220 committed Dec 11, 2024
1 parent 4d17b86 commit e58f381
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
3 changes: 2 additions & 1 deletion apps/minifront/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand All @@ -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',
Expand All @@ -32,6 +34,7 @@ const usdyMetadata = {
display: 'usdy',
name: 'Ondo US Dollar Yield',
symbol: 'USDY',
type_asset: 'sdk.coin',
};

describe('toDisplayAmount', () => {
Expand Down Expand Up @@ -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' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
12 changes: 12 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e58f381

Please sign in to comment.