fix(swap): route EVM batch-swap fee to SOPA × COINMASTERSGUILD split + harden Blockscout - #283
Merged
Merged
Conversation
…lit + harden Blockscout
Two fixes for the live site:
- Fee recipient: replace the old multichain custody wallet
(0x96C373…c0eEA2) with the SOPA × COINMASTERSGUILD split contract
(0xa642b91f…dfd68) so non-Base / EVM-batch 0x swap fees are divided
on-chain between SOPA and COINMASTERSGUILD. Renamed the constant to
SWAP_FEE_SPLIT_RECIPIENT to reflect that it's a split contract, not a
plain wallet.
- Blockscout: the Base instance is returning HTTP 500 with a plain-text
"Internal server error" body on /addresses/{addr}/tokens?type=ERC-20
(and /transfers, /logs). The swap token discovery called res.json() on
that text body and crashed the picker. New crash-safe helper
(src/services/blockscout.ts) only parses JSON on 2xx and returns null on
any failure; wired into stake-graph, use-vault-total and use-vault-rewards
so a Blockscout outage degrades to "no data" instead of a UI error.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
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.
What changed
split contract (
0xa642b91ff941fb68919d1877e9937f3e369dfd68) instead of theold multichain custody wallet. Non-Base (EVM batch) 0x swap fees are now
divided on-chain between the two parties. Constant renamed
SWAP_FEE_RECIPIENT_MULTICHAIN→SWAP_FEE_SPLIT_RECIPIENT."Internal server error" body. Added a crash-safe
blockscoutGethelper andwired it into
stake-graph,use-vault-total, anduse-vault-rewardssoa Blockscout outage degrades to "no data" instead of crashing the UI.
Verification
src/services/blockscout.test.ts(3 tests) pins the 500null.Co-authored-by: Claude noreply@anthropic.com