Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions test/unit/memo_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ describe('Memo.id()', function () {
expect(() => StellarBase.Memo.id('-1')).to.throw(/Expects a uint64/);
// decimal
expect(() => StellarBase.Memo.id('1.5')).to.throw(/Expects a uint64/);
// trailing decimal zero (BigNumber accepts but must be rejected)
expect(() => StellarBase.Memo.id('1.0')).to.throw(/Expects a uint64/);
// scientific notation (BigNumber accepts but BigInt()/UnsignedHyper crashes)
expect(() => StellarBase.Memo.id('1e18')).to.throw(/Expects a uint64/);
// overflow: 2^64 silently became 0 before this fix
expect(() => StellarBase.Memo.id('18446744073709551616')).to.throw(
/Expects a uint64/
Expand Down
Loading