Skip to content

Commit

Permalink
allow only positive index
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrokonrad committed Jan 29, 2025
1 parent 0038fd6 commit 606b96b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lucid/lucid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ export class Lucid {
},
): Lucid {
const index = options?.index || 0;
if (index < 0) throw new Error("Index cannot be negative");
const paymentDetails = Crypto.seedToDetails(seed, index, "Payment");
const delegationDetails = options?.addressType === "Enterprise"
? null
Expand Down

0 comments on commit 606b96b

Please sign in to comment.