Skip to content

Commit 366a8a4

Browse files
committed
removes extra logs + rename
1 parent c70dc9b commit 366a8a4

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

demo/nextjs-ssr-app/app/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import "./globals.css";
33
import { Inter } from "next/font/google";
44

55
import Provider from "@/components/provider";
6-
import { cookieToInitialState } from "@web3auth/modal";
6+
import { cookieToWeb3AuthState } from "@web3auth/modal";
77
import { headers } from "next/headers";
88

99
const inter = Inter({ subsets: ["latin"] });
@@ -14,7 +14,7 @@ export const metadata = {
1414
};
1515

1616
export default function RootLayout({ children }: { children: React.ReactNode }) {
17-
const initialState = cookieToInitialState((headers()).get('cookie'))
17+
const initialState = cookieToWeb3AuthState((headers()).get('cookie'))
1818
console.log("initialState", initialState)
1919
return (
2020
<html lang="en">

demo/vue-app-new/src/components/AppDashboard.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,15 +316,14 @@ const canSwitchChainNamespace = computed(() => {
316316
});
317317
318318
const onSwitchChain = async () => {
319-
log.info("switching chain", currentChainId.value);
319+
log.info("switching chain");
320320
try {
321321
const { chainId } = provider.value as IProvider;
322322
if (chainId !== currentChainId.value) throw new Error("chainId does not match current chainId");
323323
324324
const currentNamespace = currentChainNamespace.value;
325325
const newChain = props.chains.find((x) => x.chainNamespace === currentNamespace && x.chainId !== chainId);
326326
if (!newChain) throw new Error(`Please configure at least 2 chains for ${currentNamespace} in the config`);
327-
console.log("newChain", newChain.chainId);
328327
const data = await switchChainAsync({ chainId: Number(newChain.chainId) });
329328
printToConsole("switchedChain", { chainId: data.id });
330329
} catch (error) {

packages/no-modal/src/base/cookie.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const cookieStorage = (options?: { expiry?: number }) =>
2525
},
2626
}) satisfies IStorage;
2727

28-
export function cookieToInitialState(cookie?: string | null) {
28+
export function cookieToWeb3AuthState(cookie?: string | null) {
2929
if (!cookie) return undefined;
3030
const parsed = parseCookie(cookie, WEB3AUTH_STATE_STORAGE_KEY);
3131
if (!parsed) return undefined;

packages/no-modal/src/base/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export * from "./chain/IChainInterface";
22
export * from "./composables";
33
export * from "./connector";
44
export * from "./constants";
5-
export { cookieToInitialState } from "./cookie";
5+
export { cookieToWeb3AuthState } from "./cookie";
66
export * from "./core/IWeb3Auth";
77
export * from "./errors";
88
export * from "./hooks";

0 commit comments

Comments
 (0)