Skip to content

Commit

Permalink
Add gmx close order
Browse files Browse the repository at this point in the history
  • Loading branch information
JIOjosBG committed Jan 29, 2024
1 parent 798be44 commit c3a4e15
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/lib/humanizers/UniswapV3Pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down Expand Up @@ -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 } =
Expand Down

0 comments on commit c3a4e15

Please sign in to comment.