-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add WalletConnect Modal support #22
Conversation
modifier = Modifier | ||
.fillMaxWidth() | ||
.clickable { | ||
// nav.openWalletConnectModal() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete?
provider.signMessage( | ||
request = request, | ||
message = "Test Message", | ||
connected = { info -> | ||
Log.d(tag(this@WalletListViewModel), "Connected to: ${info?.peerName ?: info?.address}") | ||
}, | ||
status = { requireAppSwitching -> | ||
Log.d(tag(this@WalletListViewModel), "Require app switching: $requireAppSwitching") | ||
toastMessage("Please switch to the wallet app") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you save info.peerName from the connection anywhere? if so it would be nice to display the wallet name:
toastMessage("Please switch to {info.peerName} to complete this action.")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for the test app only, and won't be part of the production code. I will add proper localized text to the production mobile app code.
completion = { signature, error -> | ||
// delay for 1 second |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 better comment for why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
|
||
request["from"] = fromAddress | ||
request["to"] = toAddress ?: "0x" | ||
request["gas"] = gasLimit?.toHexString() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont think you need gas, gasPrice, or nonce here (should be set by the wallet and not the dapp)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can keep this here for backward compatibility. Those are optional fields and client can decided whether to use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tinaszheng stamping for now as it is blocking mobile. feel free to retro-actively review the PR
Also updated the sample app to show the usage:
Screen_Recording_20241126_150947_CarteraExample.mp4