From 2ee37f5b8a3fd2f3c3d6ad8fa3a1ad06764359c3 Mon Sep 17 00:00:00 2001 From: "kamil.jedrzejuk" Date: Tue, 8 Oct 2024 08:32:17 +0200 Subject: [PATCH] Updated README.md --- README.md | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/README.md b/README.md index 79a924d..9cd2176 100644 --- a/README.md +++ b/README.md @@ -117,21 +117,6 @@ class Account private constructor( ) } - fun exchangeUsdToPln(amountUsd: Money, exchangeRate: ExchangeRate) { - require(!amountUsd.isZero()) { - throw InvalidAmountException("Amount must be greater than 0") - } - require(amountUsd <= balanceUsd) { - throw InsufficientFundsException( - "Insufficient USD balance", - ) - } - - val amountPln = Money(exchangeRate.convertToPln(amountUsd.amount), "PLN") - balanceUsd -= amountUsd - balancePln += amountPln - } - private fun addEvent(event: AccountEvent) { events.add(event) }