mirror of
https://github.com/stronk-dev/RandomChad.git
synced 2026-04-20 16:45:10 +02:00
Ja being weird about types
This commit is contained in:
parent
07f5477aca
commit
d7bb9f792e
File diff suppressed because it is too large
Load Diff
@ -26,7 +26,7 @@ async function isInvalidRocketeerId( id, network='mainnet' ) {
|
||||
await db.collection( 'meta' ).doc( network ).set( { cachedTotalSupply: totalSupply }, { merge: true } )
|
||||
|
||||
// If the requested ID is larger than total supply, exit
|
||||
if( totalSupply < id ) throw new Error( `Invalid ID ${ id }, total supply is ${ totalSupply }` )
|
||||
if( Number( totalSupply ) < Number( id ) ) throw new Error( `Invalid ID ${ id }, total supply is ${ totalSupply }` )
|
||||
|
||||
// If all good, return true
|
||||
return false
|
||||
|
||||
@ -131,8 +131,8 @@ module.exports = async function svgFromAttributes( attributes=[], path='' ) {
|
||||
const rasterFile = bucket.file( `${path}.jpg` )
|
||||
|
||||
// Delete testnet file if it already exists
|
||||
await svgFile.delete().catch( f => 'this is fine' )
|
||||
await rasterFile.delete().catch( f => 'this is fine' )
|
||||
// await svgFile.delete().catch( f => 'this is fine' )
|
||||
// await rasterFile.delete().catch( f => 'this is fine' )
|
||||
|
||||
// Save files
|
||||
await svgFile.save( bakedSvg )
|
||||
|
||||
@ -61,7 +61,7 @@ export default function Minter() {
|
||||
const id = tokenId.toString()
|
||||
|
||||
// Trigger remote generation
|
||||
const rocketeer = await fetch( `https://rocketeer.fans/${ chainId === '0x01' ? '' : 'testnetapi'}/rocketeer/${id}` ).then( res => res.json() )
|
||||
const rocketeer = await fetch( `https://rocketeer.fans/${ chainId === '0x1' ? '' : 'testnetapi'}/rocketeer/${id}` ).then( res => res.json() )
|
||||
log( 'Oracle returned: ', rocketeer )
|
||||
|
||||
// Set token to state
|
||||
@ -84,7 +84,7 @@ export default function Minter() {
|
||||
|
||||
<div className="lds-dual-ring"></div>
|
||||
<p>{ loading }</p>
|
||||
{ txHash && <a className="button" rel='noreferrer' target="_blank" href={ `https://${ chainId === '0x01' ? 'etherscan' : 'rinkeby.etherscan' }.io/tx/${ txHash }` }>View tx on Etherscan</a> }
|
||||
{ txHash && <a className="button" rel='noreferrer' target="_blank" href={ `https://${ chainId === '0x1' ? 'etherscan' : 'rinkeby.etherscan' }.io/tx/${ txHash }` }>View tx on Etherscan</a> }
|
||||
|
||||
</div> }
|
||||
</Container>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user