Skip to content

Commit

Permalink
Merge pull request #23 from sprotest/fix/file-validation
Browse files Browse the repository at this point in the history
fix frontend error message for file not found
  • Loading branch information
tafonina authored Nov 17, 2023
2 parents 6065564 + 0a4489f commit 968c255
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ui/core/src/components/document/VerificationFileEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,13 @@ export default {

this.isFileInvalidated = false

const result = await this.wallet().verifyHash(this.hash)
let result

try {
result = await this.wallet().verifyHash(this.hash)
} catch (e) {
throw new Error('UNABLE_TO_VERIFY_HASH')
}

const transaction = await this.wallet().web3.eth.getTransaction(result)
this.creator = transaction.from
Expand Down Expand Up @@ -330,6 +336,8 @@ export default {

if (this.wallet().isPublicRPCUsing) {
this.errorPublicRPC = true
} else if (e?.message === 'UNABLE_TO_VERIFY_HASH') {
this.validationException = false
} else {
this.errorValidating = true
}
Expand Down

0 comments on commit 968c255

Please sign in to comment.