@@ -274,19 +274,23 @@ export const CostTable = ({ mainChain, chain, method }: Props) => {
274
274
275
275
const getsupportedNetworkShortcut = ( ) => {
276
276
const mainChainName = mainChain . name . toLowerCase ( )
277
+ const subChainName = chain . name . toLowerCase ( )
277
278
switch ( mainChainName ) {
278
279
case "ethereum" :
280
+ if ( subChainName !== "mainnet" ) {
281
+ return `${ subChainName } -${ chain . type } `
282
+ }
279
283
return `${ mainChainName } -${ chain . type } `
280
284
case "bnb chain" :
281
- return `${ mainChainName } -chain ${ chain . type === "testnet" ? "-" + chain . type : "" } `
285
+ return `${ mainChainName . replace ( " " , "-" ) } ${ chain . type === "testnet" ? "-" + chain . type : "" } `
282
286
case "polygon" :
283
- return `${ mainChainName } -matic-${ chain . type === "testnet" ? chain . name + "-" + chain . type : chain . type } `
287
+ return `${ mainChainName } -matic-${ chain . type === "testnet" ? subChainName + "-" + chain . type : chain . type } `
284
288
case "avalanche" :
285
- return `${ mainChainName } -${ chain . type === "testnet" ? chain . name + "-" + chain . type : chain . type } `
289
+ return `${ mainChainName } -${ chain . type === "testnet" ? subChainName + "-" + chain . type : chain . type } `
286
290
case "fantom" :
287
291
return `${ mainChainName } -${ chain . type } `
288
292
case "arbitrum" :
289
- return `${ mainChainName } -${ chain . type === "testnet" ? chain . name + "-" + chain . type : chain . type } `
293
+ return `${ mainChainName } -${ chain . type === "testnet" ? subChainName + "-" + chain . type : chain . type } `
290
294
default :
291
295
throw new Error ( "network/chain does not exist or is not supported by VRF yet." )
292
296
}
@@ -527,7 +531,8 @@ export const CostTable = ({ mainChain, chain, method }: Props) => {
527
531
< >
528
532
< h6 > Maximum cost per request under the selected gas lane: { formatmaxCost ( ) } LINK</ h6 >
529
533
< p >
530
- If you use the subscription method, a minimum balance of LINK is required use VRF. Check your balance at
534
+ If you use the subscription method, a minimum balance of LINK is required to use VRF. Check your balance
535
+ at
531
536
< a href = "https://vrf.chain.link" target = "_blank" >
532
537
{ " " }
533
538
vrf.chain.link
@@ -537,7 +542,7 @@ export const CostTable = ({ mainChain, chain, method }: Props) => {
537
542
</ >
538
543
) }
539
544
< p >
540
- To see these parameters in more detail, read the
545
+ To see these parameters in greater detail, read the
541
546
< a href = { `/vrf/v2/${ kebabize ( method ) } /supported-networks/#${ getsupportedNetworkShortcut ( ) } ` } target = "_blank" >
542
547
{ " " }
543
548
Supported Networks{ " " }
0 commit comments