Skip to content

Commit

Permalink
moving throw error within try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
pellicceama committed Nov 1, 2022
1 parent 02bd946 commit 30a7ea0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/utils/verifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ export async function setAdminVerificationForMap(signature: string, map: AssetMa
}

export async function attemptTcrVerificationForAsset(networkCode: string, address?: string): Promise<VerificationAttemptResult> {
// If ethereum, check the kleros tcr and map3 tcr to see if its verified and produce the verification. Otherwise just the map3tcr

if(networkCode !== 'ethereum' || !address) {
throw new Error(`Invalid network code or address for TCR verification`);
}

try {
// If ethereum, check the kleros tcr and map3 tcr to see if its verified and produce the verification. Otherwise just the map3tcr

if(networkCode !== 'ethereum' || !address) {
throw new Error(`Invalid network code or address for TCR verification`);
}
const klerosTcrResult = await checkIfAssetInKlerosTCR(address);

if(!klerosTcrResult.inTcr) {
Expand Down

0 comments on commit 30a7ea0

Please sign in to comment.