perawallet / connect

JavaScript SDK for integrating Pera Wallet to web applications.
https://perawallet.app
Other
64 stars 20 forks source link

No transaction pop-up on pera mobile App #124

Open HamzaShah11 opened 1 year ago

HamzaShah11 commented 1 year ago

I am trying to connect with mobile app by scaning Qr code and then to sign transaction via perawallet on Phone but After scaing QR code I get pop up to connect and it does connected there is no problem with connectivity. However when I sign transaction I get nothing on mobile it doesnt show any pop up on mobile to sign the transaction. On my console i get this error "err Error: PeraWalletConnect was not initialized correctly." But everything works when I sign transaction on browser with the same code.

gessic-apps commented 1 year ago

I had a similar problem. Try initializing it once in a file, then exporting the pera instance.

// inside pera.ts
import {PeraWalletConnect} from "@perawallet/connect";

const pera = new PeraWalletConnect();

export default pera;

and 

// inside component/page
import pera from "../pera.ts";

// ... other actions
const signedTxns = await pera.signTransaction([txnGroup])
// ... other actions
1forh commented 1 year ago

the above solution doesn't work for me. I implemented this way but I'm still seeing the above issue when in the Pera mobile app browser. I go to sign a txn and the pop-up doesn't appear. Works on Web and from Safari but not the Pera browser.