Conversation
Replaced single `fee` field with detailed fee breakdowns (`networkFee`, `processingFee`, `partnerMarkupFee`, `totalFee`, and `feeCurrency`). Added support for partner-specific fee configurations via `partnerId` in the quote process. Updated models, services, and associations to support the new fee structure and partner relationship.
Replaced individual fee fields with a unified JSON fee structure across the system. This simplifies fee data representation, provides better flexibility, and consolidates related fields into a single object. Updated migrations, models, endpoints, and services to align with the new structure.
Revised fee storage to directly use detailed fee components in the database. Updated API response to transform and aggregate fees accordingly, ensuring clarity and reducing redundant transformations. Adjusted vortex fee logic to align with partner configuration.
This commit updates the database migration and model to eliminate the 'network_estimate' fee type from the ENUM definition. Associated seed data for 'network_estimate' has also been removed to align with the updated structure.
Removed obsolete helper functions for fee calculation and integrated fee logic directly into the ramp service. Improved clarity by renaming variables and restructuring the output amount calculation. Added logic to calculate network fees in USD for EVM on-ramps and prepared the service for dynamic pricing updates.
Core fee calculation now focuses on vortex, anchor, and partner markup fees, removing unnecessary network fee logic. Introduced a unified fee structure for maintaining detailed breakdowns, improving clarity and maintainability. This change refines the QuoteTicket creation process by leveraging a cleaner fee structure.
Revised the fee calculation workflow to include proper breakdowns and introduced a placeholder function for converting fees into output currencies. Added safety checks for negative output amounts, refined fee structures, and ensured the final output amount considers all applicable fees. Future implementation will enhance currency conversion using accurate exchange rates.
Replaces the combined "processing" fee field with distinct "vortex" and "anchor" fields throughout the codebase. Updates interfaces, models, and calculations to align with the new detailed fee structure. This improves clarity and consistency in fee handling.
Added functionality to determine and convert fees to a target fiat currency using placeholder logic. Updated fee storage and response structure to utilize the target fiat instead of USD, ensuring better alignment with input/output currencies. Placeholder conversion logic still needs proper implementation with live price feeds.
Introduced `grossOutputAmount`, `anchorFeeFiat`, `distributableFeesFiat`, and `targetFiat` to the `QuoteTicketMetadata` interface. Updated the quote service to calculate and store these fields, ensuring a more detailed fee structure is preserved. This enhances tracking and transparency of fee components.
Introduce separate handling for anchor fees by adding placeholder methods for Fiat-to-USD and USD-to-token conversions. Reorganize input/output amount calculations to distinguish between gross and net values and ensure proper fee deduction. Added better type safety and logging for future implementation of price-related conversions.
Replaced manual calculation of `outputAmountBeforeFees` with `grossOutputAmount` from quote metadata for improved accuracy and consistency. Updated all relevant validations, calculations, and transaction preparations to align with this change. Added error handling to ensure `grossOutputAmount` is present in metadata.
Introduce a handler to distribute network, vortex, and partner fees in stablecoin on Pendulum. Includes placeholder implementations for fiat to USD and USD to token unit conversions, fee processing, and blockchain transactions with error handling. Future improvements include stablecoin selection logic and proper conversion methods.
Updated `nablaSwap`, `subsidizePostSwap`, and other handlers to incorporate the new `distributeFees` phase where appropriate. Adjusted relevant logic, documentation, and registration to ensure seamless phase progression.
Introduce a singleton service to manage crypto and fiat price queries, using CoinGecko and Nabla APIs respectively. The implementation sets up the structure but leaves method bodies as placeholders for future API integration. This is part of the ongoing fee-handling refactor.
Add unhandled payment alert worker
…d update references
…-vortex Allow setting custom markup fees for Vortex and partners
Update the instant SEPA text
Update en.json
Improve vortex rate display
✅ Deploy Preview for pendulum-pay ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
No description provided.