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

feat: Add the new FIAT Flow to the ClaimName feature #2102

Merged
merged 22 commits into from
Jan 25, 2024

Conversation

juanmahidalgo
Copy link
Contributor

@juanmahidalgo juanmahidalgo commented Jan 12, 2024

image

FF not enabled

image

FF enabled

image

@coveralls
Copy link

coveralls commented Jan 15, 2024

Coverage Status

coverage: 67.252% (+0.003%) from 67.249%
when pulling 08cf588 on feat/ens-with-wert
into b40c3b9 on master.

Copy link
Contributor

@LautaroPetaccio LautaroPetaccio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! It looks great. I've left some minor comments.
There's an issue that I've encountered wile trying the FIAT option:

payload:  {error: 'No identity found'}
type:  "[Failure] Open FIAT Gateway Widget"

There might be an issue with the retrieval of the identity in the decentraland-dapps repo.

@@ -1626,7 +1642,7 @@
}
},
"set_name_as_alias_modal": {
"title": "Use NAME as Alias",
"title": "Use NAME as Username",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was done only in the english language, should we replicate it in the other languages?

"claim_name_fat_finger_modal": {
"title": "Por favor confirmar tu nombre",
"description": "Eelegiste {name}. Entra nuevamente el nombre para confirmar tu selección.",
"description": "Eelegiste {name}. {br} Entra nuevamente el nombre para confirmar tu selección.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small typo:

Suggested change
"description": "Eelegiste {name}. {br} Entra nuevamente el nombre para confirmar tu selección.",
"description": "Elegiste {name}. {br} Entra nuevamente el nombre para confirmar tu selección.",

@@ -45,5 +45,6 @@
"SENTRY_DSN": "https://1dc401149e1c819b8477565c9cdd9b70@o4504361728212992.ingest.sentry.io/4505743351676928",
"SQUID_API_URL": "https://v2.api.squidrouter.com",
"DCL_LISTS_SERVER": "https://dcl-lists.decentraland.today",
"AUTH_URL": "/auth"
"AUTH_URL": "/auth",
"WERT_URL": "https://sandbox.wert.io"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use the production URL in stg?

border-radius: 6px;
border: 1px solid #43404a;
margin-bottom: 11px;
/* border-radius: 14px; */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind removing this comment?

@@ -228,3 +228,14 @@ export const getIsAuthDappEnabled = (state: RootState) => {
}
return false
}

export const getIsClaimingNamesWithFiatEnabled = (state: RootState) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding this FF to the FF tests?

"name": "FIAT",
"new": "new",
"title": "Using Debit and Credit Cards",
"subtitle": "Price rate changes may change"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be?:

Suggested change
"subtitle": "Price rate changes may change"
"subtitle": "Price rates may change"

}, [wallet, ENSName, analytics, onOpenFiatGateway, onClaimTxSubmitted])

const handleClaimWithCardClick = useCallback(() => {
return isClaimingNamesWithFiatEnabled
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about not doing anything when the claiming process (both for FIAT and Crypto) has started? It's possible to change the options while waiting for the transaction to be completed.


const from = address

try {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding tests for this new handler?

}
}, [wallet, ENSName, analytics, onOpenFiatGateway, onClaimTxSubmitted])

const isLoading = useMemo(() => isClaiming || isLoadingFIATWidget, [])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not wrong, as there's no dependencies in this useMemo, isLoading will be computed only once. As this is a boolean comparison, what do you think about removing the useMemo hook?

Suggested change
const isLoading = useMemo(() => isClaiming || isLoadingFIATWidget, [])
const isLoading = isClaiming || isLoadingFIATWidget

Copy link

vercel bot commented Jan 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marketplace ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 25, 2024 2:55pm

…2111)

* feat: add workaround to show the ENS on its way before being minted

* test: add tests in SuccessPage for the ens new case
Copy link
Contributor

@LautaroPetaccio LautaroPetaccio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@juanmahidalgo juanmahidalgo merged commit 74409e1 into master Jan 25, 2024
7 checks passed
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 this pull request may close these issues.

None yet

3 participants