Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bridge-ui): fix svelte-check failures #14137

Merged
merged 1 commit into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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