Skip to content

Commit e65787f

Browse files
authored
feat(entrykit): clean up (#3434)
1 parent 7409095 commit e65787f

3 files changed

Lines changed: 3 additions & 14 deletions

File tree

packages/entrykit/src/EntryKitConfigProvider.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ import { RainbowKitProvider, lightTheme, midnightTheme } from "@rainbow-me/rainb
44
import { EntryKitConfig } from "./config/output";
55
import { Chain } from "viem";
66
import { useChains } from "wagmi";
7-
import { Paymaster, getPaymaster } from "./getPaymaster";
87

98
type ContextValue = EntryKitConfig & {
109
chain: Chain;
11-
paymaster: Paymaster | undefined;
1210
};
1311

1412
/** @internal */
@@ -29,8 +27,6 @@ export function EntryKitConfigProvider({ config, children }: Props) {
2927
const chain = chains.find(({ id }) => id === config.chainId);
3028
if (!chain) throw new Error(`Could not find configured chain for chain ID ${config.chainId}.`);
3129

32-
const paymaster = getPaymaster(chain);
33-
3430
return (
3531
<RainbowKitProvider
3632
// Prevent RainbowKit/Wagmi trying to switch chains after connection
@@ -52,7 +48,7 @@ export function EntryKitConfigProvider({ config, children }: Props) {
5248
}
5349
}
5450
>
55-
<Context.Provider value={{ ...config, chain, paymaster }}>{children}</Context.Provider>
51+
<Context.Provider value={{ ...config, chain }}>{children}</Context.Provider>
5652
</RainbowKitProvider>
5753
);
5854
}

packages/entrykit/src/createWagmiConfig.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Chain, Transport } from "viem";
2-
import { WalletList, connectorsForWallets, getDefaultWallets } from "@rainbow-me/rainbowkit";
2+
import { connectorsForWallets } from "@rainbow-me/rainbowkit";
33
import { Config, CreateConfigParameters, createConfig } from "wagmi";
44

55
export type CreateWagmiConfigOptions<
@@ -21,12 +21,7 @@ export function createWagmiConfig<
2121
const chains extends readonly [Chain, ...Chain[]],
2222
transports extends Record<chains[number]["id"], Transport>,
2323
>(config: CreateWagmiConfigOptions<chains, transports>): Config<chains, transports> {
24-
const { wallets: defaultWallets } = getDefaultWallets();
25-
const wallets: WalletList = [
26-
// TODO: passkey wallet
27-
...defaultWallets,
28-
];
29-
24+
const wallets = getWallets();
3025
const connectors = connectorsForWallets(wallets, {
3126
appName: config.appName,
3227
projectId: config.walletConnectProjectId,
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export async function signCall<chain extends Chain = Chain>({
2424
nonce: initialNonce,
2525
client,
2626
}: SignCallOptions<chain>) {
27-
console.log("getting nonce", worldAddress);
2827
const nonce =
2928
initialNonce ??
3029
(client
@@ -37,7 +36,6 @@ export async function signCall<chain extends Chain = Chain>({
3736
})
3837
).nonce
3938
: 0n);
40-
console.log("got nonce", nonce);
4139

4240
const { namespace: systemNamespace, name: systemName } = hexToResource(systemId);
4341

0 commit comments

Comments
 (0)