Skip to content

Commit

Permalink
fix(bridge-ui): fix svelte-check failures
Browse files Browse the repository at this point in the history
  • Loading branch information
dionysuzx committed Jul 10, 2023
1 parent 192aab5 commit 524b131
Show file tree
Hide file tree
Showing 4 changed files with 632 additions and 373 deletions.
2 changes: 1 addition & 1 deletion packages/bridge-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@types/debug": "^4.1.7",
"@types/eslint": "^8.2.1",
"@types/estree": "^0.0.50",
"@types/jest": "^27.0.2",
"@types/jest": "^27.5.2",
"@types/mixpanel": "^2.14.3",
"@types/sanitize-html": "^2.6.2",
"@typescript-eslint/eslint-plugin": "^5.16.0",
Expand Down
14 changes: 8 additions & 6 deletions packages/bridge-ui/src/utils/toBigNumber.spec.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { BigNumber } from "ethers";

import { toBigNumber } from "./toBigNumber";
import { toBigNumber } from './toBigNumber';

describe('toBigNumber', () => {
it('should handle different notation for big ints', () => {
expect(toBigNumber('1000000000000000000000').toString()).toEqual('1000000000000000000000');
expect(toBigNumber(2e+21).toString()).toEqual('2000000000000000000000');
expect(toBigNumber('1000000000000000000000').toString()).toEqual(
'1000000000000000000000',
);
expect(toBigNumber(2e21).toString()).toEqual('2000000000000000000000');
expect(toBigNumber(3e21).toString()).toEqual('3000000000000000000000');
expect(toBigNumber(1000).toString()).toEqual('1000');

// Number.MAX_SAFE_INTEGER = 9007199254740991. Maximum safe integer (2^53 – 1)
expect(toBigNumber(BigInt(Number.MAX_SAFE_INTEGER) * 3n).toString()).toEqual('27021597764222973');
expect(
toBigNumber(BigInt(Number.MAX_SAFE_INTEGER) * 3n).toString(),
).toEqual('27021597764222973');
});
});
6 changes: 4 additions & 2 deletions packages/bridge-ui/src/wagmi/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ export const client = createClient({
// @ts-ignore
// '--wcm-color-fg-1': '#E81899',
'--wcm-accent-color': '#E81899',
}
}
},
chainImages: [],
tokenImages: []
},
},
}),
new CoinbaseWalletConnector({
Expand Down
Loading

0 comments on commit 524b131

Please sign in to comment.