We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
code snipet 👍 useEffect(() => { const initializeDeeplinks = async () => { const initialUrl = await Linking.getInitialURL(); if (initialUrl) { setDeepLink(initialUrl); } }; initializeDeeplinks(); const listener = Linking.addEventListener('url', handleDeepLink); return () => { listener.remove(); }; }, []);
const handleDeepLink = ({url}: Linking.EventType) => setDeepLink(url);
// Handle in-bound links useEffect(() => { if (!deepLink) { return; }
const url = new URL(deepLink); const params = url.searchParams; // Handle an error response from Phantom if (params.get('errorCode')) { const error = Object.fromEntries([...params]); const message = error?.errorMessage ?? JSON.stringify(Object.fromEntries([...params]), null, 2); console.log('error: ', message); return; } // Handle a `connect` response from Phantom if (/onConnect/.test(url.pathname)) { const sharedSecretDapp = nacl.box.before( bs58.decode(params.get('phantom_encryption_public_key')!), dappKeyPair.secretKey, ); const connectData = decryptPayload( params.get('data')!, params.get('nonce')!, sharedSecretDapp, ); setSharedSecret(sharedSecretDapp); setSession(connectData.session); setPhantomWalletPublicKey(new PublicKey(connectData.public_key)); console.log(`connected to ${connectData.public_key.toString()}`); }
The text was updated successfully, but these errors were encountered:
Same here , when i click the connect button it doesnt redirect back to the app nor return a response
Sorry, something went wrong.
@Timadigwe how did you fix this issue?
It didn't work for me I used Solana mobile stack
Use Solana mobile stack or expo flow It works on expo
mmh but solana mobile stack uses Mobile Wallet Adapter(MWA) and that doesnt work with IOS!
No branches or pull requests
code snipet 👍
useEffect(() => {
const initializeDeeplinks = async () => {
const initialUrl = await Linking.getInitialURL();
if (initialUrl) {
setDeepLink(initialUrl);
}
};
initializeDeeplinks();
const listener = Linking.addEventListener('url', handleDeepLink);
return () => {
listener.remove();
};
}, []);
const handleDeepLink = ({url}: Linking.EventType) => setDeepLink(url);
// Handle in-bound links
useEffect(() => {
if (!deepLink) {
return;
}
The text was updated successfully, but these errors were encountered: