refactor: replace ignored numeric literals with constants
This commit is contained in:
@@ -12,6 +12,8 @@ import {
|
||||
StockSearchResourceDto,
|
||||
} from '../presentation/stock.dto';
|
||||
|
||||
const MIN_LOT_EXCLUSIVE = 0;
|
||||
|
||||
type IdentifiedShare = TbankShare & { uid: string };
|
||||
|
||||
@Injectable()
|
||||
@@ -102,7 +104,7 @@ function stock(share: IdentifiedShare): StockDto {
|
||||
currency: share.currency?.toUpperCase() || null,
|
||||
shareType: share.shareType || null,
|
||||
sector: share.sector || null,
|
||||
lot: share.lot && share.lot > 0 ? share.lot : null,
|
||||
lot: share.lot && share.lot > MIN_LOT_EXCLUSIVE ? share.lot : null,
|
||||
historyFrom: timestamp(share.first_1dayCandleDate),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user