Skip to content
New issue

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

Make WalletConnect signature request be clearer about where it's coming from #3289 #2228

Closed
hboon opened this issue Nov 18, 2021 · 4 comments · Fixed by #2417
Closed

Make WalletConnect signature request be clearer about where it's coming from #3289 #2228

hboon opened this issue Nov 18, 2021 · 4 comments · Fixed by #2417
Assignees

Comments

@hboon
Copy link
Member

hboon commented Nov 18, 2021

Refer AlphaWallet/alpha-wallet-ios#3289 (comment)

@JamesSmartCell
Copy link
Member

I like the use of the ActionSheet dialog to confirm the WC connection. I'll modify Android accordingly. And add the extra info,

@JamesSmartCell
Copy link
Member

@asif-finimble can you route the approve session dialog through ActionSheetDialog instead of AlertDialog popup (see the AlertDialog in onSessionRequest).

Maybe you can create a 'WalletConnectInfoWidget' class similar to the other widgets which form the ActionSheetDialog, which holds all the info shown in the ios issue linked above. For reference see the basic ActionSheetDialog invocation for a message, from DappBrowserFragment. The only dynamic part of this would be the 'change chain' button in the chain display. To implement that you'll need a callback from your widget to an ActivityResultLauncher for the chain select (see getNetwork) and catch the result, update the ActionSheet, update the client object in WalletConnectionService and proceed as per the remainder of Approve in onSessionRequest.

Note that, if user cancels the connection, they would simply drag the ActionSheetDialog out, or click outside of it. That triggers the dismissed callback function so you'll need to hook that up accordingly. If they click 'Approve' then you can go through the 'buttonclick' callback, or create a new callback route.

@asif-finimble
Copy link
Contributor

@asif-finimble can you route the approve session dialog through ActionSheetDialog instead of AlertDialog popup (see the AlertDialog in onSessionRequest).

Maybe you can create a 'WalletConnectInfoWidget' class similar to the other widgets which form the ActionSheetDialog, which holds all the info shown in the ios issue linked above. For reference see the basic ActionSheetDialog invocation for a message, from DappBrowserFragment. The only dynamic part of this would be the 'change chain' button in the chain display. To implement that you'll need a callback from your widget to an ActivityResultLauncher for the chain select (see getNetwork) and catch the result, update the ActionSheet, update the client object in WalletConnectionService and proceed as per the remainder of Approve in onSessionRequest.

Note that, if user cancels the connection, they would simply drag the ActionSheetDialog out, or click outside of it. That triggers the dismissed callback function so you'll need to hook that up accordingly. If they click 'Approve' then you can go through the 'buttonclick' callback, or create a new callback route.

Sure. Should I take this up after #1672 or before ?

@hboon
Copy link
Member Author

hboon commented Feb 10, 2022

@JamesSmartCell bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants