Created
March 30, 2024 06:51
-
-
Save ibrahimgunduz34/62843a744fe80c03c5d8263f578bc535 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Override | |
| public FundTransaction handle(FundSellingTransactionCreate command) { | |
| Fund fund = fundDataPort.retrieve(command.getCode()); | |
| Portfolio portfolio = portfolioDataPort.get(command.getUser(), command.getPortfolioId()); | |
| // TODO read the reference currency from the account profile later. | |
| CurrencyCode referenceCurrencyCode = CurrencyCode.USD; | |
| CurrencyRetrieveRate currencyRetrieveRateCmd = buildCurrencyRetrieveRate( | |
| fund, referenceCurrencyCode, command); | |
| CurrencyRate referenceCurrencyRate = publish(CurrencyRate.class, currencyRetrieveRateCmd); | |
| return fundTransactionDataPort.createSellingTransaction(portfolio, fund, referenceCurrencyRate, command); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment