Skip to content

Commit

Permalink
add TODO comment + fix divisibility conditional (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinfaveri authored Apr 13, 2024
1 parent 5832758 commit 5f11bae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ const u128Strict = (n: bigint) => {
return u128(bigN);
};

// TODO: Add unit tests
/**
* Low level function to allow for encoding runestones without any indexer and transaction checks.
*
Expand Down Expand Up @@ -147,7 +148,7 @@ export function encodeRunestoneUnsafe(runestone: RunestoneSpec): Buffer {
: None;
const symbol = etchingSpec.symbol ? Some(etchingSpec.symbol) : None;

if (divisibility.isSome() && divisibility.unwrap() < MAX_DIVISIBILITY) {
if (divisibility.isSome() && divisibility.unwrap() > MAX_DIVISIBILITY) {
throw Error(`Divisibility is greater than protocol max ${MAX_DIVISIBILITY}`);
}

Expand Down

0 comments on commit 5f11bae

Please sign in to comment.