diff --git a/CHANGELOG.md b/CHANGELOG.md index 07c3f4f32..1acd02c94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [5.24.3](https://github.com/starknet-io/starknet.js/compare/v5.24.2...v5.24.3) (2023-11-20) + +### Bug Fixes + +- correct syncing type ([41f9d8a](https://github.com/starknet-io/starknet.js/commit/41f9d8a0d1b69c569e7a3aa55cec09f105c32356)) + ## [5.24.2](https://github.com/starknet-io/starknet.js/compare/v5.24.1...v5.24.2) (2023-11-17) ### Bug Fixes diff --git a/__mocks__/cairo/helloCairo2/hellocairo b/__mocks__/cairo/helloCairo2/hellocairo index 9fe322db5..87af4940b 100644 --- a/__mocks__/cairo/helloCairo2/hellocairo +++ b/__mocks__/cairo/helloCairo2/hellocairo @@ -110,7 +110,7 @@ trait IHelloStarknet { fn echo_array(self: @TContractState, data: Array) -> Array; fn echo_array_u256(self: @TContractState, data: Array) -> Array; fn echo_array_bool(self: @TContractState, data: Array) -> Array; - // unamed Tuple + // unnamed Tuple fn echo_un_tuple(self: @TContractState, a: (felt252, u16)) -> (felt252, u16); // echo Struct fn echo_struct(self: @TContractState, tt: Foo) -> Foo; @@ -362,7 +362,7 @@ mod HelloStarknet { data } - // unamed Tuple + // unnamed Tuple fn echo_un_tuple(self: @ContractState, a: (felt252, u16)) -> (felt252, u16) { a } diff --git a/__mocks__/cairo/helloSierra/hello.cairo b/__mocks__/cairo/helloSierra/hello.cairo index 2daf7302b..e2b733751 100644 --- a/__mocks__/cairo/helloSierra/hello.cairo +++ b/__mocks__/cairo/helloSierra/hello.cairo @@ -302,7 +302,7 @@ mod HelloStarknet { data } - // unamed Tuple + // unnamed Tuple #[view] fn echo_un_tuple(a:(felt252, u16)) -> (felt252, u16) { a diff --git a/__tests__/cairo1.test.ts b/__tests__/cairo1.test.ts index 15d89be00..093d7c17f 100644 --- a/__tests__/cairo1.test.ts +++ b/__tests__/cairo1.test.ts @@ -243,7 +243,7 @@ describeIfDevnet('Cairo 1 Devnet', () => { const status = await cairo1Contract.echo_array([123, 55, 77, 255]); expect(status).toEqual([123n, 55n, 77n, 255n]); - // uint256 defiend as number + // uint256 defined as number const status1 = await cairo1Contract.echo_array_u256([123, 55, 77, 255]); expect(status1).toEqual([123n, 55n, 77n, 255n]); diff --git a/__tests__/cairo1v2.test.ts b/__tests__/cairo1v2.test.ts index 728092c03..c1692c679 100644 --- a/__tests__/cairo1v2.test.ts +++ b/__tests__/cairo1v2.test.ts @@ -293,7 +293,7 @@ describe('Cairo 1', () => { const status = await cairo1Contract.echo_array([123, 55, 77, 255]); expect(status).toEqual([123n, 55n, 77n, 255n]); - // uint256 defiend as number + // uint256 defined as number const status1 = await cairo1Contract.echo_array_u256([123, 55, 77, 255]); expect(status1).toEqual([123n, 55n, 77n, 255n]); diff --git a/package-lock.json b/package-lock.json index 34a2d355b..a9a371c0d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "starknet", - "version": "5.24.2", + "version": "5.24.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "starknet", - "version": "5.24.2", + "version": "5.24.3", "license": "MIT", "dependencies": { "@noble/curves": "~1.2.0", diff --git a/package.json b/package.json index b298e5448..c74440b49 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "starknet", - "version": "5.24.2", + "version": "5.24.3", "description": "JavaScript library for Starknet", "main": "dist/index.js", "module": "dist/index.mjs", diff --git a/src/provider/errors.ts b/src/provider/errors.ts index 143671448..2824dec64 100644 --- a/src/provider/errors.ts +++ b/src/provider/errors.ts @@ -29,7 +29,7 @@ export class CustomError extends Error { // because typescript __extends implementation can't // see https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work fixProto(this, new.target.prototype); - // try to remove contructor from stack trace + // try to remove constructor from stack trace fixStack(this); } } diff --git a/src/types/api/rpcspec/nonspec.ts b/src/types/api/rpcspec/nonspec.ts index 26c501c61..3e6b5ace4 100644 --- a/src/types/api/rpcspec/nonspec.ts +++ b/src/types/api/rpcspec/nonspec.ts @@ -58,7 +58,7 @@ export type StateUpdate = STATE_UPDATE | PENDING_STATE_UPDATE; // response starknet_traceBlockTransactions export type BlockTransactionsTraces = { transaction_hash: FELT; trace_root: TRANSACTION_TRACE }[]; // response starknet_syncing -export type Syncing = boolean | SYNC_STATUS; +export type Syncing = false | SYNC_STATUS; // response starknet_getEvents export type Events = EVENTS_CHUNK; // response starknet_addInvokeTransaction diff --git a/src/utils/stark.ts b/src/utils/stark.ts index 7369254a0..2d0e454a2 100644 --- a/src/utils/stark.ts +++ b/src/utils/stark.ts @@ -86,7 +86,7 @@ export function signatureToHexArray(sig?: Signature): ArraySignatureType { * Convert estimated fee to max fee with overhead */ export function estimatedFeeToMaxFee(estimatedFee: BigNumberish, overhead: number = 0.5): bigint { - // BN can only handle Integers, so we need to do all calulations with integers + // BN can only handle Integers, so we need to do all calculations with integers const overHeadPercent = Math.round((1 + overhead) * 100); return (toBigInt(estimatedFee) * toBigInt(overHeadPercent)) / 100n; }