Skip to content

Commit 5dfec3f

Browse files
committed
style: format WithdrawFee class for improved readability
1 parent 63bbd2d commit 5dfec3f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

governance/xc_admin/packages/xc_admin_common/src/__tests__/GovernancePayload.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,11 @@ function governanceActionArb(): Arbitrary<PythGovernanceAction> {
439439
amount: fc.bigUintN(256),
440440
})
441441
.map(({ targetAddress, amount }) => {
442-
return new WithdrawFee(header.targetChainId, Buffer.from(targetAddress, 'hex'), amount);
442+
return new WithdrawFee(
443+
header.targetChainId,
444+
Buffer.from(targetAddress, "hex"),
445+
amount,
446+
);
443447
});
444448
} else {
445449
throw new Error("Unsupported action type");

governance/xc_admin/packages/xc_admin_common/src/governance_payload/WithdrawFee.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class WithdrawFee extends PythGovernanceActionImpl {
1212
Readonly<{ targetAddress: string; amount: bigint }>
1313
> = BufferLayout.struct([
1414
BufferLayoutExt.hexBytes(20, "targetAddress"), // Ethereum address as hex string
15-
BufferLayoutExt.u256be("amount"), // uint256 for amount in wei
15+
BufferLayoutExt.u256be("amount"), // uint256 for amount in wei
1616
]);
1717

1818
constructor(
@@ -33,14 +33,14 @@ export class WithdrawFee extends PythGovernanceActionImpl {
3333

3434
return new WithdrawFee(
3535
decoded[0].targetChainId,
36-
Buffer.from(decoded[1].targetAddress, 'hex'),
36+
Buffer.from(decoded[1].targetAddress, "hex"),
3737
decoded[1].amount,
3838
);
3939
}
4040

4141
encode(): Buffer {
4242
return super.encodeWithPayload(WithdrawFee.layout, {
43-
targetAddress: this.targetAddress.toString('hex'),
43+
targetAddress: this.targetAddress.toString("hex"),
4444
amount: this.amount,
4545
});
4646
}

0 commit comments

Comments
 (0)