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.instrumentType,
).slice(FIRST_RESULT_OFFSET, input.exactTicker ? tickerAmbiguityLimit : catalogSearchLimit);
const details = await Promise.all(
instruments.map((item) =>
input.instrumentType === 'share'
? this.tbank.getShare(token, item.uid)
: this.tbank.getBond(token, item.uid),
const [details, prices] = await Promise.all([
Promise.all(
instruments.map((item) =>
input.instrumentType === 'share'
? this.tbank.getShare(token, item.uid)
: this.tbank.getBond(token, item.uid),
),
),
);
const prices = instruments.length
? await this.tbank.getLastPrices(token, instruments.map((item) => item.uid))
: [];
instruments.length
? this.tbank.getLastPrices(token, instruments.map((item) => item.uid))
: [],
]);
const fetchedAt = new Date();
const data = instruments.flatMap((item, index) => {
const detail = details.at(index);