Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V4 | The buyer cannot select the quantity purchased from the order #95

Open
boulinb opened this issue Nov 15, 2022 · 6 comments
Open

V4 | The buyer cannot select the quantity purchased from the order #95

boulinb opened this issue Nov 15, 2022 · 6 comments

Comments

@boulinb
Copy link

boulinb commented Nov 15, 2022

Hello everyone!

I noticed that the user, when he bought an ERC1155 against an ERC20 could not choose the quantity bought; If the offer is 5 ETH against 5 ERC1155, it is impossible from the SDK to buy 1 ERC1155 for 1 ETH.

I have fork your project and create a fix, not being allowed to make a PR, here is a screen of the patch :

(src/sdk/v4/NftSwapV4.ts): https://prnt.sc/c1G4i5T-Z13m
(src/sdk/v4/types.ts) : https://prnt.sc/B4Fw-ZR2Zd2w

@saharshkhicha18
Copy link

Would want this to be integrated

@nedgar
Copy link

nedgar commented Jan 27, 2023

I agree. Since 0x allows a taker to take fewer than the maker offered, the NftSwap SDK should support this and take an optional quantity in the options when filling a sell order.

@jinsley8
Copy link

I have fork your project and create a fix, not being allowed to make a PR, here is a screen of the patch :

(src/sdk/v4/NftSwapV4.ts): https://prnt.sc/c1G4i5T-Z13m (src/sdk/v4/types.ts) : https://prnt.sc/B4Fw-ZR2Zd2w

@boulinb Have you tested that your fix works? If it does then I agree this would be amazing to merge.

@boulinb
Copy link
Author

boulinb commented Jun 30, 2023

Hey @jinsley8 !

Yes I use it in production on my project ;)

@jinsley8
Copy link

What happens to the original order after a partial buy?

Can you still do another order from it or do you just cancel the remaining order?

@boulinb
Copy link
Author

boulinb commented Jul 4, 2023

In my case, the order is partially filled and waiting to be completely filled: If I put 2 ERC-1155s up for sale, I can buy 1 and then buy the rest back with another transaction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants