1- import { getDevice } from "./getDevice"
1+ import { getDevice } from "../../../../helpers /getDevice"
22import Modal from "../../../../modal/Modal.svelte"
33import { Layout , type ModalWallet } from "../../../../types/modal"
44import { getModalTarget } from "../../../../helpers/modal"
5- import { StarknetkitConnector } from "../../../connector"
5+ import type { StarknetkitConnector } from "../../../connector"
66
77const device = getDevice ( )
88
@@ -56,8 +56,8 @@ class ArgentModal {
5656 this . showModal (
5757 {
5858 desktop : `${ this . bridgeUrl } ?wc=${ wcParam } &href=${ href } &device=desktop&onlyQR=true` ,
59- ios : `${ this . mobileUrl } app/wc?uri=${ wcParam } &href=${ href } &device=mobile` ,
60- android : `${ this . mobileUrl } app/wc?uri=${ wcParam } &href=${ href } &device=mobile` ,
59+ ios : `${ this . mobileUrl } app/wc?uri=${ wcParam } &href=${ href } &device=mobile&onlyQR=true ` ,
60+ android : `${ this . mobileUrl } app/wc?uri=${ wcParam } &href=${ href } &device=mobile&onlyQR=true ` ,
6161 } ,
6262 modalWallet ,
6363 )
@@ -69,15 +69,26 @@ class ArgentModal {
6969
7070 this . getQR ( {
7171 desktop : `${ this . bridgeUrl } ?wc=${ wcParam } &href=${ href } &device=desktop&onlyQR=true` ,
72- ios : `${ this . mobileUrl } app/wc?uri=${ wcParam } &href=${ href } &device=mobile` ,
73- android : `${ this . mobileUrl } app/wc?uri=${ wcParam } &href=${ href } &device=mobile` ,
72+ ios : `${ this . mobileUrl } app/wc?uri=${ wcParam } &href=${ href } &device=mobile&onlyQR=true ` ,
73+ android : `${ this . mobileUrl } app/wc?uri=${ wcParam } &href=${ href } &device=mobile&onlyQR=true ` ,
7474 } )
7575 }
7676
7777 private getQR ( urls : Urls ) {
7878 const overlay = document . createElement ( "div" )
7979 const shadow = document . querySelector ( "#starknetkit-modal-container" )
8080
81+ if ( [ "android" , "ios" ] . includes ( device ) ) {
82+ const toMobileApp = document . createElement ( "button" )
83+ toMobileApp . style . display = "none"
84+ toMobileApp . addEventListener ( "click" , ( ) => {
85+ window . location . href = urls [ device ]
86+ } )
87+ toMobileApp . click ( )
88+
89+ return
90+ }
91+
8192 if ( shadow ?. shadowRoot ) {
8293 const slot = shadow . shadowRoot . querySelector ( ".qr-code-slot" )
8394
0 commit comments