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

currency: switched crypto api and combined rates to allow cross-lookup #1629

Merged
merged 1 commit into from
Sep 2, 2019

Conversation

Duckle29
Copy link
Contributor

This PR combines the fiat currency rates and the cryptocurrency rates into one global variable rates instead of keeping the two separate.

This was done to allow better cross-compatibility between the two sources, allowing one to look up a conversion from a currency in one table, to a currency in the other.

To do this, a change of API was also done, as the old API used a weird and inflexible way to look up conversions.

The code also changed some variable names that I didn't like. mostly the "of" and "to" variables were changed to base and target respectively.

This change also entirely eliminates the need for a separate crypto rates function.

@Duckle29
Copy link
Contributor Author

This PR also applies the same fix as #1627

@dgw
Copy link
Member

dgw commented May 30, 2019

This PR also applies the same fix as #1627

Doing this negates the advantage of having three-way merges, lol.

@Duckle29
Copy link
Contributor Author

Well I'm a git noob and didn't know what to do :P I can remove it and force push if you want :)

@dgw
Copy link
Member

dgw commented May 30, 2019

Might as well fix the style-checker error and the overlap with #1627 at the same time.

@Duckle29 Duckle29 force-pushed the combined_rate_list branch 2 times, most recently from c888f36 to 34f40f5 Compare May 30, 2019 19:22
@Duckle29 Duckle29 force-pushed the combined_rate_list branch from 34f40f5 to 5f93ee2 Compare May 30, 2019 19:31
@dgw dgw added this to the 7.0.0 milestone Aug 11, 2019
Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

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

Right, I'm going to approve this. It's been sitting for far too long, and it looks good to me. Really love that we're replacing the old cryptic variable names like of and to!

@dgw dgw merged commit 8eb80dd into sopel-irc:master Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants