-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Hi @earrietadev, thanks for providing the Xbull which help our PWA integrate to stellar net, even it still on testnet.
Background
Our PWA expect to running both on desktop and mobile, when I was connecting xbull from our dApp on my desktop web or desktop PWA it looks like works, but when running on mobile (iOS), it wouldn't trigger a wallet app to connect wallet, although I had setup my wallet before. I assume that local storage between on safari/iOS browser and dApp have different origin, based on this https://stackoverflow.com/questions/77189402/sharing-session-between-safari-and-pwa. Is there any suggestion which will address the issue from the wallet kit? or is there any compatibility issue about sharing storage between PWA and iOS (android was worked) so that wouldn't trigger anything to pop up the wallet?
Expectation
my PWA is able to connect and sign tx to xbull both on desktop and mobile
Here is my short code relates to the issue
const onOpenWallet = async (
onClosed?: (error: any) => void,
onSuccess?: (option: ISupportedWallet) => void,
onError?: (error: any) => void,
) => {
kit?.openModal({
onWalletSelected: async (option: ISupportedWallet) => {
try {
onSetWallet(option.type)
const publicKey = await kit?.getPublicKey()
onSetPublicKey(publicKey)
await onGetBalances(publicKey)
await onGetAuthToken(publicKey)
setShowToastWithTimeout({
toast: {
message: `${option.name} connected`,
type: 'success',
},
timeout: 3000,
})
onSuccess?.(option)
} catch (error: any) {
removeLocal(LOCAL.ZIRIZ_SELECTED_WALLET)
removeLocal(LOCAL.ZIRIZ_PUBLIC_KEY)
setShowToastWithTimeout({
toast: {
message: error?.error?.message || 'Connect wallet rejected',
type: 'error',
},
timeout: 3000,
})
onError?.(error)
}
},
.....

