Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
make error more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
lamafab committed Sep 29, 2022
1 parent 9956857 commit ecc9652
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions charts/polkadot-registrar-watcher/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: Polkadot Watcher
name: polkadot-registrar-watcher
version: v0.4.0
appVersion: v0.4.0
version: v0.4.1
appVersion: v0.4.1
apiVersion: v2
12 changes: 6 additions & 6 deletions src/subscriber/subscriber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,32 +270,32 @@ export class Subscriber implements ISubscriber {
switch (field.accountTy) {
case "legal_name":
if (field.value != info.legal.toHuman()) {
throw new Error("Verified legal name does not mache on-chain value");
throw new Error(`Verified legal name does not mache on-chain value. Expected ${field.value}, found: ${info.legal.toHuman()}`);
}
break;
case "display_name":
if (field.value != info.display.toHuman()) {
throw new Error("Verified display name does not mache on-chain value");
throw new Error(`Verified display name does not mache on-chain value. Expected ${field.value}, found: ${info.display.toHuman()}`);
}
break;
case "email":
if (field.value != info.email.toHuman()) {
throw new Error("Verified email does not mache on-chain value");
throw new Error(`Verified email does not mache on-chain value. Expected ${field.value}, found: ${info.email.toHuman()}`);
}
break;
case "twitter":
if (field.value != info.twitter.toHuman()) {
throw new Error("Verified twitter does not mache on-chain value");
throw new Error(`Verified twitter does not mache on-chain value. Expected ${field.value}, found: ${info.twitter.toHuman()}`);
}
break;
case "matrix":
if (field.value != info.riot.toHuman()) {
throw new Error("Verified matrix does not mache on-chain value");
throw new Error(`Verified matrix does not mache on-chain value. Expected ${field.value}, found: ${info.riot.toHuman()}`);
}
break;
case "web":
if (field.value != info.web.toHuman()) {
throw new Error("Verified web does not mache on-chain value");
throw new Error(`Verified web does not mache on-chain value. Expected ${field.value}, found: ${info.web.toHuman()}`);
}
break;
default:
Expand Down

0 comments on commit ecc9652

Please sign in to comment.