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

nfts: mints #5019

Merged
merged 51 commits into from
Oct 13, 2023
Merged

nfts: mints #5019

merged 51 commits into from
Oct 13, 2023

Conversation

skylarbarrera
Copy link
Contributor

@skylarbarrera skylarbarrera commented Aug 25, 2023

What changed (plus any additional context for devs)

adds in app minting functionality to mint.fun collections

Screen recordings / screenshots

What to test

minting nfts daaawg

const client = IS_DEV ? arcDevClient : arcClient;
const showAlert = () => {
Alert.alert(
'Could not find collection',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i18n

const checkAndHandleMint = async seachQueryForMint => {
if (seachQueryForMint.includes('mint.fun')) {
const mintdotfunURL = seachQueryForMint.split('https://mint.fun/');
console.log(seachQueryForMint);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

logs

@skylarbarrera skylarbarrera marked this pull request as ready for review September 19, 2023 19:12
Copy link
Contributor

@ibrahimtaveras00 ibrahimtaveras00 left a comment

Choose a reason for hiding this comment

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

All issues have been fixed 👍🏽

@dereknelson dereknelson self-requested a review October 6, 2023 13:39
Copy link
Contributor

@dereknelson dereknelson left a comment

Choose a reason for hiding this comment

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

ngl this is looking pretty mergeable 🫦

@@ -78,9 +79,14 @@ export const event = {
nftOffersSelectedSortCriterion: 'Selected NFT Offers Sort Criterion',
nftOffersAcceptedOffer: 'Accepted NFT Offer',

nftMintsOpenedSheet: 'Opened NFT Mint Sheet',
nftMintsMintingNFT: 'Minting NFT',
nftMintsMintedNFT: 'Minted NFT',
Copy link
Contributor

Choose a reason for hiding this comment

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

not a big deal but i think the naming convention should match the existing ones that i created for mints (see line 93 and below)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like it

@@ -98,7 +99,9 @@ export function CollectionCell({
chainId: collection.chainId,
priceInEth: amount,
});
Linking.openURL(collection.externalURL);

Copy link
Contributor

Choose a reason for hiding this comment

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

im no expert on this but could be worth pulling out into a useCallback so the callback isn't recreated multiple times

@@ -135,6 +135,19 @@ const StatusProps = {
marginTop: ios ? -3 : -5,
},
},
[TransactionStatusTypes.minted]: {
name: 'sunflower',
Copy link
Contributor

Choose a reason for hiding this comment

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

lfg sunflower gang

const network = ethereumUtils.getNetworkFromChainId(
featuredMint.chainId
);
navigateToMintCollection(featuredMint.contract, network);
Copy link
Contributor

Choose a reason for hiding this comment

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

im no expert on this but could be worth pulling out into a useCallback so the callback isn't recreated multiple times

@@ -292,6 +298,23 @@ export type EventProperties = {
rainbowFee: number;
offerCurrency: { symbol: string; contractAddress: string };
};
[event.nftMintsMintingNFT]: {
Copy link
Contributor

Choose a reason for hiding this comment

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

i think we should use chainId instead of Network. network might have been a better call tbh, but i already used chainId for existing events. aligning them would make amplitude stuff a lot more straightforward

also can we add priceInEth like the existing events below? currently we're using this to group mints in amplitude by free/paid. https://github.com/rainbow-me/rainbow/blob/develop/src/components/cards/FeaturedMintCard.tsx#L119-L123

const txFee = getTotalGasPrice();
const totalMintPrice = multiply(price.amount, quantity);
// gas price + mint price
// TODO: need to double check this when there are paid mints available
Copy link
Contributor

Choose a reason for hiding this comment

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

bumping this in case its relevant

const LONG_PRESS_DELAY_THRESHOLD = 69;
const MIN_LONG_PRESS_DELAY_THRESHOLD = 200;

const Wrapper = styled(Row)({});
Copy link
Contributor

Choose a reason for hiding this comment

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

does styled do anything here

weight="semibold"
>
{quantity === Number(maxMintsPerWallet)
? 'Max'
Copy link
Contributor

Choose a reason for hiding this comment

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

i18n

size="17pt"
weight="medium"
>
{`${mintCollection.tokenCount} NFTs`}
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe i18n? pluralization might be different in different langs

// show alert mint.fun does not support
// i18n
// this isnt possible with our current entry points
Alert.alert('Mint.fun does not support this network');
Copy link
Contributor

Choose a reason for hiding this comment

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

i18n

@skylarbarrera skylarbarrera merged commit e53aed1 into develop Oct 13, 2023
5 checks passed
@skylarbarrera skylarbarrera deleted the @skylar/mints branch October 13, 2023 14:11
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.

4 participants