-
Notifications
You must be signed in to change notification settings - Fork 16
[PART-5] Add transaction tax report #384
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
[PART-5] Add transaction tax report #384
Conversation
ezewer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
|
|
||
| // TODO: | ||
| async #convertCurrencies (trxs, opts) {} | ||
| async #convertCurrencies (trxs, opts) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we using # in the functions names?
| @@ -0,0 +1,23 @@ | |||
| 'use strict' | |||
|
|
|||
| module.exports = (pubTrades, mts) => { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
This PR adds currency conversion to USD and stores cached
exactUsdValuefield in appropriate tables forTransaction Tax Report. For currency conversion uses the priority currency list:['BTC', 'ETH', 'UST']It's a 4-part of the feature, the main idea taken from these PRs: #373, #378, #379
The ccy conversion approach is the following: