Skip to content

Commit

Permalink
Add reference to js-xdr master commit, fixup test
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic committed Jun 14, 2023
1 parent 193f820 commit 688be0a
Show file tree
Hide file tree
Showing 4 changed files with 1,041 additions and 996 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"buffer": "^6.0.3",
"crc": "^4.3.2",
"crypto-browserify": "^3.12.0",
"js-xdr": "git+https://github.com/stellar/js-xdr#6d3484c",
"js-xdr": "git+https://github.com/stellar/js-xdr#5dd43fb",
"lodash": "^4.17.21",
"sha.js": "^2.3.6",
"tweetnacl": "^1.0.3"
Expand Down
5 changes: 4 additions & 1 deletion src/numbers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export function scValToBigInt(scv) {

case 'scvU128':
case 'scvI128':
return new XdrLargeInt(type, [scv.value().lo(), scv.value().hi()]).toBigInt();
return new XdrLargeInt(type, [
scv.value().lo(),
scv.value().hi()
]).toBigInt();

case 'scvU256':
case 'scvI256':
Expand Down
2 changes: 1 addition & 1 deletion test/unit/i256_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('I256.fromString', function () {
});

it('fails when providing a string with a decimal place', function () {
expect(() => I256.fromString('105946095601.5')).to.throw(/Invalid/);
expect(() => I256.fromString('105946095601.5')).to.throw(/bigint-like/);
});
});

Expand Down
Loading

0 comments on commit 688be0a

Please sign in to comment.