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

chore: remove legacy display currency converter #2289

Merged
merged 9 commits into from
Feb 13, 2023

Conversation

vindard
Copy link
Contributor

@vindard vindard commented Feb 6, 2023

Description

This PR removes remaining instances of DisplayCurrencyConverter and then removes DisplayCurrencyConverter implementation.

@vindard vindard force-pushed the remove-legacy-display-currency-converter branch 2 times, most recently from d20001d to d6df84e Compare February 6, 2023 16:48
@vindard vindard force-pushed the remove-legacy-display-currency-converter branch 4 times, most recently from 2d5daf3 to 2b06df3 Compare February 6, 2023 22:25
@vindard vindard force-pushed the remove-legacy-display-currency-converter branch from 2b06df3 to f2324e9 Compare February 10, 2023 03:00
Copy link
Collaborator

@dolcalmi dolcalmi left a comment

Choose a reason for hiding this comment

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

looks good, just minor questions

Comment on lines +28 to +35
export const getCurrentPriceAsPriceRatio = async ({
currency,
}: GetCurrentSatPriceArgs): Promise<PriceRatio | PriceServiceError> => {
const price = await getCurrentSatPrice({ currency })
if (price instanceof Error) return price

return toPriceRatio(price.price * CENTS_PER_USD)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

were you getting an error without this? in theory if code did not change this is not necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup tests fail with "undefined" function for that method

export const toDisplayCurrencyBaseAmount = (amount: number) =>
amount as DisplayCurrencyBaseAmount

export const DisplayCurrencyConverter = (
Copy link
Collaborator

Choose a reason for hiding this comment

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

will we remove/rename NewDisplayCurrencyConverter in a different PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, removing in a follow-up one

@vindard vindard merged commit 6908f2c into main Feb 13, 2023
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.

2 participants