Browse Source

Fix validation of valuables

pull/6372/head
Thomas Kaul 1 month ago
parent
commit
f33b039bde
  1. 12
      apps/api/src/services/data-provider/data-provider.service.ts

12
apps/api/src/services/data-provider/data-provider.service.ts

@ -244,11 +244,15 @@ export class DataProviderService implements OnModuleInit {
}); });
if (!assetProfiles[assetProfileIdentifier]) { if (!assetProfiles[assetProfileIdentifier]) {
if (['FEE', 'INTEREST', 'LIABILITY'].includes(type)) { if (
(dataSource === DataSource.MANUAL && type === 'BUY') ||
['FEE', 'INTEREST', 'LIABILITY'].includes(type)
) {
const assetProfileInImport = assetProfilesWithMarketDataDto?.find( const assetProfileInImport = assetProfilesWithMarketDataDto?.find(
(profile) => { (assetProfile) => {
return ( return (
profile.dataSource === dataSource && profile.symbol === symbol assetProfile.dataSource === dataSource &&
assetProfile.symbol === symbol
); );
} }
); );
@ -257,7 +261,7 @@ export class DataProviderService implements OnModuleInit {
currency, currency,
dataSource, dataSource,
symbol, symbol,
name: assetProfileInImport?.name name: assetProfileInImport?.name ?? symbol
}; };
continue; continue;

Loading…
Cancel
Save