-
Notifications
You must be signed in to change notification settings - Fork 91
feat: add new aggregators and update existing ones. #1589
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
feat: add new aggregators and update existing ones. #1589
Conversation
…, bsc, optimism, and base; update existing aggregator configurations
WalkthroughThe changes update multiple aggregator files for mapping Ethereum addresses and their interconnections. Several new JSON files have been introduced (for Avalanche, Base, BSC, Optimism, and XDAI), while existing files (Arbitrum One, Fantom, Mainnet, Matic, and Sepolia) have been modified with added, removed, or replaced keys. In addition, the conversion aggregators file now imports these new JSON files, updating the configuration by adding the new networks to the currency pairs and removing them from the no-conversion list. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant InvoiceService
participant ConversionAggregators
User->>InvoiceService: Request conversion invoice (e.g., Base, BSC, Optimism, XDAI)
InvoiceService->>ConversionAggregators: Lookup network aggregator mapping
ConversionAggregators-->>InvoiceService: Return currency pairs configuration
InvoiceService->>ExternalPaymentProcessor: Process conversion invoice
Assessment against linked issues
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (2)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
…ase-bsc-optimism-and-gnosis
…ism-and-gnosis' of github.com:RequestNetwork/requestNetwork into 1574-create-conversion-invoices-fails-on-base-bsc-optimism-and-gnosis
…n payment network tests
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/advanced-logic/test/extensions/payment-network/any-to-eth-proxy.test.ts (1)
354-354: Simplified error message formatThe error message format has been simplified to only include the token name (OCEAN) without the full address and network in the error message, unlike other similar error messages in the test files. While this works, consider standardizing error message formats across the codebase.
Consider using a consistent format for error messages across all test files:
- 'The currency (OCEAN) of the request is not supported for this payment network.', + 'The currency (OCEAN-mainnet, 0x967da4048cD07aB37855c090aAF366e4ce1b9F48) of the request is not supported for this payment network.',
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
packages/advanced-logic/test/extensions/payment-network/any-to-erc20-proxy.test.ts(2 hunks)packages/advanced-logic/test/extensions/payment-network/any-to-eth-proxy.test.ts(2 hunks)packages/advanced-logic/test/extensions/payment-network/meta.test.ts(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build-and-test
🔇 Additional comments (5)
packages/advanced-logic/test/extensions/payment-network/meta.test.ts (2)
150-153: Consistent test data update for OCEAN tokenThe changes correctly update the test scenario to use the OCEAN ERC20 token address instead of BTC for testing unsupported currency behavior. This aligns with the purpose of adding new currency aggregator configurations.
164-164: Error message updated to match new currencyThe error message has been correctly updated to reflect the OCEAN token instead of BTC, maintaining consistency with the test case modifications.
packages/advanced-logic/test/extensions/payment-network/any-to-eth-proxy.test.ts (1)
341-344: Test data updated for OCEAN tokenThe test case has been appropriately updated to use the OCEAN ERC20 token for testing unsupported currency behavior. This change is consistent with the PR's purpose of updating currency configurations.
packages/advanced-logic/test/extensions/payment-network/any-to-erc20-proxy.test.ts (2)
396-399: Test data updated for OCEAN token validationThe test case has been appropriately updated to use the OCEAN ERC20 token for testing unsupported currency behavior, consistent with other test file changes in this PR.
410-410: Error message updated to match new currencyThe error message has been correctly updated to include the full details of the OCEAN token, maintaining consistency between test case and expected error.
…ess in any-to-eth-proxy tests
|
@aimensahnoun Please explain how these aggregator configuration changes were generated to the PR description 🙏 - You mentioned there was a toolbox script you used. |
MantisClone
left a comment
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.
Approved 👍 Pending comment resolution.
Resolves #1574
Description of the changes
This PR adds and updates currency aggregator configurations for multiple blockchain networks:
Why is this change necessary/important?
These changes expand the supported token pair mappings across multiple networks, enabling more currency conversion options for the Request Network protocol.
Impact of the changes
Process
Used the
chainlinkPathscript from the toolbox to generate the aggregator configurations:yarn toolbox chainlinkPath mainnetSummary by CodeRabbit
New Features
Bug Fixes
Refactor