From 5059ef9ce6583789981a4557c4940a64dfa3f6d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C3=ADgny?= Date: Tue, 28 Oct 2025 17:09:32 -0400 Subject: [PATCH] Update `CURRATE` precision --- src/ofxstatement/ofx.py | 2 +- src/ofxstatement/tests/test_ofx.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ofxstatement/ofx.py b/src/ofxstatement/ofx.py index 07d6e3e..302ed0c 100644 --- a/src/ofxstatement/ofx.py +++ b/src/ofxstatement/ofx.py @@ -160,7 +160,7 @@ def buildBankTransaction(self, line: StatementLine) -> None: def buildCurrency(self, tag: str, currency: Currency) -> None: self.tb.start(tag, {}) self.buildText("CURSYM", currency.symbol) - self.buildAmount("CURRATE", currency.rate) + self.buildAmount("CURRATE", currency.rate, precision=4) self.tb.end(tag) def buildInvestTransactionList(self) -> None: diff --git a/src/ofxstatement/tests/test_ofx.py b/src/ofxstatement/tests/test_ofx.py index 9b5e5f5..1b36077 100644 --- a/src/ofxstatement/tests/test_ofx.py +++ b/src/ofxstatement/tests/test_ofx.py @@ -71,7 +71,7 @@ EUR - 3.45 + 3.4543