Skip to content

Commit e66529a

Browse files
committed
throw exception if WithState is false and fill AnchorLedgerHash
1 parent f8d647a commit e66529a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,6 +1226,10 @@ ChainsqlAPI.prototype.createSchema = function(schemaInfo){
12261226
throw new Error("Missing field AnchorLedgerHash");
12271227
}
12281228
schemaCreateTxJson.AnchorLedgerHash = schemaInfo.AnchorLedgerHash;
1229+
}else{
1230+
if(schemaInfo.AnchorLedgerHash){
1231+
throw new Error("Field 'AnchorLedgerHash' is unnecessary");
1232+
}
12291233
}
12301234

12311235
this.payment = schemaCreateTxJson;

0 commit comments

Comments
 (0)