-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix: wc params for argent mobile #118
Conversation
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.
Is there any more context to this change? What is the problem that it is fixing?
@mluisbrown part of the related ticket in jira:
and this encoding was required by android team |
}) | ||
|
||
) */ | ||
const desktopWcParam = encodeURIComponent(wcParam) |
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 cannot properly review it without the argent login changes, but that doesn't look correct. it's basically encodeURIComponent(encodeURIComponent(wcUri))
which doesn't make much sense.
I the commented out code it was necessary because desktopWcParam
was an actual link
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.
@kamilargent ok, I probably misunderstood last time then
so, in this case, the following should be enough:
const wcParam = encodeURIComponent(wcUri)
this.showModal({
desktop: `${this.bridgeUrl}?wc=${wcParam}&href=${href}&device=desktop`,
ios: `${this.mobileUrl}app/wc?uri=${wcParam}&href=${href}&device=mobile`,
android: `${this.mobileUrl}app/wc?uri=${wcParam}&href=${href}&device=mobile`,
})
or we need to revert the commented code
// KEEPING IN CASE NEEDS TO BE REVERTED
const desktopWcParam = encodeURIComponent(
`${this.mobileUrl}app/wc?uri=${wcParam}`,
this.showModal({
desktop: `${this.bridgeUrl}?wc=${desktopWcParam}&device=desktop`,
ios: `${this.mobileUrl}app/wc?uri=${wcParam}&href=${href}&device=mobile`,
android: `${this.mobileUrl}app/wc?uri=${wcParam}&href=${href}&device=mobile`,
})
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.
Everything depends on how you treat the wc
param on the argent login side, when creating the QR code.
- If it's just getting encoded into the QR code, then, the previous code should be used (although new
config.mobileUrl
will have to be used as we need herehttps;//www.argent.xyz/
link instead ofargent://
fordesktop
flow) - If it's just getting the wc param end creates a new qr link, then we are ok with just
const wcParam = encodeURIComponent(wcUri)
const wcParam = getQueryParam(link, "wc")
const href = getQueryParam(link, "href")
const qrCode = "https://www.argent.xyz/app/wc?uri=${wcParam}&href=${href}&device=desktop"
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.
ok @kamilargent
I think #2 is ok since the url creation is managed in argent-login
// argent-login code
<FirstConnection
qrCodeData={`https://www.argent.xyz/app/wc?uri=${walletConnectUrl}`}
/>
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.
👍 as long as the walletConnectUrl
is the encoded version of the wcUri
we should be good
Issue / feature description
Quick description of the issue or the feature that is implemented in the pr ie: add new transitions between screens
Changes
quick list regarding the related changes within the pr
ie:
Checklist
Please keep your pull request as small as possible. If you need to make multiple changes, please create separate pull requests for each change. Create a draft pull request if you need early feedback. This will mark the pull request as a work in progress and prevent it from being reviewed or merged until you are ready.
Please move drafts to the ready for review (regular PR) when you are ready to start the review process and other developers will pick it up from there.