From 475d3c188d1d365134208634553e85460d8e7479 Mon Sep 17 00:00:00 2001 From: bluecco Date: Fri, 6 Oct 2023 13:29:27 +0200 Subject: [PATCH] fix: argent mobile chainId --- src/connectors/argentMobile/index.ts | 3 ++- src/connectors/argentMobile/modal/starknet/adapter.ts | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/connectors/argentMobile/index.ts b/src/connectors/argentMobile/index.ts index bc308f0..395e78c 100644 --- a/src/connectors/argentMobile/index.ts +++ b/src/connectors/argentMobile/index.ts @@ -3,6 +3,7 @@ import type { StarknetWindowObject, } from "get-starknet-core" import type { AccountInterface } from "starknet" +import { constants } from "starknet" import { DEFAULT_PROJECT_ID } from "../../constants" import { ConnectorNotConnectedError, @@ -15,7 +16,7 @@ import { Connector } from "../connector" export interface ArgentMobileConnectorOptions { dappName?: string projectId?: string - chainId?: "SN_GOERLI" | "SN_GOERLI2" | "SN_MAINNET" + chainId?: constants.NetworkName description?: string url?: string } diff --git a/src/connectors/argentMobile/modal/starknet/adapter.ts b/src/connectors/argentMobile/modal/starknet/adapter.ts index 4abd346..f16d7d9 100644 --- a/src/connectors/argentMobile/modal/starknet/adapter.ts +++ b/src/connectors/argentMobile/modal/starknet/adapter.ts @@ -102,11 +102,9 @@ export class StarknetAdapter if (chainId === "SN_GOERLI") { return constants.NetworkName.SN_GOERLI } - if (chainId === "SN_GOERLI2") { - return constants.NetworkName.SN_GOERLI - } + if (chainId === "SN_MAIN") { - return constants.NetworkName.SN_GOERLI + return constants.NetworkName.SN_MAIN } throw new Error(`Unknown starknet.js network name for chainId ${chainId}`) }