-
Notifications
You must be signed in to change notification settings - Fork 25
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
fix(zora): add tokenId to zora SDK getToken call for 1155s #511
fix(zora): add tokenId to zora SDK getToken call for 1155s #511
Conversation
🦋 Changeset detectedLatest commit: 33ab22d The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -471,6 +472,12 @@ export const getFees = async ( | |||
publicClient: client, | |||
}) | |||
|
|||
// if contract type is 1155, we need to get the latest tokenId | |||
if (contractType === '1155' && tokenId == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we pass tokenId into getNextTokenId
it should account for the existing tokenId
right? Neutral on if we pass it or implementation, important thing is that the simulation and fees are both using the same logic to determine the token to use (both use next if tokenId is undefined)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getNextTokenId passes back the existing tokenId if it is defined.
Felt this was more semantic.
SimulateMint and getFees will both use getNextTokenId
when no token is available.
getToken
call, otherwise it will fail and return the base fee.Fixes BOOST-4477
https://linear.app/rh-app/issue/BOOST-4477/zora-getfees-fails-for-1155-wo-tokenid-plugin