diff --git a/.changeset/weak-doors-promise.md b/.changeset/weak-doors-promise.md new file mode 100644 index 00000000..ef56d3ee --- /dev/null +++ b/.changeset/weak-doors-promise.md @@ -0,0 +1,5 @@ +--- +"@enzymefinance/sdk": patch +--- + +Improve 1Inch naming diff --git a/packages/sdk/src/internal/Extensions/IntegrationAdapters/OneInchV5.ts b/packages/sdk/src/internal/Extensions/IntegrationAdapters/OneInchV5.ts index 787b3783..64d03826 100644 --- a/packages/sdk/src/internal/Extensions/IntegrationAdapters/OneInchV5.ts +++ b/packages/sdk/src/internal/Extensions/IntegrationAdapters/OneInchV5.ts @@ -91,7 +91,7 @@ export function takeOrderDecode(encoded: Hex): TakeOrderArgs { }; } -const oneInchSwapArgsEncoding = [ +const swapArgsEncoding = [ { name: "executor", type: "address", @@ -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 {