From 2f70ac6776ca617c4d28ca6c60fa7620f3446fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Torres?= <30977845+Torres-ssf@users.noreply.github.com> Date: Mon, 11 Dec 2023 07:39:49 -0300 Subject: [PATCH] refactor: remove hacky solution to get right witness offset (#1494) --- .changeset/moody-walls-admire.md | 5 +++++ packages/transactions/src/coders/witness.test.ts | 2 -- packages/transactions/src/coders/witness.ts | 6 ------ 3 files changed, 5 insertions(+), 8 deletions(-) create mode 100644 .changeset/moody-walls-admire.md diff --git a/.changeset/moody-walls-admire.md b/.changeset/moody-walls-admire.md new file mode 100644 index 00000000000..9193ab154da --- /dev/null +++ b/.changeset/moody-walls-admire.md @@ -0,0 +1,5 @@ +--- +"@fuel-ts/transactions": minor +--- + +remove hacky solution to get right witness offset diff --git a/packages/transactions/src/coders/witness.test.ts b/packages/transactions/src/coders/witness.test.ts index fa97bc27dc1..167f6bf01d3 100644 --- a/packages/transactions/src/coders/witness.test.ts +++ b/packages/transactions/src/coders/witness.test.ts @@ -8,7 +8,6 @@ describe('WitnessCoder', () => { const witness: Witness = { dataLength: 0, data: '0x', - offset: 0, }; const encoded = hexlify(new WitnessCoder().encode(witness)); @@ -25,7 +24,6 @@ describe('WitnessCoder', () => { const witness: Witness = { dataLength: 4, data: '0xdeadbeef', - offset: 0, }; const encoded = hexlify(new WitnessCoder().encode(witness)); diff --git a/packages/transactions/src/coders/witness.ts b/packages/transactions/src/coders/witness.ts index addaa7e1a14..dc47d75107d 100644 --- a/packages/transactions/src/coders/witness.ts +++ b/packages/transactions/src/coders/witness.ts @@ -8,11 +8,6 @@ export type Witness = { dataLength: number; /** Witness data (byte[]) */ data: string; - /** - * TODO: Temporary solution, remove after fixing - * https://github.com/FuelLabs/fuels-ts/issues/1331 - */ - offset?: number; }; export class WitnessCoder extends Coder { @@ -47,7 +42,6 @@ export class WitnessCoder extends Coder { { dataLength, data: witnessData, - offset, }, o, ];