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: earnings tokenId #1531

Merged
merged 4 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions playground/nextjs-app-router/app/mint/MintComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ export default function MintComponent() {
<main className="flex w-full items-center justify-center">
<NFTMintCard
contractAddress="0x1D6b183bD47F914F9f1d3208EDCF8BefD7F84E63"
tokenId="2"
tokenId="3"
useNFTData={useEarningsData}
buildMintTransaction={buildMintTransaction}
onStatus={handleOnStatus}
>
<NFTCreator className="-mt-1 pt-0" />
<NFTMedia />
<NFTCollectionTitle />
<NFTMintButton />
<NFTMintButton className="[&_button]:bg-[#0052ff] [&_button]:hover:bg-[#014ceb] [&_button]:active:bg-[#0148dc] [&_button]:disabled:bg-[#80a8ff]" />
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 you should be able to use existing vars for this e.g.

--ock-bg-primary-active: = #0148dc so you can do [&_button]:active:bg-ock-bg-primary-active

</NFTMintCard>
</main>
);
Expand Down
8 changes: 8 additions & 0 deletions playground/nextjs-app-router/components/DemoOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,20 @@ export default function DemoOptions({
</>
);
case OnchainKitComponent.NFTCard:
return (
<>
{commonOptions}
<Chain />
<NFTOptions />
</>
);
case OnchainKitComponent.NFTMintCard:
return (
<>
{commonOptions}
<Chain />
<PaymasterUrl />
<IsSponsored />
<NFTOptions />
</>
);
Expand Down
3 changes: 2 additions & 1 deletion playground/nextjs-app-router/components/demo/NFTMintCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type { TransactionReceipt } from 'viem';
import { AppContext } from '../AppProvider';

function NFTMintCardDemo() {
const { nftToken } = useContext(AppContext);
const { nftToken, isSponsored } = useContext(AppContext);

const [contractAddress, tokenId] = (
nftToken ?? '0x1D6b183bD47F914F9f1d3208EDCF8BefD7F84E63:2'
Expand All @@ -47,6 +47,7 @@ function NFTMintCardDemo() {
tokenId={tokenId}
useNFTData={useReservoirMintData}
buildMintTransaction={buildMintTransaction}
isSponsored={isSponsored}
onStatus={handleOnStatus}
onSuccess={handleOnSuccess}
onError={handleOnError}
Expand Down
3 changes: 3 additions & 0 deletions playground/nextjs-app-router/lib/nft/testAddresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
// cb quarterly earnings 0x1D6b183bD47F914F9f1d3208EDCF8BefD7F84E63
// audio - 0x05a28e3d5f68c8b4a521ab7f74bd887fae6a598d base song
// ink base - 0xff93d3f49ec467B61BF61D42DDdCFDbA5c732446 ERC721
// yellow digital meltdown 0x19Ef6FdBddd2752fBA1B419cD43a1Fab5b0101Db ERC721
// base around the world 0xFE12c6d7555B4A94B352998f8e1E96aDFbE628e9 ERC721