Skip to content

Commit 9f07766

Browse files
committed
Update MintCertificateCard.tsx
1 parent 8675bc2 commit 9f07766

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/components/cert/MintCertificateCard.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ import { isTestnetChain, SUPPORTED_CHAINS } from '@/lib/sbt/chains';
2828
import type { MintCertificateServerResult } from '@/lib/sbt/server';
2929

3030
const DEFAULT_CHAIN_ID = 11155111; // Ethereum Sepolia
31-
const MINTABLE_CHAINS = Object.values(SUPPORTED_CHAINS).filter((chain) => getSBTContractAddress(chain.chainId));
31+
const ALL_CHAINS = Object.values(SUPPORTED_CHAINS);
32+
const MINTABLE_CHAINS = ALL_CHAINS.filter((chain) => getSBTContractAddress(chain.chainId));
3233

3334
export function MintCertificateCard({
3435
report,
@@ -194,19 +195,19 @@ export function MintCertificateCard({
194195
onChange={(e) => setSelectedChainId(Number(e.target.value))}
195196
>
196197
<optgroup label="Testnets">
197-
{MINTABLE_CHAINS
198+
{ALL_CHAINS
198199
.filter((c) => c.isTestnet)
199200
.map((c) => (
200-
<option key={c.chainId} value={c.chainId}>
201+
<option key={c.chainId} value={c.chainId} disabled={!getSBTContractAddress(c.chainId)}>
201202
{c.name} ({c.nativeCurrency.symbol})
202203
</option>
203204
))}
204205
</optgroup>
205206
<optgroup label="Mainnets">
206-
{MINTABLE_CHAINS
207+
{ALL_CHAINS
207208
.filter((c) => !c.isTestnet)
208209
.map((c) => (
209-
<option key={c.chainId} value={c.chainId}>
210+
<option key={c.chainId} value={c.chainId} disabled={!getSBTContractAddress(c.chainId)}>
210211
{c.name} ({c.nativeCurrency.symbol})
211212
</option>
212213
))}

0 commit comments

Comments
 (0)