aboutsummaryrefslogtreecommitdiff
path: root/src/types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/types.ts')
-rw-r--r--src/types.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/types.ts b/src/types.ts
index 39d374069..8f24fda90 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -360,8 +360,15 @@ interface Merchant {
instance?: string;
}
-@Checkable.Class
+@Checkable.ClassWithValidator
export class Contract {
+
+ validate() {
+ if (this.exchanges.length == 0) {
+ throw Error("no exchanges in contract");
+ }
+ }
+
@Checkable.String
H_wire: string;