mirror of
https://github.com/stronk-dev/RandomChad.git
synced 2025-07-05 10:35:08 +02:00
fix verify link not updated
This commit is contained in:
parent
e9b665f15d
commit
98238ac5a3
@ -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
|
||||
// ///////////////////////////////
|
||||
@ -76,9 +90,13 @@ export default function Verifier() {
|
||||
|
||||
if( verifyUrl ) return <Container>
|
||||
|
||||
{ !balance && <p>Checking your on-chain balance...</p> }
|
||||
|
||||
{ balance && <>
|
||||
<h1>Verification URL</h1>
|
||||
<p>Post this in the Discord channel #get-verified:</p>
|
||||
<p>{ verifyUrl }</p>
|
||||
</> }
|
||||
|
||||
</Container>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user