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

fix: Various mint name with crypto fixes #2145

Merged
merged 3 commits into from
Feb 23, 2024

Conversation

LautaroPetaccio
Copy link
Contributor

This PR fixes the following:

  • Forces the Mana icon in the BuyWithCryptoButton to be set as Matic so the white logo is shown. The red logo was fusing with the red color of the button, preventing it from being seen.
  • Changes the ChainButton when buying with card to be just a simple button.
  • Disables the Buy now button when doing a native purchase.
  • Closes the FatFinger modal when closing the BuyWithCryptoModal modal when paying for the minting of a name.
  • Adds popups to the icons of the tokens so the token the user is using is displayed in a clearer way.
  • Removes the token from the InfoTooltip that talked about paying the gas fee with the native token to remove the need to name all native tokens.

Copy link

vercel bot commented Feb 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 Feb 23, 2024 1:51pm

@coveralls
Copy link

coveralls commented Feb 23, 2024

Coverage Status

coverage: 65.877% (-0.03%) from 65.906%
when pulling 6b27697 on fix/various-mint-names-fixes
into 256c935 on master.

Copy link
Contributor

@juanmahidalgo juanmahidalgo left a comment

Choose a reason for hiding this comment

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

a few comments but approving anyways, looks good 👏

export type Props = ButtonProps & {
assetNetwork: Network
}
export type Props = ButtonProps
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add EOF here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!


const onCloseModal = useCallback(() => {
onCloseFatFingerModal()
return onClose()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return onClose()
onClose()

just to keep it consistent with the one above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As we're replacing the onClose method from the original one to this one, the BuyWithCryptoModal expects the type of the method to return the same type as the original onClose. I could either keep the return there or change the type in the BuyWithCryptoModal what do you find best?

{formatPrice(Number(gasCost.total), gasCost.token)}
<span> + </span>
</>
) : null}
<img src={selectedToken?.logoURI} alt={selectedToken?.name} />
<Popup
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 thought... it would be nice to abstract this in a component (or even just a function) that recieves the token and returns the wrapped one. (to avoid repetetition of the props on, position, style, etc, that are all the same in this cases)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! Created the TokenIcon component.

@LautaroPetaccio LautaroPetaccio merged commit 7c6cccd into master Feb 23, 2024
7 checks passed
@LautaroPetaccio LautaroPetaccio deleted the fix/various-mint-names-fixes branch February 23, 2024 15:30
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