From 3b980dc4c065e5fd8341c40a7297213ec4936b4e Mon Sep 17 00:00:00 2001 From: clangenb <37865735+clangenb@users.noreply.github.com> Date: Sat, 9 Nov 2024 14:05:43 +0100 Subject: [PATCH] Fix: make `NotesBucketInfo` fields options (#121) * [types] fix `NotesBucketInfo` type * change integration test such that it works on a blank worker state * skip test again * v0.17.0-alpha.1 --- lerna.json | 2 +- packages/node-api/package.json | 4 ++-- packages/types/package.json | 2 +- .../src/interfaces/integriteeWorker/definitions.ts | 4 ++-- .../types/src/interfaces/integriteeWorker/types.ts | 4 ++-- packages/util/package.json | 2 +- packages/worker-api/package.json | 8 ++++---- packages/worker-api/src/integriteeWorker.spec.ts | 4 ++-- yarn.lock | 14 +++++++------- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/lerna.json b/lerna.json index a05472e..2e85cf6 100644 --- a/lerna.json +++ b/lerna.json @@ -6,5 +6,5 @@ "publishConfig": { "directory": "build" }, - "version": "0.17.0-alpha.0" + "version": "0.17.0-alpha.1" } diff --git a/packages/node-api/package.json b/packages/node-api/package.json index 8f917df..04809f9 100644 --- a/packages/node-api/package.json +++ b/packages/node-api/package.json @@ -18,10 +18,10 @@ }, "sideEffects": false, "type": "module", - "version": "0.17.0-alpha.0", + "version": "0.17.0-alpha.1", "main": "index.js", "dependencies": { - "@encointer/types": "^0.17.0-alpha.0", + "@encointer/types": "^0.17.0-alpha.1", "@polkadot/api": "^11.2.1", "tslib": "^2.6.2" }, diff --git a/packages/types/package.json b/packages/types/package.json index 823a133..e2593be 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -18,7 +18,7 @@ }, "sideEffects": false, "type": "module", - "version": "0.17.0-alpha.0", + "version": "0.17.0-alpha.1", "main": "index.js", "scripts": { "generate:defs": "node --experimental-specifier-resolution=node --loader ts-node/esm ../../node_modules/.bin/polkadot-types-from-defs --package @encointer/types/interfaces --input ./src/interfaces", diff --git a/packages/types/src/interfaces/integriteeWorker/definitions.ts b/packages/types/src/interfaces/integriteeWorker/definitions.ts index 8aae261..d7ac94c 100644 --- a/packages/types/src/interfaces/integriteeWorker/definitions.ts +++ b/packages/types/src/interfaces/integriteeWorker/definitions.ts @@ -207,8 +207,8 @@ export default { bytes: 'u32', }, NotesBucketInfo: { - first: 'BucketInfo', - last: 'BucketInfo', + first: 'Option', + last: 'Option', }, GuessTheNumberPublicGetter: { _enum: { diff --git a/packages/types/src/interfaces/integriteeWorker/types.ts b/packages/types/src/interfaces/integriteeWorker/types.ts index 40ac12a..9267269 100644 --- a/packages/types/src/interfaces/integriteeWorker/types.ts +++ b/packages/types/src/interfaces/integriteeWorker/types.ts @@ -295,8 +295,8 @@ export interface NoteIndex extends u64 {} /** @name NotesBucketInfo */ export interface NotesBucketInfo extends Struct { - readonly first: BucketInfo; - readonly last: BucketInfo; + readonly first: Option; + readonly last: Option; } /** @name NotesForArgs */ diff --git a/packages/util/package.json b/packages/util/package.json index 16ec101..76cc8cb 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -20,7 +20,7 @@ "sideEffects": false, "type": "module", "types": "./index.d.ts", - "version": "0.17.0-alpha.0", + "version": "0.17.0-alpha.1", "main": "index.js", "dependencies": { "@babel/runtime": "^7.18.9", diff --git a/packages/worker-api/package.json b/packages/worker-api/package.json index 595e851..18b3bbd 100644 --- a/packages/worker-api/package.json +++ b/packages/worker-api/package.json @@ -19,12 +19,12 @@ "sideEffects": false, "type": "module", "types": "./index.d.ts", - "version": "0.17.0-alpha.0", + "version": "0.17.0-alpha.1", "main": "index.js", "dependencies": { - "@encointer/node-api": "^0.17.0-alpha.0", - "@encointer/types": "^0.17.0-alpha.0", - "@encointer/util": "^0.17.0-alpha.0", + "@encointer/node-api": "^0.17.0-alpha.1", + "@encointer/types": "^0.17.0-alpha.1", + "@encointer/util": "^0.17.0-alpha.1", "@peculiar/webcrypto": "^1.4.6", "@polkadot/api": "^11.2.1", "@polkadot/keyring": "^12.6.2", diff --git a/packages/worker-api/src/integriteeWorker.spec.ts b/packages/worker-api/src/integriteeWorker.spec.ts index 78e12f0..c0dc399 100644 --- a/packages/worker-api/src/integriteeWorker.spec.ts +++ b/packages/worker-api/src/integriteeWorker.spec.ts @@ -140,11 +140,11 @@ describe('worker', () => { it('should return balance transfer with note as note', async () => { const shard = network.shard; const result = await worker.trustedBalanceTransfer( - charlie, + alice, shard, network.mrenclave, - charlie.address, alice.address, + charlie.address, 1100000000000, "My test note" ); diff --git a/yarn.lock b/yarn.lock index 0572f8b..4ce1565 100644 --- a/yarn.lock +++ b/yarn.lock @@ -755,18 +755,18 @@ __metadata: languageName: node linkType: hard -"@encointer/node-api@npm:^0.17.0-alpha.0, @encointer/node-api@workspace:packages/node-api": +"@encointer/node-api@npm:^0.17.0-alpha.1, @encointer/node-api@workspace:packages/node-api": version: 0.0.0-use.local resolution: "@encointer/node-api@workspace:packages/node-api" dependencies: - "@encointer/types": "npm:^0.17.0-alpha.0" + "@encointer/types": "npm:^0.17.0-alpha.1" "@polkadot/api": "npm:^11.2.1" "@polkadot/util-crypto": "npm:^12.6.2" tslib: "npm:^2.6.2" languageName: unknown linkType: soft -"@encointer/types@npm:^0.17.0-alpha.0, @encointer/types@workspace:packages/types": +"@encointer/types@npm:^0.17.0-alpha.1, @encointer/types@workspace:packages/types": version: 0.0.0-use.local resolution: "@encointer/types@workspace:packages/types" dependencies: @@ -781,7 +781,7 @@ __metadata: languageName: unknown linkType: soft -"@encointer/util@npm:^0.17.0-alpha.0, @encointer/util@workspace:packages/util": +"@encointer/util@npm:^0.17.0-alpha.1, @encointer/util@workspace:packages/util": version: 0.0.0-use.local resolution: "@encointer/util@workspace:packages/util" dependencies: @@ -798,9 +798,9 @@ __metadata: version: 0.0.0-use.local resolution: "@encointer/worker-api@workspace:packages/worker-api" dependencies: - "@encointer/node-api": "npm:^0.17.0-alpha.0" - "@encointer/types": "npm:^0.17.0-alpha.0" - "@encointer/util": "npm:^0.17.0-alpha.0" + "@encointer/node-api": "npm:^0.17.0-alpha.1" + "@encointer/types": "npm:^0.17.0-alpha.1" + "@encointer/util": "npm:^0.17.0-alpha.1" "@peculiar/webcrypto": "npm:^1.4.6" "@polkadot/api": "npm:^11.2.1" "@polkadot/keyring": "npm:^12.6.2"