Skip to content

Commit

Permalink
update to fees array
Browse files Browse the repository at this point in the history
  • Loading branch information
Zach Couchman committed Sep 22, 2023
1 parent 74b09a3 commit 72b8b48
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/checkout/sdk/src/smartCheckout/buy/buy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ export const buy = async (
}

let fees: FeeValue[] = [];
// calculate the taker fees here to be applied in the orderbook.fulfillOrder step
if (takerFees && takerFees.length > 0) {
fees = calculateFees(takerFees, buyToken.amount, decimals);
}
Expand All @@ -143,7 +142,7 @@ export const buy = async (
};
try {
const fulfillerAddress = await provider.getSigner().getAddress();
const { actions } = await orderbook.fulfillOrder(id, fulfillerAddress, fees[0]);
const { actions } = await orderbook.fulfillOrder(id, fulfillerAddress, fees);
unsignedTransactions = await getUnsignedTransactions(actions);
} catch {
// Silently ignore error as this is usually thrown if user does not have enough balance
Expand Down

0 comments on commit 72b8b48

Please sign in to comment.