Skip to content

Commit

Permalink
fix publicent error
Browse files Browse the repository at this point in the history
  • Loading branch information
MickWang committed Apr 24, 2024
1 parent 60d1189 commit 0a96560
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion composables/zksync/useTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { useOnboardStore } from "@/store/onboard";
import { useZkSyncWalletStore } from "@/store/zksync/wallet";
import { formatError } from "@/utils/formatters";
import { sleep } from "@/utils/helpers";
import { NOVA_CHAIN_ID } from "@/utils/constants";

type TransactionParams = {
type: "transfer" | "withdrawal";
Expand All @@ -33,7 +34,7 @@ export default (getSigner: () => Promise<Signer | undefined>, getProvider: () =>
const transactionHash = ref<string | undefined>();
const eraWalletStore = useZkSyncWalletStore();
const onboardStore = useOnboardStore();
const publicClient = onboardStore.getPublicClient(onboardStore.network.chainId);
const publicClient = onboardStore.getPublicClient(NOVA_CHAIN_ID);

const retrieveBridgeAddresses = useMemoize(() => getProvider().getDefaultBridgeAddresses());
const { validateAddress } = useScreening();
Expand Down
4 changes: 3 additions & 1 deletion utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { WITHDRAWAL_DELAY } from './../store/zksync/transactionStatus';
import { WITHDRAWAL_DELAY } from "./../store/zksync/transactionStatus";
import type { Token } from "@/types";

export const ETH_TOKEN: Token = {
Expand All @@ -10,6 +10,8 @@ export const ETH_TOKEN: Token = {
iconUrl: "/img/eth.svg",
};

export const NOVA_CHAIN_ID = process.env.NODE_TYPE === "nexus" ? 810180 : 810181;

export const WITHDRAWAL_DELAY_DAYS = 14;

export const MERGE_TOKENS = [
Expand Down

0 comments on commit 0a96560

Please sign in to comment.