Skip to content

Commit

Permalink
fix: improve 1Inch function naming
Browse files Browse the repository at this point in the history
  • Loading branch information
iherger committed Sep 28, 2023
1 parent 3bdc8a0 commit caef23a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/weak-doors-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@enzymefinance/sdk": patch
---

Improve 1Inch naming
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function takeOrderDecode(encoded: Hex): TakeOrderArgs {
};
}

const oneInchSwapArgsEncoding = [
const swapArgsEncoding = [
{
name: "executor",
type: "address",
Expand Down Expand Up @@ -144,8 +144,8 @@ const oneInchSwapArgsEncoding = [
},
] as const;

export function decodedOneInchSwapArgs(encoded: Hex): TakeOrderArgs {
const [executor, orderDescription, , data] = decodeAbiParameters(oneInchSwapArgsEncoding, `0x${encoded.slice(10)}`);
export function decodedSwapArgs(encoded: Hex): TakeOrderArgs {
const [executor, orderDescription, , data] = decodeAbiParameters(swapArgsEncoding, `0x${encoded.slice(10)}`);
const { srcToken, dstToken, srcReceiver, dstReceiver, amount, minReturnAmount, flags } = orderDescription;

return {
Expand Down

0 comments on commit caef23a

Please sign in to comment.