Skip to content

Commit

Permalink
fix: use rpc public urls for mobile connector
Browse files Browse the repository at this point in the history
  • Loading branch information
bluecco committed Jan 19, 2024
1 parent c3a5169 commit d0d150f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/connectors/argentMobile/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
} from "../connector"
import type { StarknetAdapter } from "./modal/starknet/adapter"
import { removeStarknetLastConnectedWallet } from "../../helpers/lastConnected"
import { RPC_NODE_URL_MAINNET, RPC_NODE_URL_TESTNET } from "./constants"
import { getRandomPublicRPCNode } from "../../helpers/publicRcpNodes"

export interface ArgentMobileConnectorOptions {
dappName?: string
Expand Down Expand Up @@ -162,11 +162,12 @@ export class ArgentMobileConnector extends Connector {
rpcUrl,
} = this._options

const publicRPCNode = getRandomPublicRPCNode()
const providerRpcUrl =
rpcUrl ??
(!chainId || chainId === constants.NetworkName.SN_MAIN
? RPC_NODE_URL_MAINNET
: RPC_NODE_URL_TESTNET)
? publicRPCNode.mainnet
: publicRPCNode.testnet)

const options = {
chainId: chainId ?? constants.NetworkName.SN_MAIN,
Expand Down

0 comments on commit d0d150f

Please sign in to comment.