Skip to content

Commit

Permalink
feat: make data2 works with ScriptConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
homura committed Nov 8, 2023
1 parent 1c33153 commit 101f60d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/config-manager/src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,14 @@ export function validateConfig(config: Config): void {

assertHash(`SCRIPTS.${scriptName}.CODE_HASH`, scriptConfig.CODE_HASH);
const hashType = scriptConfig.HASH_TYPE;
if (hashType !== "type" && hashType !== "data" && hashType !== "data1") {
if (
hashType !== "type" &&
hashType !== "data" &&
hashType !== "data1" &&
hashType !== "data2"
) {
throw new Error(
`SCRIPTS.${scriptName}.HASH_TYPE must be type, data or data1!`
`SCRIPTS.${scriptName}.HASH_TYPE must one of type, data, data1, data2!`
);
}
assertHash(`SCRIPTS.${scriptName}.TX_HASH`, scriptConfig.TX_HASH);
Expand Down

0 comments on commit 101f60d

Please sign in to comment.