Skip to content

Commit d051ae3

Browse files
committed
chore: cleanup
1 parent 39105c6 commit d051ae3

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

__tests__/utils/CairoTypes/uint256.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,25 @@ describe('CairoUint256 class test', () => {
3030
test('constructor 2 should throw out of bounds', () => {
3131
expect(() => {
3232
new CairoUint256(UINT_256_LOW_MIN - 1n, 1000);
33-
}).toThrow('low is our of range UINT_256_LOW_MIN - UINT_256_LOW_MAX');
33+
}).toThrow('low is out of range UINT_256_LOW_MIN - UINT_256_LOW_MAX');
3434
});
3535

3636
test('constructor 2 should throw out of bounds', () => {
3737
expect(() => {
3838
new CairoUint256(UINT_256_LOW_MAX + 1n, 1000);
39-
}).toThrow('low is our of range UINT_256_LOW_MIN - UINT_256_LOW_MAX');
39+
}).toThrow('low is out of range UINT_256_LOW_MIN - UINT_256_LOW_MAX');
4040
});
4141

4242
test('constructor 2 should throw out of bounds', () => {
4343
expect(() => {
4444
new CairoUint256(1000, UINT_256_HIGH_MIN - 1n);
45-
}).toThrow('high is our of range UINT_256_HIGH_MIN - UINT_256_HIGH_MAX');
45+
}).toThrow('high is out of range UINT_256_HIGH_MIN - UINT_256_HIGH_MAX');
4646
});
4747

4848
test('constructor 2 should throw out of bounds', () => {
4949
expect(() => {
5050
new CairoUint256(1000, UINT_256_HIGH_MAX + 1n);
51-
}).toThrow('high is our of range UINT_256_HIGH_MIN - UINT_256_HIGH_MAX');
51+
}).toThrow('high is out of range UINT_256_HIGH_MIN - UINT_256_HIGH_MAX');
5252
});
5353

5454
test('constructor 3 ({low, high})', () => {
@@ -59,7 +59,7 @@ describe('CairoUint256 class test', () => {
5959
test('constructor 3 should throw out of bounds', () => {
6060
expect(() => {
6161
new CairoUint256({ low: 1000, high: UINT_256_HIGH_MAX + 1n });
62-
}).toThrow('high is our of range UINT_256_HIGH_MIN - UINT_256_HIGH_MAX');
62+
}).toThrow('high is out of range UINT_256_HIGH_MIN - UINT_256_HIGH_MAX');
6363
});
6464

6565
test('validate should throw on < UINT_256_MIN', () => {

package-lock.json

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/cairoDataTypes/uint256.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export class CairoUint256 {
7474
throw new Error('low is out of range UINT_256_LOW_MIN - UINT_256_LOW_MAX');
7575
}
7676
if (bigIntHigh < UINT_256_HIGH_MIN || bigIntHigh > UINT_256_HIGH_MAX) {
77-
throw new Error('high is our of range UINT_256_HIGH_MIN - UINT_256_HIGH_MAX');
77+
throw new Error('high is out of range UINT_256_HIGH_MIN - UINT_256_HIGH_MAX');
7878
}
7979
return { low: bigIntLow, high: bigIntHigh };
8080
}

src/utils/uint256.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
import { BigNumberish, Uint256 } from '../types';
33
import { CairoUint256, UINT_128_MAX, UINT_256_MAX } from './cairoDataTypes/uint256';
44

5-
// Legacy support Export
5+
/**
6+
* @deprecated Legacy support Export
7+
*/
68
export { UINT_128_MAX, UINT_256_MAX };
79

810
/**
911
* Convert Uint256 to bigint
1012
* Legacy support Export
11-
* @
1213
*/
1314
export function uint256ToBN(uint256: Uint256) {
1415
return new CairoUint256(uint256).toBigInt();

0 commit comments

Comments
 (0)