This commit is contained in:
parent
ddf53c54a9
commit
323c06c909
@ -539,12 +539,7 @@ export const VerifyPage = () => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{meta && signedStatus === SignedStatus.User_Is_Not_Next_Signer && (
|
{meta && signedStatus === SignedStatus.User_Is_Not_Next_Signer && (
|
||||||
<>
|
<DisplayMeta meta={meta} nextSigner={nextSinger} />
|
||||||
<DisplayMeta meta={meta} nextSigner={nextSinger} />
|
|
||||||
<Typography component='h6'>
|
|
||||||
Awaiting signature by {hexToNpub(nextSinger)}
|
|
||||||
</Typography>
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{meta && signedStatus === SignedStatus.User_Is_Next_Signer && (
|
{meta && signedStatus === SignedStatus.User_Is_Next_Signer && (
|
||||||
@ -750,20 +745,14 @@ const DisplayMeta = ({ meta, nextSigner }: DisplayMetaProps) => {
|
|||||||
|
|
||||||
let signedStatus = '-'
|
let signedStatus = '-'
|
||||||
|
|
||||||
if (user.role === UserRole.viewer) {
|
if (user.role === UserRole.signer) {
|
||||||
signedStatus = '-'
|
|
||||||
} else {
|
|
||||||
// check if user has signed the document
|
// check if user has signed the document
|
||||||
if (user.pubkey in meta.signedEvents) {
|
if (user.pubkey in meta.signedEvents) {
|
||||||
signedStatus = 'Signed'
|
signedStatus = 'Signed'
|
||||||
}
|
}
|
||||||
// check if user is the next signer
|
// check if user is the next signer
|
||||||
else if (user.pubkey === nextSigner) {
|
else if (user.pubkey === nextSigner) {
|
||||||
signedStatus === 'Next Singer'
|
signedStatus = 'Awaiting Signature'
|
||||||
}
|
|
||||||
// if none of the above condition is true then it means user's signature is pending
|
|
||||||
else {
|
|
||||||
signedStatus === 'Pending'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user