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 adding amount to transaction from getExpenseTransactionBody #20

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

Sha-yol
Copy link
Contributor

@Sha-yol Sha-yol commented Oct 21, 2024

Refactor code to add amount to transaction in a currency-aware manner out of getExpenseTransactionBody.
This simplifies getExpenseTransactionBody, and also allows us to use currency-aware amount adding in other parts (such as in the different txn strategies mentioned in #9).

Take into account the source account currency when applying the amount.
main.py Show resolved Hide resolved
@adyanth adyanth merged commit e2fd225 into adyanth:main Oct 22, 2024
0 of 2 checks passed
@adyanth
Copy link
Owner

adyanth commented Oct 22, 2024

Screenshot 2024-10-22 at 11 56 02 AM

A test seems to have failed @Sha-yol

@adyanth
Copy link
Owner

adyanth commented Oct 22, 2024

Whoops, you seem to be missing a return in the applyExpenseAmountToTransaction, missed it.

@Sha-yol Sha-yol deleted the abstract-foreign-currency branch October 23, 2024 15:23
@Sha-yol
Copy link
Contributor Author

Sha-yol commented Oct 23, 2024

whoops indeed! thanks for the catch

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