Skip to content

Commit

Permalink
sucess display
Browse files Browse the repository at this point in the history
  • Loading branch information
Rashmi-278 committed May 24, 2024
1 parent 498e96c commit ae49836
Showing 1 changed file with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ const RegistrationForm = ({ toggleRegScreen, setRegistrationData }) => {
const [showEASRegisterDialog, setShowEASRegisterDialog] = useState(false);
const [attestationUID, setAttestationUID] = useState(null)
const [attestationURL, setAttestationURL] = useState("");
const [attestationScanURL, setAttestationScanURL] = useState("");

const [easNetworkID, setEasNetworkID] = useState(1);
const onChangeEASNetworkID = (e) => {
const networkID = parseInt(e.target.value, 10);
Expand Down Expand Up @@ -334,6 +336,11 @@ const RegistrationForm = ({ toggleRegScreen, setRegistrationData }) => {
chain.id === 11155420
? "https://optimism-sepolia.easscan.org/schema/view"
: "https://optimism.easscan.org/schema/view";

let easscanAttestationURL =
chain.id === 11155420
? "https://optimism-sepolia.easscan.org/attestation/view"
: "https://optimism.easscan.org/attestation/view";
let schemaUid =
chain.id === 11155420
? "0x306fda1c3128d08699d4c5b4e3f397fa31c8f5927b0e751f40f45ee1273ac504"
Expand Down Expand Up @@ -451,6 +458,7 @@ const RegistrationForm = ({ toggleRegScreen, setRegistrationData }) => {

if (newAttestationUID) {
setAttestationURL(`${easscanURL}/${schemaUid}`);
setAttestationScanURL(`${easscanAttestationURL}/${newAttestationUID}`)
setAttestationUID(newAttestationUID)
setShowEASRegisterDialog(true);
}
Expand Down Expand Up @@ -925,16 +933,13 @@ const RegistrationForm = ({ toggleRegScreen, setRegistrationData }) => {
<p style={{ fontSize: "15px" }}>
<strong>Congratulations, DAO registered.</strong>
</p>
<p style={{ fontSize: "18px" }}>
<strong>{attestationUID} Attestation Confirmed</strong>
</p>

</div>
<div
style={{
margin: "60px 24px",
display: "flex",
justifyContent: "center",
gap: "12px"
}}
>
<AnchorButton
Expand All @@ -944,7 +949,16 @@ const RegistrationForm = ({ toggleRegScreen, setRegistrationData }) => {
icon="share"
fill={false}
>
View onchain
View Schema
</AnchorButton>
<AnchorButton
intent="primary"
href={attestationScanURL}
target="_blank"
icon="share"
fill={false}
>
View Attestation
</AnchorButton>
</div>
</div>
Expand Down

0 comments on commit ae49836

Please sign in to comment.