fix: add missing Soneium and AnimeChain payment token support#1973
Open
Sertug17 wants to merge 1 commit into
Open
fix: add missing Soneium and AnimeChain payment token support#1973Sertug17 wants to merge 1 commit into
Sertug17 wants to merge 1 commit into
Conversation
Chain.Soneium and Chain.AnimeChain were present in the Chain enum but missing from getOfferPaymentToken() and getListingPaymentToken() switch statements, causing a runtime Error when creating listings or offers on these chains. Both chains are OP Stack based: - Soneium (chain ID 1868): uses canonical OP WETH 0x4200...0006 - AnimeChain (chain ID 69000): uses canonical OP WETH 0x4200...0006 Listing payment token for both is native ETH (0x0000...0000). Added test coverage for both chains.
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.
Problem
Chain.SoneiumandChain.AnimeChainwere added to theChainenum but were missing fromgetOfferPaymentToken()andgetListingPaymentToken()switch statements.This causes a runtime error when attempting to create listings or offers on these chains:
Error: Unknown offer currency for soneium
Error: Unknown listing currency for animechain
Fix
Chain.SoneiumandChain.AnimeChaintogetOfferPaymentToken()returning WETH (0x4200000000000000000000000000000000000006) both chains are OP Stack basedChain.SoneiumandChain.AnimeChaintogetListingPaymentToken()returning native ETH (0x0000000000000000000000000000000000000000)Testing
All 84 existing chain tests pass.