Skip to content

Commit

Permalink
fix: correct function interface for tier to token ids hook
Browse files Browse the repository at this point in the history
  • Loading branch information
aramalipoor committed Oct 7, 2022
1 parent 3692da0 commit da59ec3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import { BigNumberish } from 'ethers';
import { useState } from 'react';
import { useAccount } from 'wagmi';

import { ConnectButton, SwitchChainButton } from '../../../../core/wallet';
import {
ConnectButton,
IfWalletConnected,
SwitchChainButton,
} from '../../../../core/wallet';
import {
TieredSalesAllowlistStatus,
TieredSalesEligibleAmount,
Expand Down Expand Up @@ -86,17 +90,21 @@ export const TieredSalesMintingSection = ({}: Props) => {
</ConnectButton>

{/* Maximum eligible amount */}
<small className="tiered-sales-eligibility-bar block font-light mt-2 text-xs">
<TieredSalesIfWalletCanMint>
You can mint up to{' '}
<TieredSalesEligibleAmount as="div" className="inline" />.{' '}
</TieredSalesIfWalletCanMint>
{address || isConnected || minterAddress ? (
<>
You have minted <TieredSalesWalletMints /> NFTs in this tier.
</>
) : null}
</small>
<IfWalletConnected>
<small className="tiered-sales-eligibility-bar block font-light mt-2 text-xs">
<TieredSalesIfWalletCanMint>
You can mint up to{' '}
<TieredSalesEligibleAmount as="div" className="inline" />.{' '}
</TieredSalesIfWalletCanMint>

{address || isConnected || minterAddress ? (
<>
You have minted <TieredSalesWalletMints /> NFTs in this
tier.
</>
) : null}
</small>
</IfWalletConnected>
</div>

<TieredSalesMintStatusBar className="tiered-sales-status-bar mt-4 flex flex-col gap-2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const useTierToTokenIds = ({
}: Config) => {
const result = useContractRead<BigNumberish[], ArgsType>({
contractInterface: [
'function tierToTokenIds(uint256 tierId) external view returns (uint256[] memory)',
'function tierToTokenId(uint256[] calldata tierIds) external view virtual returns (uint256[] memory)',
],
functionName: 'tierToTokenId(uint256[])',
chainId,
Expand Down

0 comments on commit da59ec3

Please sign in to comment.