Skip to content

Commit

Permalink
Fix claimRedeem contract call
Browse files Browse the repository at this point in the history
  • Loading branch information
sophialittlejohn committed Jan 23, 2025
1 parent f6419bd commit 9dfc03f
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions centrifuge-js/src/modules/liquidityPools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,25 +479,17 @@ export function getLiquidityPoolsModule(inst: Centrifuge) {
)
}

function withdraw(
args: [lpAddress: string, withdraw: BN, chainId: number, receiver?: string],
options: TransactionRequest = {}
) {
const [lpAddress, withdraw, chainId, receiver] = args
function withdraw(args: [lpAddress: string, chainId: number], options: TransactionRequest = {}) {
const [lpAddress, chainId] = args
const user = inst.getSignerAddress('evm')
return centrifugeRouter(chainId).pipe(
switchMap(({ estimate, centrifugeRouter }) => {
return pending(
contract(centrifugeRouter, new Interface(ABI.CentrifugeRouter)).claimRedeem(
lpAddress,
withdraw.toString(),
receiver ?? user,
{
...options,
value: estimate,
gasLimit: 200000,
}
)
contract(centrifugeRouter, new Interface(ABI.CentrifugeRouter)).claimRedeem(lpAddress, user, user, {
...options,
value: estimate,
gasLimit: 200000,
})
)
})
)
Expand Down

0 comments on commit 9dfc03f

Please sign in to comment.