chore: bring develop into release sync branch (WealthLedger/main#30) #107

Closed
codex-bot wants to merge 23 commits from develop into chore/30-sync-release
Showing only changes of commit da2e1d0781 - Show all commits
@@ -304,16 +304,18 @@ export class CatalogDiscoveryService {
input.query, input.query,
input.instrumentType, input.instrumentType,
).slice(FIRST_RESULT_OFFSET, input.exactTicker ? tickerAmbiguityLimit : catalogSearchLimit); ).slice(FIRST_RESULT_OFFSET, input.exactTicker ? tickerAmbiguityLimit : catalogSearchLimit);
const details = await Promise.all( const [details, prices] = await Promise.all([
instruments.map((item) => Promise.all(
input.instrumentType === 'share' instruments.map((item) =>
? this.tbank.getShare(token, item.uid) input.instrumentType === 'share'
: this.tbank.getBond(token, item.uid), ? this.tbank.getShare(token, item.uid)
: this.tbank.getBond(token, item.uid),
),
), ),
); instruments.length
const prices = instruments.length ? this.tbank.getLastPrices(token, instruments.map((item) => item.uid))
? await this.tbank.getLastPrices(token, instruments.map((item) => item.uid)) : [],
: []; ]);
const fetchedAt = new Date(); const fetchedAt = new Date();
const data = instruments.flatMap((item, index) => { const data = instruments.flatMap((item, index) => {
const detail = details.at(index); const detail = details.at(index);