mirror of
https://github.com/0xPARC/zkmessage.xyz.git
synced 2026-01-08 22:07:58 -05:00
changed verification console log messages
This commit is contained in:
@@ -50,25 +50,25 @@ export const SelectGroup: React.FC<SelectGroupProps> = (props) => {
|
||||
const [searchValue, setSearchValue] = useState("")
|
||||
const [loading, setLoading] = useState(false)
|
||||
|
||||
const loadOptions = useDebouncedCallback<
|
||||
(inputValue: string) => Promise<User[]>
|
||||
>(async (inputValue: string) => {
|
||||
setLoading(true)
|
||||
const res = await fetch(
|
||||
`/api/search/users?twitterHandle=${encodeURIComponent(inputValue)}`,
|
||||
{ method: "POST" }
|
||||
)
|
||||
|
||||
if (res.status === 200) {
|
||||
const { users } = await res.json()
|
||||
console.log("got users", users)
|
||||
setLoading(false)
|
||||
return users
|
||||
} else {
|
||||
setLoading(false)
|
||||
return []
|
||||
}
|
||||
}, 500)
|
||||
const loadOptions = useDebouncedCallback(
|
||||
(inputValue: string, callback: (group: User[]) => void) => {
|
||||
setLoading(true)
|
||||
fetch(
|
||||
`/api/search/users?twitterHandle=${encodeURIComponent(inputValue)}`,
|
||||
{ method: "POST" }
|
||||
).then(async (res) => {
|
||||
if (res.status === 200) {
|
||||
const { users } = await res.json()
|
||||
setLoading(false)
|
||||
callback(users)
|
||||
} else {
|
||||
setLoading(false)
|
||||
callback([])
|
||||
}
|
||||
})
|
||||
},
|
||||
200
|
||||
)
|
||||
|
||||
const isClearable = useMemo(
|
||||
() => props.group.some((user) => user.publicKey !== user?.publicKey),
|
||||
|
||||
@@ -53,7 +53,7 @@ export async function verifyMessage(
|
||||
return false
|
||||
}
|
||||
|
||||
console.log("message hash is good.")
|
||||
console.log("message hashes match!")
|
||||
console.log("verifying message proof...")
|
||||
const verified = await snarkjs.groth16.verify(
|
||||
vKeys.sign,
|
||||
@@ -61,7 +61,7 @@ export async function verifyMessage(
|
||||
message.proof
|
||||
)
|
||||
if (verified) {
|
||||
console.log("message proof is good.")
|
||||
console.log("message proof is valid!")
|
||||
} else {
|
||||
console.error("invalid message proof!")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user