Skip to content

Commit 4d81f1d

Browse files
committed
Add GH link to changelog
1 parent 55ea8e5 commit 4d81f1d

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
## Unreleased
44

55
### Breaking Changes
6-
* `ScInt` and `scValToBigInt` have been removed to simplify the API surface. Please migrate in the following way ([#XXX](https://github.com/stellar/js-stellar-base/pull/XXX)):
6+
* `XdrLargeInt` has been renamed to just `Int` ([#809](https://github.com/stellar/js-stellar-base/pull/809)).
7+
* `ScInt` and `scValToBigInt` have been removed to simplify the API surface. Please migrate in the following way ([#809](https://github.com/stellar/js-stellar-base/pull/809)):
78
```typescript
89
// before:
910
new ScInt(value);
@@ -19,7 +20,7 @@ Int.fromScVal(scv).toBigInt();
1920
```
2021

2122
### Added
22-
* `XdrLargeInt` (renamed to `Int`) has new features ([]()):
23+
* `XdrLargeInt` (renamed to `Int`) has new features ([#809](https://github.com/stellar/js-stellar-base/pull/809)):
2324
- `fromValue(x: number|string|BigInt)` will create an `Int` of an appopriate size for the given value
2425
- `fromScVal(x: xdr.ScVal)` will create an `Int` from an `ScVal`
2526
- `.toU32()` will return an `ScVal` of the type `scvU32`

test/unit/int_test.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,18 +244,16 @@ describe('creating large integers', function () {
244244
});
245245

246246
it('throws for non-integers', function () {
247-
expect(() =>
248-
Int.fromScVal(new xdr.ScVal.scvString('hello'))
249-
).to.throw(/integer/i);
247+
expect(() => Int.fromScVal(new xdr.ScVal.scvString('hello'))).to.throw(
248+
/integer/i
249+
);
250250
});
251251
});
252252

253253
describe('error handling', function () {
254254
['u64', 'u128', 'u256'].forEach((type) => {
255255
it(`throws when signed parts and {type: '${type}'}`, function () {
256-
expect(() => new StellarBase.Int(type, -2)).to.throw(
257-
/positive/i
258-
);
256+
expect(() => new StellarBase.Int(type, -2)).to.throw(/positive/i);
259257
});
260258
});
261259

test/unit/scval_test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe('parsing and building ScVals', function () {
4040
xdr.ScVal.scvMap([
4141
new xdr.ScMapEntry({
4242
key: xdr.ScVal.scvString('arbitrary'),
43-
val: xdr.ScVal.scvU32(1),
43+
val: xdr.ScVal.scvU32(1)
4444
}),
4545
new xdr.ScMapEntry({
4646
key: xdr.ScVal.scvString('etc'),
@@ -80,7 +80,9 @@ describe('parsing and building ScVals', function () {
8080
// iterate for granular errors on failures
8181
targetScv.value().forEach((entry, idx) => {
8282
const actual = scv.value()[idx];
83-
expect(JSON.stringify(entry, null, 2)).to.eql(JSON.stringify(actual, null, 2));
83+
expect(JSON.stringify(entry, null, 2)).to.eql(
84+
JSON.stringify(actual, null, 2)
85+
);
8486
expect(entry).to.deep.equal(
8587
actual,
8688
`item ${idx} doesn't match: ${JSON.stringify(entry, null, 2)} != ${JSON.stringify(actual, null, 2)}`

0 commit comments

Comments
 (0)