Skip to content

Commit

Permalink
fix: use better parameter name (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
iherger authored Sep 26, 2023
1 parent 4dfd558 commit 5dec4c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/strong-pugs-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@enzymefinance/sdk": patch
---

Use better parameter name
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const takeOrderEncoding = [
type: "uint256",
},
{
name: "minIncomingAsset",
name: "incomingAsset",
type: "address",
},
{
Expand All @@ -35,7 +35,7 @@ export type TakeOrderArgs = {
pool: Address;
outgoingAsset: Address;
outgoingAssetAmount: bigint;
minIncomingAsset: Address;
incomingAsset: Address;
minIncomingAssetAmount: bigint;
};

Expand All @@ -44,13 +44,13 @@ export function takeOrderEncode(args: TakeOrderArgs): Hex {
args.pool,
args.outgoingAsset,
args.outgoingAssetAmount,
args.minIncomingAsset,
args.incomingAsset,
args.minIncomingAssetAmount,
]);
}

export function takeOrderDecode(encoded: Hex): TakeOrderArgs {
const [pool, outgoingAsset, outgoingAssetAmount, minIncomingAsset, minIncomingAssetAmount] = decodeAbiParameters(
const [pool, outgoingAsset, outgoingAssetAmount, incomingAsset, minIncomingAssetAmount] = decodeAbiParameters(
takeOrderEncoding,
encoded,
);
Expand All @@ -59,7 +59,7 @@ export function takeOrderDecode(encoded: Hex): TakeOrderArgs {
pool,
outgoingAsset,
outgoingAssetAmount,
minIncomingAsset,
incomingAsset,
minIncomingAssetAmount,
};
}

0 comments on commit 5dec4c1

Please sign in to comment.