refactor!: support RUB only (WealthLedger/main#55) (#204)
BREAKING CHANGE: per-currency API fields replaced with single RUB Money.
This commit was merged in pull request #204.
This commit is contained in:
@@ -56,6 +56,24 @@ describe('mapBrokerageOperation', () => {
|
||||
payment: null,
|
||||
});
|
||||
});
|
||||
|
||||
it('filters non-RUB money out of every money field at ingest', () => {
|
||||
expect(
|
||||
mapBrokerageOperation({
|
||||
id: 'usd',
|
||||
date: { seconds: '1' },
|
||||
type: 'OPERATION_TYPE_DIVIDEND',
|
||||
payment: { currency: 'usd', units: '21' },
|
||||
price: { currency: 'USD', units: '10' },
|
||||
commission: { currency: 'EUR', units: '1' },
|
||||
}),
|
||||
).toMatchObject({
|
||||
id: 'usd',
|
||||
payment: null,
|
||||
price: null,
|
||||
commission: null,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('executed trade quantity', () => {
|
||||
|
||||
Reference in New Issue
Block a user