From c3a4e154d75598a3fb1f7a6514ca96d5ab6780fe Mon Sep 17 00:00:00 2001 From: Yosif Hamed Date: Mon, 29 Jan 2024 15:07:54 +0200 Subject: [PATCH] Add gmx close order --- src/lib/humanizers/UniswapV3Pool.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/lib/humanizers/UniswapV3Pool.js b/src/lib/humanizers/UniswapV3Pool.js index 4c4344cd66..b2e1b590c4 100644 --- a/src/lib/humanizers/UniswapV3Pool.js +++ b/src/lib/humanizers/UniswapV3Pool.js @@ -64,6 +64,7 @@ const UniswapV3Pool = (humanizerInfo) => { const parsed = calls .map((data) => { const sigHash = data.slice(0, 10) + console.log({ sigHash }) const humanizer = mappingResult[sigHash] return humanizer ? humanizer({ ...txn, data }, network) : null }) @@ -267,6 +268,19 @@ const UniswapV3Pool = (humanizerInfo) => { ] } }, + [exchangeRouter.getSighash('cancelOrder')]: (txn, network, opts = { extended: true }) => { + const { key } = exchangeRouter.parseTransaction(txn).args + return !opts.extended + ? [`Cancel order ${key} in ${getName(txn.to)}`] + : [ + [ + 'Cancel order', + `${key}`, + 'in', + { type: 'address', address: txn.to, name: getName(humanizerInfo, txn.to) } + ] + ] + }, // DCAHub companion can be moved to mean finance and exported to be applied also here [DCAHubCompanion.getSighash('terminate')]: (txn, network, opts = { extended: true }) => { const { _hub, _positionId, _recipientUnswapped, _recipientSwapped } =