Open
Conversation
Collaborator
itsyaasir
commented
Jul 8, 2024
- Update cached dependency to version 0.52
- Refactor client code to conditionally include openssl-related imports based on feature flags
- Move Invoice and InvoiceItem structs to bill_manager module
* Update cached dependency to version 0.52 * Refactor client code to conditionally include openssl-related imports based on feature flags * Move Invoice and InvoiceItem structs to bill_manager module
Collaborator
Author
|
The code is starting to look ugly with all the feature gated things! we should come up with a way to clean this up. |
c12i
approved these changes
Jul 9, 2024
Comment on lines
+5
to
28
| #[cfg(any( | ||
| feature = "account_balance", | ||
| feature = "b2b", | ||
| feature = "b2c", | ||
| feature = "transaction_reversal", | ||
| feature = "transaction_status" | ||
| ))] | ||
| use openssl::base64; | ||
| #[cfg(any( | ||
| feature = "account_balance", | ||
| feature = "b2b", | ||
| feature = "b2c", | ||
| feature = "transaction_reversal", | ||
| feature = "transaction_status" | ||
| ))] | ||
| use openssl::rsa::Padding; | ||
| #[cfg(any( | ||
| feature = "account_balance", | ||
| feature = "b2b", | ||
| feature = "b2c", | ||
| feature = "transaction_reversal", | ||
| feature = "transaction_status" | ||
| ))] | ||
| use openssl::x509::X509; |
Owner
There was a problem hiding this comment.
This could be possible cleaned up by deriving a feature_locked! (better name needed) declarative macro
Comment on lines
+315
to
+321
| #[cfg(any( | ||
| feature = "account_balance", | ||
| feature = "b2b", | ||
| feature = "b2c", | ||
| feature = "transaction_reversal", | ||
| feature = "transaction_status" | ||
| ))] |
|
|
||
| #[derive(Debug, Serialize)] | ||
| #[serde(rename_all = "camelCase")] | ||
| pub struct Invoice<'i> { |
Collaborator
There was a problem hiding this comment.
Ahh, I see you've moved this from the constants module to the bill manager module. This works as I don't think any other API (apart from bill manager) uses the invoice construct 👍
crispinkoech
approved these changes
Jul 12, 2024
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.