near-api-js icon indicating copy to clipboard operation
near-api-js copied to clipboard

WalletConnection should return redirect links instead of redirect the whole page.

Open DevSlashRichie opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. I want to be able to use the link in an iframe or popup instead of redirecting the complete webapp.

Describe the solution you'd like Allowing WalletConnection to have methods that return the redirect URI instead of ultimately returning the web page.

Describe alternatives you've considered Embedding the whole near-api-js connect into its own code space and running that into a popup.

Additional context https://github.com/near/near-api-js/blob/37ca2222e7afda3b77929d695b9d84bba21b418e/packages/near-api-js/src/wallet-account.ts#L199

DevSlashRichie avatar Oct 06 '22 00:10 DevSlashRichie

the idea of having methods for generating a Wallet URL without redirecting looks also reasonable to me and was implemented in https://github.com/near/near-api-js/pull/1260

denbite avatar Jan 14 '24 11:01 denbite