Skip to content

Commit

Permalink
chore: remove unnecessary undefined pass
Browse files Browse the repository at this point in the history
  • Loading branch information
ice-chillios committed Feb 19, 2025
1 parent bbe6944 commit 81148e1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"bitcoincash",
"bitcoincashjs",
"bitcoinjs",
"bitget",
"blakejs",
"blockchair",
"Chunkv",
Expand All @@ -49,6 +50,7 @@
"Pancakeswapeth",
"Pathv",
"pino",
"polkadotjs",
"privkey",
"Ripemd",
"Stargatearb",
Expand Down
11 changes: 3 additions & 8 deletions packages/toolboxes/src/substrate/toolbox/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Chain, SwapKitNumber } from "@swapkit/helpers";
import { AssetValue, Chain } from "@swapkit/helpers";

import { ToolboxFactory, type ToolboxParams } from "./baseSubstrateToolbox";

Expand All @@ -10,16 +10,11 @@ export const ChainflipToolbox = async ({ signer, generic = false }: ToolboxParam
const toolbox = await ToolboxFactory({ chain: Chain.Chainflip, generic, signer });

async function getBalance(address: string) {
const { api, gasAsset } = toolbox;
// @ts-expect-error @Towan some parts of data missing?
// biome-ignore lint/correctness/noUnsafeOptionalChaining: @Towan some parts of data missing?
const { balance } = await api.query.flip?.account?.(address);
const { balance } = await toolbox.api.query.flip?.account?.(address);

return [
toolbox.gasAsset.set(
SwapKitNumber.fromBigInt(BigInt(balance.toString()), gasAsset.decimal).getValue("string"),
),
];
return [AssetValue.from({ chain: Chain.Chainflip, value: BigInt(balance.toString()) })];
}

return { ...toolbox, getBalance };
Expand Down
1 change: 0 additions & 1 deletion packages/wallets/src/evm-extensions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export const getWeb3WalletMethods = async ({

export const evmWallet = createWallet({
name: "connectEVMWallet",
walletType: undefined,
supportedChains: [...EVMChains] as EVMChain[],
connect: ({ addChain, supportedChains }) =>
async function connectEVMWallet(
Expand Down
1 change: 0 additions & 1 deletion packages/wallets/src/keplr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const keplrSupportedChainIds = [ChainId.Cosmos, ChainId.Kujira, ChainId.THORChai

export const keplrWallet = createWallet({
name: "connectKeplr",
walletType: undefined,
supportedChains: [Chain.Cosmos, Chain.Kujira, Chain.THORChain],
connect: ({ addChain, supportedChains }) =>
async function connectKeplr(
Expand Down

0 comments on commit 81148e1

Please sign in to comment.