Skip to content

Commit

Permalink
refactor: remove hacky solution to get right witness offset (#1494)
Browse files Browse the repository at this point in the history
  • Loading branch information
Torres-ssf authored Dec 11, 2023
1 parent 4ecd643 commit 2f70ac6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/moody-walls-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fuel-ts/transactions": minor
---

remove hacky solution to get right witness offset
2 changes: 0 additions & 2 deletions packages/transactions/src/coders/witness.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ describe('WitnessCoder', () => {
const witness: Witness = {
dataLength: 0,
data: '0x',
offset: 0,
};

const encoded = hexlify(new WitnessCoder().encode(witness));
Expand All @@ -25,7 +24,6 @@ describe('WitnessCoder', () => {
const witness: Witness = {
dataLength: 4,
data: '0xdeadbeef',
offset: 0,
};

const encoded = hexlify(new WitnessCoder().encode(witness));
Expand Down
6 changes: 0 additions & 6 deletions packages/transactions/src/coders/witness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Witness, Witness> {
Expand Down Expand Up @@ -47,7 +42,6 @@ export class WitnessCoder extends Coder<Witness, Witness> {
{
dataLength,
data: witnessData,
offset,
},
o,
];
Expand Down

0 comments on commit 2f70ac6

Please sign in to comment.