diff --git a/CHANGELOG.md b/CHANGELOG.md index 6712af7b..c928dcad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,26 @@ +# 2024.01.09-1115Z + +## Overview + +The current status of the libraries at the time of the release is as follows: + +| Library | Version | Status | +| ------------------------ | ------- | ---------- | +| `@dfinity/ckbtc` | v2.1.0 | Unchanged | +| `@dfinity/cketh` | v0.0.1 | Unchanged | +| `@dfinity/cmc` | v2.1.0 | Unchanged | +| `@dfinity/ic-management` | v2.1.0 | Unchanged | +| `@dfinity/ledger-icp` | v2.1.1 | Patched 🤕 | +| `@dfinity/ledger-icrc` | v2.1.0 | Unchanged | +| `@dfinity/nns` | v3.1.0 | Unchanged | +| `@dfinity/nns-proto` | v1.0.0 | Unchanged | +| `@dfinity/sns` | v2.1.0 | Unchanged | +| `@dfinity/utils` | v2.0.0 | Unchanged️ | + +## Fix + +- When `@dfinity/ledger-icp` is bundled with Rollup v4, it leads to an incompatibility issue with iOS 15. + # 2024.01.03-1115Z ## Overview diff --git a/package-lock.json b/package-lock.json index 2dd6c061..f8e76c1a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@dfinity/ic-js", - "version": "2024.01.03-1115Z", + "version": "2024.01.09-1115Z", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@dfinity/ic-js", - "version": "2024.01.03-1115Z", + "version": "2024.01.09-1115Z", "license": "Apache-2.0", "workspaces": [ "packages/utils", @@ -7188,7 +7188,7 @@ }, "packages/ledger-icp": { "name": "@dfinity/ledger-icp", - "version": "2.1.0", + "version": "2.1.1", "license": "Apache-2.0", "peerDependencies": { "@dfinity/agent": "^0.20.2", diff --git a/package.json b/package.json index f27bf592..320609d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dfinity/ic-js", - "version": "2024.01.03-1115Z", + "version": "2024.01.09-1115Z", "description": "A collection of library for interfacing with the Internet Computer.", "license": "Apache-2.0", "workspaces": [ diff --git a/packages/ledger-icp/README.md b/packages/ledger-icp/README.md index 1fb61985..41e1c155 100644 --- a/packages/ledger-icp/README.md +++ b/packages/ledger-icp/README.md @@ -166,7 +166,7 @@ const data = await metadata(); | -------------- | ------------------ | | `toUint8Array` | `() => Uint8Array` | -[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/account_identifier.ts#L111) +[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/account_identifier.ts#L109) ### :factory: LedgerCanister diff --git a/packages/ledger-icp/package.json b/packages/ledger-icp/package.json index df1f5593..a3e4aaa9 100644 --- a/packages/ledger-icp/package.json +++ b/packages/ledger-icp/package.json @@ -1,6 +1,6 @@ { "name": "@dfinity/ledger-icp", - "version": "2.1.0", + "version": "2.1.1", "description": "A library for interfacing with the ICP ledger on the Internet Computer.", "license": "Apache-2.0", "main": "dist/cjs/index.cjs.js", diff --git a/packages/ledger-icp/src/account_identifier.spec.ts b/packages/ledger-icp/src/account_identifier.spec.ts index 5cf15dd2..01cb920e 100644 --- a/packages/ledger-icp/src/account_identifier.spec.ts +++ b/packages/ledger-icp/src/account_identifier.spec.ts @@ -11,7 +11,9 @@ describe("SubAccount", () => { }); it("defines ZERO as a 32-byte zeroed array", () => { - expect(SubAccount.ZERO.toUint8Array()).toEqual(new Uint8Array(32).fill(0)); + expect(SubAccount.fromID(0).toUint8Array()).toEqual( + new Uint8Array(32).fill(0), + ); }); it("can be initialized from a principal", () => { @@ -96,7 +98,7 @@ describe("AccountIdentifier", () => { principal: Principal.fromText( "bwz3t-ercuj-owo6s-4adfr-sbu4o-l72hg-kfhc5-5sapm-tj6bn-3scho-uqe", ), - subAccount: SubAccount.ZERO, + subAccount: SubAccount.fromID(0), }).toHex(), ).toBe("df4ad42194201b15ecbbe66ff68559a126854d8141fd935c5bd53433c2fb28d4"); }); diff --git a/packages/ledger-icp/src/account_identifier.ts b/packages/ledger-icp/src/account_identifier.ts index c8478739..b52fa9c0 100644 --- a/packages/ledger-icp/src/account_identifier.ts +++ b/packages/ledger-icp/src/account_identifier.ts @@ -18,7 +18,7 @@ export class AccountIdentifier { public static fromPrincipal({ principal, - subAccount = SubAccount.ZERO, + subAccount = SubAccount.fromID(0), }: { principal: Principal; subAccount?: SubAccount; @@ -106,8 +106,6 @@ export class SubAccount { return new SubAccount(bytes); } - public static ZERO: SubAccount = this.fromID(0); - public toUint8Array(): Uint8Array { return this.bytes; }