Skip to content

Commit

Permalink
average price computation fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
jessy-bgl committed Jul 28, 2022
1 parent 6855e06 commit 0650239
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions server/src/domain/repositories/transaction.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ interface ICreateManualTransactionDTO {

interface IFetchTransactionsOptions {
dca?: string;
success?: boolean;
}

abstract class ITransactionRepository {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class DcaTransactionsSummaryUseCase {
if (!dca) throw new NotFoundException('dca not found');
const transactions = await this.transactionRepository.fetch({
dca: id,
success: true,
});
const asset = dca.pair.split('/')[0];
const currentPrice = await this.coinRepository.fetchPrice(asset);
Expand Down

0 comments on commit 0650239

Please sign in to comment.