From af1ff07b3a1bb881f4a455e1fd95d139a38c9148 Mon Sep 17 00:00:00 2001 From: bluecco Date: Wed, 6 Nov 2024 16:12:33 +0100 Subject: [PATCH] chore: update starknetkit --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- src/connectors/index.ts | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 25f843b..fcbd8c4 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "react": "19.0.0-rc-02c0e824-20241028", "react-dom": "19.0.0-rc-02c0e824-20241028", "starknet": "^6.11.0", - "starknetkit": "^2.3.3" + "starknetkit": "^2.4.0" }, "devDependencies": { "@commitlint/cli": "^19.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bcd66a8..f6c5bf2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,8 +27,8 @@ importers: specifier: ^6.11.0 version: 6.11.0 starknetkit: - specifier: ^2.3.3 - version: 2.3.3(starknet@6.11.0) + specifier: ^2.4.0 + version: 2.4.0(starknet@6.11.0) devDependencies: '@commitlint/cli': specifier: ^19.5.0 @@ -2372,8 +2372,8 @@ packages: starknet@6.11.0: resolution: {integrity: sha512-u50KrGDi9fbu1Ogu7ynwF/tSeFlp3mzOg1/Y5x50tYFICImo3OfY4lOz9OtYDk404HK4eUujKkhov9tG7GAKlg==} - starknetkit@2.3.3: - resolution: {integrity: sha512-RBr+tVT0KphghG3OO7mnAureOryqzNAxGvt2juYvAEUxRSbvCUlprxDUk7/wYt9dfSLGD4mLKFq0P36/8MVB9w==} + starknetkit@2.4.0: + resolution: {integrity: sha512-k6an2qrr3OUS9QaUVmjfikEMYLppyLvy0V4DRX8MKYEIGZ0VBG5dNAj9uuBIWyjlNlJPY9RwmmHhOMNazbgBmg==} peerDependencies: starknet: ^6.9.0 @@ -5511,7 +5511,7 @@ snapshots: transitivePeerDependencies: - encoding - starknetkit@2.3.3(starknet@6.11.0): + starknetkit@2.4.0(starknet@6.11.0): dependencies: '@starknet-io/get-starknet': 4.0.3 '@starknet-io/get-starknet-core': 4.0.3 diff --git a/src/connectors/index.ts b/src/connectors/index.ts index 1c7b137..60439d3 100644 --- a/src/connectors/index.ts +++ b/src/connectors/index.ts @@ -3,14 +3,14 @@ import { isInArgentMobileAppBrowser, ArgentMobileConnector, } from "starknetkit/argentMobile" -/* import { +import { BraavosMobileConnector, isInBraavosMobileAppBrowser, -} from "starknetkit/braavosMobile" */ +} from "starknetkit/braavosMobile" import { InjectedConnector } from "starknetkit/injected" import { WebWalletConnector } from "starknetkit/webwallet" -/* const isMobileDevice = () => { +const isMobileDevice = () => { if (typeof window === "undefined") { return false } @@ -28,7 +28,7 @@ import { WebWalletConnector } from "starknetkit/webwallet" // Combine checks: Must match user agent AND (touch support OR small screen) return isMobileUA && (hasTouchSupport || isSmallScreen) } - */ + export const availableConnectors = () => { if (isInArgentMobileAppBrowser()) { return [ @@ -42,9 +42,9 @@ export const availableConnectors = () => { ] } - /* if (isInBraavosMobileAppBrowser()) { + if (isInBraavosMobileAppBrowser()) { return [BraavosMobileConnector.init({})] - } */ + } return [ new InjectedConnector({ options: { id: "argentX" } }), @@ -56,7 +56,7 @@ export const availableConnectors = () => { chainId: CHAIN_ID, }, }), - /* isMobileDevice() ? BraavosMobileConnector.init({}) : null, */ + isMobileDevice() ? BraavosMobileConnector.init({}) : null, new WebWalletConnector({ url: ARGENT_WEBWALLET_URL }), ].filter((connector) => connector !== null) }