ProjectOpenSea / seaport-js

A TypeScript library to interface with the Seaport marketplace.
MIT License
250 stars 182 forks source link

bugfix: handle undefined `unitsToFill` in fulfillOrders() #580

Closed naveen-imtb closed 1 month ago

naveen-imtb commented 1 month ago

Motivation

Fixes #578

Solution

This PR fixes the erroneous basisPoints calculation formula when handling the fulfilment of a partially filled orders using fulfillOrders(). This caused the transaction to revert with an overflow error. As an extension to this fix, the tips scaling logic has also been updated to handle the scenario where unitsToFill is undefined.