diff --git a/minter/src/components/verifier.js b/minter/src/components/verifier.js index cc0b801..5706533 100644 --- a/minter/src/components/verifier.js +++ b/minter/src/components/verifier.js @@ -64,6 +64,20 @@ export default function Verifier() { }, [ verificationCode ] ) + // Update verificaiton url + useEffect( f => { + + if( !username || !address || !balance ) return + if( !verifyUrl ) return + if( balance < 1 ) return + + const baseUrl = `https://mint.rocketeer.fans/#/verify/` + const message = btoa( `{ "username": "${ username }", "address": "${ address }", "balance": "${ balance }" }` ) + + setVerifyUrl( baseUrl + message ) + + }, [ username, address, balance, verifyUrl ] ) + // /////////////////////////////// // Rendering // /////////////////////////////// @@ -75,10 +89,14 @@ export default function Verifier() { if( verifyUrl ) return + + { !balance &&

Checking your on-chain balance...

} -

Verification URL

-

Post this in the Discord channel #get-verified:

-

{ verifyUrl }

+ { balance && <> +

Verification URL

+

Post this in the Discord channel #get-verified:

+

{ verifyUrl }

+ }