fix: redundant updates
Some checks failed
Open PR on Staging / audit_and_check (pull_request) Failing after 32s
Some checks failed
Open PR on Staging / audit_and_check (pull_request) Failing after 32s
This commit is contained in:
parent
19b815e528
commit
2d0212fd6c
@ -224,7 +224,6 @@ export const VerifyPage = () => {
|
|||||||
parsedSignatureEvents
|
parsedSignatureEvents
|
||||||
) {
|
) {
|
||||||
if (timestamps.every((t) => !!t.verification)) {
|
if (timestamps.every((t) => !!t.verification)) {
|
||||||
console.log('Timestamps are fully verified')
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const upgradeT = async (timestamps: OpenTimestamp[]) => {
|
const upgradeT = async (timestamps: OpenTimestamp[]) => {
|
||||||
@ -276,7 +275,6 @@ export const VerifyPage = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (userTimestamps.every((t) => !!t.verification)) {
|
if (userTimestamps.every((t) => !!t.verification)) {
|
||||||
console.log('user timestamps are verified')
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,9 +292,7 @@ export const VerifyPage = () => {
|
|||||||
return timestamp
|
return timestamp
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log('upgraded timestamps: ', upgradedTimestamps)
|
if (upgradedTimestamps.length === 0) {
|
||||||
|
|
||||||
if (upgradedUserTimestamps.length === 0) {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -325,7 +321,6 @@ export const VerifyPage = () => {
|
|||||||
updatedMeta.modifiedAt = unixNow()
|
updatedMeta.modifiedAt = unixNow()
|
||||||
|
|
||||||
const updatedEvent = await updateUsersAppData(updatedMeta)
|
const updatedEvent = await updateUsersAppData(updatedMeta)
|
||||||
console.log('updated event: ', updatedEvent)
|
|
||||||
if (!updatedEvent) return
|
if (!updatedEvent) return
|
||||||
|
|
||||||
const userSet = new Set<`npub1${string}`>()
|
const userSet = new Set<`npub1${string}`>()
|
||||||
|
@ -44,7 +44,6 @@ export const upgradeAndVerifyTimestamp = async (
|
|||||||
export const upgrade = async (
|
export const upgrade = async (
|
||||||
t: OpenTimestamp
|
t: OpenTimestamp
|
||||||
): Promise<OpenTimestampUpgradeVerifyResponse> => {
|
): Promise<OpenTimestampUpgradeVerifyResponse> => {
|
||||||
console.log('timestamp: ', t)
|
|
||||||
const detachedTimestamp =
|
const detachedTimestamp =
|
||||||
window.OpenTimestamps.DetachedTimestampFile.deserialize(
|
window.OpenTimestamps.DetachedTimestampFile.deserialize(
|
||||||
hexStringToUint8Array(t.value)
|
hexStringToUint8Array(t.value)
|
||||||
|
Loading…
Reference in New Issue
Block a user