Skip to content

Commit

Permalink
Merge pull request #118 from argentlabs/SK-9
Browse files Browse the repository at this point in the history
fix: wc params for argent mobile
  • Loading branch information
bluecco authored Aug 6, 2024
2 parents da2a1e2 + 4e4a988 commit b3a413f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
17 changes: 2 additions & 15 deletions src/connectors/argentMobile/modal/argentModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,8 @@ class ArgentModal {
const wcParam = encodeURIComponent(wcUri)
const href = encodeURIComponent(window.location.href)

/*
// 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`,
})
) */

this.showModal({
desktop: `${this.bridgeUrl}?wc=${wcParam}&device=desktop`,
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`,
})
Expand All @@ -109,7 +96,7 @@ class ArgentModal {
this should be ignored and not considered valid as it's only used for automatically redirecting the users to approve or reject a signing request.
*/
this.showModal({
desktop: `${this.bridgeUrl}?action=sign&device=desktop`,
desktop: `${this.bridgeUrl}?action=sign&device=desktop&href=${href}`,
ios: `${this.mobileUrl}app/wc/request?href=${href}&device=mobile`,
android: `${this.mobileUrl}app/wc/request?href=${href}&device=mobile`,
})
Expand Down
2 changes: 1 addition & 1 deletion src/connectors/argentMobile/modal/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const getBridgeUrl = (chainId: unknown) => {
String(chainId).startsWith(Network.SN_SEPOLIA) ||
chainIdNumber === 11155111 // sepolia numeric value
) {
return "https://login.hydrogen.argent47.net"
return "https://mobile-login.hydrogen.argent47.net"
}

if (
Expand Down

0 comments on commit b3a413f

Please sign in to comment.