Skip to content
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

refactor: currency types #1238

Merged
merged 4 commits into from
May 6, 2024
Merged

refactor: currency types #1238

merged 4 commits into from
May 6, 2024

Conversation

benjlevesque
Copy link
Contributor

@benjlevesque benjlevesque commented Nov 14, 2023

Move all types to the types package for better consistency with other types and as a first step to reduce unnecessary dependencies to the currency package.

BREAKING: types must be updated with CurrencyTypes prefix, imported from @requestnetwork/types package.
BREAKING: the currencies field has been removed from the RequestNetwork client parameters. Use currencyManager: new CurrencyManager(CURRENCIES) instead.

@benjlevesque benjlevesque changed the title refactor/currency types refactor: currency types Nov 14, 2023
@benjlevesque benjlevesque changed the base branch from master to refactor/remove-axios November 14, 2023 10:59
@@ -41,8 +41,7 @@ export default class HttpRequestNetwork extends RequestNetwork {
nodeConnectionConfig?: Partial<NodeConnectionConfig>;
signatureProvider?: SignatureProviderTypes.ISignatureProvider;
useMockStorage?: boolean;
currencies?: CurrencyInput[];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking: I suggest to remove this parameter as it's redundant with currencyManager

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed it's redundant, but is the currencyManager the better choice? I'm not super familiar.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

between the two? I would say yes: it enables injecting your own implementation, and the CurrencyManager contains more than just a list of currencies. For instance, it contains the list of Aggregators for conversion

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. 👍 Thanks for explaining

@benjlevesque benjlevesque force-pushed the refactor/remove-axios branch 2 times, most recently from d68636a to 8e03773 Compare January 18, 2024 10:12
Base automatically changed from refactor/remove-axios to master January 18, 2024 10:18
Apply suggestions from code review
@benjlevesque benjlevesque marked this pull request as ready for review April 23, 2024 09:54
@benjlevesque benjlevesque merged commit ad9af1b into master May 6, 2024
25 of 26 checks passed
@benjlevesque benjlevesque deleted the refactor/currency-types branch May 6, 2024 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants