Ja being weird about types

This commit is contained in:
Mentor Palokaj 2021-10-31 08:12:49 +01:00
parent 07f5477aca
commit d7bb9f792e
4 changed files with 5 additions and 12808 deletions

File diff suppressed because it is too large Load Diff

View File

@ -26,7 +26,7 @@ async function isInvalidRocketeerId( id, network='mainnet' ) {
await db.collection( 'meta' ).doc( network ).set( { cachedTotalSupply: totalSupply }, { merge: true } ) await db.collection( 'meta' ).doc( network ).set( { cachedTotalSupply: totalSupply }, { merge: true } )
// If the requested ID is larger than total supply, exit // 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 // If all good, return true
return false return false

View File

@ -131,8 +131,8 @@ module.exports = async function svgFromAttributes( attributes=[], path='' ) {
const rasterFile = bucket.file( `${path}.jpg` ) const rasterFile = bucket.file( `${path}.jpg` )
// Delete testnet file if it already exists // Delete testnet file if it already exists
await svgFile.delete().catch( f => 'this is fine' ) // await svgFile.delete().catch( f => 'this is fine' )
await rasterFile.delete().catch( f => 'this is fine' ) // await rasterFile.delete().catch( f => 'this is fine' )
// Save files // Save files
await svgFile.save( bakedSvg ) await svgFile.save( bakedSvg )

View File

@ -61,7 +61,7 @@ export default function Minter() {
const id = tokenId.toString() const id = tokenId.toString()
// Trigger remote generation // 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 ) log( 'Oracle returned: ', rocketeer )
// Set token to state // Set token to state
@ -84,7 +84,7 @@ export default function Minter() {
<div className="lds-dual-ring"></div> <div className="lds-dual-ring"></div>
<p>{ loading }</p> <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> } </div> }
</Container> </Container>