Skip to content

Commit

Permalink
Merge pull request #1 from argentlabs/fix/argent-mobile-chainId
Browse files Browse the repository at this point in the history
fix: argent mobile chainId
  • Loading branch information
gergold authored Oct 6, 2023
2 parents ac2db3e + 475d3c1 commit 77a1fb6
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 77a1fb6

Please sign in to comment.