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: [Pay] components #1349

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open

feat: [Pay] components #1349

wants to merge 23 commits into from

Conversation

0xAlec
Copy link
Contributor

@0xAlec 0xAlec commented Oct 2, 2024

What changed? Why?

  • add PayButton, Pay, and PayStatus
  • add corresponding tests
  • add useGetPayStatus
  • modify useCommerceContractscallback to take an address as an argument

Notes to reviewers

How has it been tested?
playground PR next

Copy link

vercel bot commented Oct 2, 2024

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

Name Status Preview Comments Updated (UTC)
onchainkit-coverage ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2024 7:10pm
onchainkit-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2024 7:10pm
onchainkit-routes ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2024 7:10pm

onStatus={onStatus}
productId={productId}
>
<div className={cn(className, 'flex w-full flex-col gap-2')}>
Copy link
Contributor

Choose a reason for hiding this comment

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

className last

'noopener,noreferrer',
);
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

may be more straightforward to have separate callbacks for handleFundingFlow and handleViewReceipt and then call different callbacks in the button based on the status

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'll refactor this as a fast follow once we have USDC magic spend

Copy link
Contributor Author

@0xAlec 0xAlec Oct 3, 2024

Choose a reason for hiding this comment

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

we'll delete the funding-related code in a few weeks I believe

if (
(error as Error).message?.includes('User denied connection request')
) {
setErrorMessage(USER_REJECTED_ERROR);
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this also updateLifecycleStatus?

<div className={cn(text.label2, className)}>
<p className={cn(labelClassName, className)}>{label}</p>
</div>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

pass className into all three seems like it could make some styling difficult

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.

2 participants