Skip to content

Commit

Permalink
when the offering is unpriced, fee is always MaxUint256
Browse files Browse the repository at this point in the history
  • Loading branch information
aggre committed Feb 3, 2025
1 parent 334eedc commit bfc10a1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/api/payment-key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,12 @@ export const get: ({
sourcePaymentToken,
amount,
mem.source.fee?.beneficiary ?? ZeroAddress,
new BigNumber(amount.toString())
.times(mem.source.fee?.percentage ?? 0)
.dp(0, 1)
.toFixed(),
mem.source.price
? new BigNumber(amount.toString())
.times(mem.source.fee?.percentage ?? 0)
.dp(0, 1)
.toFixed()
: MaxUint256,
]
})
const abiEncodedParamsForFulfilment = whenNotError(abiParams, (_params) =>
Expand Down

0 comments on commit bfc10a1

Please sign in to comment.