-
Notifications
You must be signed in to change notification settings - Fork 635
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
nfts: mints #5019
Conversation
src/resources/reservoir/mints.ts
Outdated
const client = IS_DEV ? arcDevClient : arcClient; | ||
const showAlert = () => { | ||
Alert.alert( | ||
'Could not find collection', |
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.
i18n
const checkAndHandleMint = async seachQueryForMint => { | ||
if (seachQueryForMint.includes('mint.fun')) { | ||
const mintdotfunURL = seachQueryForMint.split('https://mint.fun/'); | ||
console.log(seachQueryForMint); |
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.
logs
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.
All issues have been fixed 👍🏽
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.
ngl this is looking pretty mergeable 🫦
src/analytics/event.ts
Outdated
@@ -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', |
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.
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)
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 like it
@@ -98,7 +99,9 @@ export function CollectionCell({ | |||
chainId: collection.chainId, | |||
priceInEth: amount, | |||
}); | |||
Linking.openURL(collection.externalURL); | |||
|
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.
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', |
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.
lfg sunflower gang
const network = ethereumUtils.getNetworkFromChainId( | ||
featuredMint.chainId | ||
); | ||
navigateToMintCollection(featuredMint.contract, network); |
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.
im no expert on this but could be worth pulling out into a useCallback so the callback isn't recreated multiple times
src/analytics/event.ts
Outdated
@@ -292,6 +298,23 @@ export type EventProperties = { | |||
rainbowFee: number; | |||
offerCurrency: { symbol: string; contractAddress: string }; | |||
}; | |||
[event.nftMintsMintingNFT]: { |
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 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
src/screens/mints/MintSheet.tsx
Outdated
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 |
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.
bumping this in case its relevant
const LONG_PRESS_DELAY_THRESHOLD = 69; | ||
const MIN_LONG_PRESS_DELAY_THRESHOLD = 200; | ||
|
||
const Wrapper = styled(Row)({}); |
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.
does styled
do anything here
src/screens/mints/MintSheet.tsx
Outdated
weight="semibold" | ||
> | ||
{quantity === Number(maxMintsPerWallet) | ||
? 'Max' |
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.
i18n
src/screens/mints/MintSheet.tsx
Outdated
size="17pt" | ||
weight="medium" | ||
> | ||
{`${mintCollection.tokenCount} NFTs`} |
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.
maybe i18n? pluralization might be different in different langs
src/screens/mints/MintSheet.tsx
Outdated
// 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'); |
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.
i18n
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