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: Mint NFT Stepper #327

Merged
merged 11 commits into from
Feb 7, 2024
Merged

Conversation

arsood
Copy link
Contributor

@arsood arsood commented Feb 6, 2024

What changed? Why?

  • Added stepper functionality to Mint NFT flow
  • Add callbacks for success and error on contract write
  • Standardized Button component

Screenshots

Start Mint NFT

Screenshot 2024-02-05 at 11 12 03 PM

Mint Processing

Screenshot 2024-02-05 at 11 12 10 PM

Out Of Gas

Screenshot 2024-02-05 at 11 13 11 PM

Mint Complete

Screenshot 2024-02-05 at 11 13 40 PM

How has it been tested?

  • Locally

@arsood arsood marked this pull request as ready for review February 6, 2024 07:14
@arsood arsood linked an issue Feb 6, 2024 that may be closed by this pull request
import SwitchNetwork from './SwitchNetwork';

const EXPECTED_CHAIN = baseSepolia;
export const EXPECTED_CHAIN = baseSepolia;
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we should have some sort of config file for this.

Or even better question, should this information come from the Hook that was generated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added as constant for now. We can refactor to hook in follow up PR.

return <MintProcessingStep />;
}

if (mintStep === MintSteps.OUT_OF_GAS_STEP) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting, I am starting seeing some common steps happening between contracts.

Something to reflect on in future PRs, on how to abstract this in a simple reusable way.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or is it even worth abstract? I guess more open question in general.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a good question, and something I was thinking a lot about. I decided against abstracting them even though there is similarity due to the fact that we may have complex logic in these steps at some point that are specific to the particular action (Mint, Buy Coffee, etc.). If we continue to see overlap it may be worth abstracting in a future PR.

import { SymbolIcon } from '@radix-ui/react-icons';
import clsx from 'clsx';

export default function MintProcessingStep() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I see we create this Issue for later #328, which is great.

I was thinking if we should also find a way to consolidate or abstract how states work in a contract. So it's easier for a developer re-build them.

Copy link
Contributor

@Zizzamia Zizzamia left a comment

Choose a reason for hiding this comment

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

LFG

@arsood arsood merged commit e2b7a80 into coinbase:main Feb 7, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Mint NFT Stepper UI
3 participants