Allow multiple currency tokens in an order#259
Merged
ryanio merged 3 commits intoProjectOpenSea:mainfrom Jun 1, 2023
Merged
Conversation
Collaborator
|
great PR and nice tests, thanks for working on this! can you kindly resolve the conflicts to run the workflows (test folder was moved outside src) |
Contributor
Author
|
@ryanio my pleasure! conflicts resolved |
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #259 +/- ##
==========================================
+ Coverage 98.02% 98.11% +0.09%
==========================================
Files 33 33
Lines 13440 13824 +384
Branches 646 662 +16
==========================================
+ Hits 13175 13564 +389
+ Misses 259 255 -4
+ Partials 6 5 -1
☔ View full report in Codecov by Sentry. |
ryanio
approved these changes
Jun 1, 2023
JoshuaSchmidt-OpenSea
approved these changes
Jun 1, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Fixing the problem faced in issue #236
Solution
Turns out this restriction is in place mainly to make fee calculation simpler - so I limited it to apply only for cases where you want to the library to calculate fees for you.
My attempt at implementing a multi-token fee calculation, caused all the
[Accept offer]tests to break because the current design assumes the same fees will be applied for an order and its mirrored order - which for example isn't really possible in the case of anERC20 <=> ERC20order.I wasn't sure if the way these
[Accept offer]tests are written represent the library's requirements (the same fees will be applied for an order and its mirrored order), or just an internal test implementation.I took them for requirements, but am open to hear your opinions.