ProjectOpenSea / seaport-js

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

Error when attempting to fill a partially filled order using `fulfillOrders()` without providing an explicit `unitsToFill` parameter. #578

Closed naveen-imtb closed 1 month ago

naveen-imtb commented 1 month ago

Component

API

Have you ensured that all of these are up to date?

What version of seaport-js are you on?

4.0.2

What function is the bug in?

fulfillOrders

Operating System

macOS (Apple Silicon)

Describe the bug

When filling a partially filled order, if the unitsToFill parameter is not provided when invoking fulfillOrders this results in the transaction reverting with an overflow error. The expected behaviour is that the remaining quantity of the order is filled.

Scenario:

As an extension to this, tips also need to be adjusted to cater to the scenario where an explicit unitsToFill value isn't provided.

Note: This issue is seen only in the fulfillOrders function.

naveen-imtb commented 1 month ago

Existence of bug proved with tests in this PR.

naveen-imtb commented 1 month ago

PR to fix this bug.