fcl-js
fcl-js copied to clipboard
[FEATURE] Add UI prompt to approve WC requests in mobile wallet
Issue to be solved
Currently, there is no integrated UI or external "hook"[1] option to prompt users for WC approval within their mobile wallet.
Mobile wallets are unique because, on desktop, the wallet's interface is not available on the current device. This means that, unlike other wallet types, the provider cannot directly prompt the user for approval in their current viewing context.
- FCL should be responsible for bridging this UI gap. A new user may not realize there is a pending request on their mobile wallet and should by supported by clear UI guidance
- This carries the added benefit of adding a fallback deeplink for mobile users (This is important!! There are ongoing painpoints with deeplinking & popup blockers. FCL can now render a synchronous link component within this prompt as a "Try Again" for failed deeplink attempts, similar to Discovery UI)
[1] Technically, there is currently a "wcRequestHook", however, this is unsuitable for in-flight prompts as it only signals the consumer at the beginning of WC requests, but does not provide a terminal state once complete.
Suggest A Solution
Add a defaultUI prompt for WC requests which
- [ ] Works on Desktop (modal?)
- [ ] Works on Mobile (drawer?)
- [ ] Provides fallback deeplink (useful/necessary when blocked by a popup blocker, incognito, etc.)
- [ ] Has an opt-out/customization ability for developers who wish to offer alternative notification mechanisms
What are you currently working on that this is blocking?
No response