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

execute purchase if price is lower instead of revert #102

Open
todo bot opened this issue Dec 4, 2021 · 3 comments
Open

execute purchase if price is lower instead of revert #102

todo bot opened this issue Dec 4, 2021 · 3 comments

Comments

@todo
Copy link

todo bot commented Dec 4, 2021

// @TODO: execute purchase if price is lower instead of revert
}


This issue was generated by todo based on a TODO comment in 0dbe8e1 when #100 was merged. cc @MoonSHRD.
@todo todo bot added the todo 🗒️ label Dec 4, 2021
@JackBekket
Copy link
Member

execute purchase in case of higher price, not lower

@JackBekket
Copy link
Member

require((bid_price_ > metainfo.activeSellOffers[tokenId].minPrice[currency_]),

заменить строго больше (>) на больше или равно (>=) по этой строке

@JackBekket
Copy link
Member

// @TODO: execute purchase if price is lower instead of revert

добавить дополнительное условие если цена ставки строго равна цене оффера, который выставляет продавец
шо то типа if ((bid_price_ == metainfo.activeSellOffers[tokenId].minPrice[currency_]) { purchase(....) }

при этом, по идее, если срабатывает purchase (цена ставки покупателя строго равна указаной цене продавца), то должен срабатывать только purchase, и не выставляться buyOffer. то есть по идее возможно где-то здесь нужно поставить break

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

No branches or pull requests

2 participants