Skip to content

Commit

Permalink
Merge pull request #11 from khanti42/feat/mm-support
Browse files Browse the repository at this point in the history
feat: enable mm support
  • Loading branch information
bluecco authored Dec 4, 2024
2 parents 8b8b566 + 3706f69 commit f1d816b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 16 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
"prepare": "husky"
},
"dependencies": {
"@starknet-io/get-starknet-core": "4.0.4",
"@starknet-react/chains": "^3.1.0",
"@starknet-react/core": "^3.5.0",
"next": "15.0.2",
"react": "19.0.0-rc-02c0e824-20241028",
"react-dom": "19.0.0-rc-02c0e824-20241028",
"starknet": "^6.11.0",
"starknetkit": "^2.6.0"
"starknetkit": "^2.6.1"
},
"devDependencies": {
"@commitlint/cli": "^19.5.0",
Expand Down
39 changes: 25 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/connectors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import {
} from "starknetkit/braavosMobile"
import { InjectedConnector } from "starknetkit/injected"
import { WebWalletConnector } from "starknetkit/webwallet"
import { getStarknet } from "@starknet-io/get-starknet-core"

const isMobileDevice = () => {
if (typeof window === "undefined") {
return false
}

getStarknet()
// Primary method: User Agent + Touch support check
const userAgent = navigator.userAgent.toLowerCase()
const isMobileUA =
Expand Down Expand Up @@ -49,6 +50,7 @@ export const availableConnectors = () => {
return [
new InjectedConnector({ options: { id: "argentX" } }),
new InjectedConnector({ options: { id: "braavos" } }),
new InjectedConnector({ options: { id: "metamask" } }),
ArgentMobileConnector.init({
options: {
url: typeof window !== "undefined" ? window.location.href : "",
Expand Down

0 comments on commit f1d816b

Please sign in to comment.