Skip to content

Commit

Permalink
fix: argent mobile chainId
Browse files Browse the repository at this point in the history
  • Loading branch information
bluecco committed Oct 6, 2023
1 parent ac2db3e commit 475d3c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/connectors/argentMobile/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
}
Expand Down
6 changes: 2 additions & 4 deletions src/connectors/argentMobile/modal/starknet/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
}
Expand Down

0 comments on commit 475d3c1

Please sign in to comment.