refactor!: support RUB only (WealthLedger/main#55) (#204)
Backend verify / commits (push) Skipped
Backend verify / security (push) Successful in 1m32s
Backend verify / verify (push) Failing after 9m25s

BREAKING CHANGE: per-currency API fields replaced with single RUB Money.
This commit was merged in pull request #204.
This commit is contained in:
2026-11-11 10:07:11 +03:00
parent 85d65f8997
commit 809936e62d
61 changed files with 617 additions and 735 deletions
+5 -6
View File
@@ -157,9 +157,9 @@ export class MoexClient {
for (const row of coupons) {
const date = text(row.coupondate);
const value = numberText(row.value);
const currency = currencyText(row.faceunit);
if (date && value && currency) {
events.push({ type: 'coupon', date, value, currency });
// RUB-only: coupons in other currencies are filtered out at this ingest boundary.
if (date && value && currencyText(row.faceunit) === 'RUB') {
events.push({ type: 'coupon', date, value, currency: 'RUB' });
}
}
for (const row of offers) {
@@ -171,9 +171,8 @@ export class MoexClient {
);
const date = values.get('MATDATE');
const value = numberText(values.get('FACEVALUE'));
const currency = currencyText(values.get('FACEUNIT'));
if (date && value && currency) {
events.push({ type: 'maturity', date, value, currency });
if (date && value && currencyText(values.get('FACEUNIT')) === 'RUB') {
events.push({ type: 'maturity', date, value, currency: 'RUB' });
}
return events;
}