Skip to content

Commit

Permalink
refactor(crypto): use transactionId ref in lockTransactionId schema d…
Browse files Browse the repository at this point in the history
…efinition (#3246)
  • Loading branch information
spkjp committed Nov 22, 2019
1 parent 166b1da commit 1f5aee4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/crypto/src/transactions/types/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export const htlcClaim = extend(transactionBaseSchema, {
type: "object",
required: ["lockTransactionId", "unlockSecret"],
properties: {
lockTransactionId: { allOf: [{ minLength: 64, maxLength: 64 }, { $ref: "hex" }] },
lockTransactionId: { $ref: "transactionId" },
unlockSecret: { type: "string", minLength: 32, maxLength: 32 },
},
},
Expand All @@ -308,7 +308,7 @@ export const htlcRefund = extend(transactionBaseSchema, {
type: "object",
required: ["lockTransactionId"],
properties: {
lockTransactionId: { allOf: [{ minLength: 64, maxLength: 64 }, { $ref: "hex" }] },
lockTransactionId: { $ref: "transactionId" },
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/src/validation/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const schemas = {

transactionId: {
$id: "transactionId",
allOf: [{ minLength: 64, maxLength: 64 }, { $ref: "alphanumeric" }],
allOf: [{ minLength: 64, maxLength: 64 }, { $ref: "hex" }],
},

networkByte: {
Expand Down

0 comments on commit 1f5aee4

Please sign in to comment.