Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
22388o committed Dec 3, 2024
1 parent 8d8553f commit c1c7277
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bolt12.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,7 @@ function hrpToMillisat(hrpString, outputString) {
) {
throw new Error('Amount is outside of valid range');
}

return outputString ? millisatoshisBN.toString
if (millisatoshisBN < 0) {
throw new Error('Amount is outside of valid range');
}
return outputString ? millisatoshisBN.toString() : millisatoshisBN;

0 comments on commit c1c7277

Please sign in to comment.