From 7f40192acbae4bd2a04d3fadcf283a705adef6c0 Mon Sep 17 00:00:00 2001 From: hugo4715 Date: Sat, 1 Aug 2020 16:36:18 +0200 Subject: [PATCH] Choose the right currency for removing holdings (#434) --- TNE/src/net/tnemc/core/common/account/TNEAccount.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TNE/src/net/tnemc/core/common/account/TNEAccount.java b/TNE/src/net/tnemc/core/common/account/TNEAccount.java index b2b29a6a..cf69823a 100644 --- a/TNE/src/net/tnemc/core/common/account/TNEAccount.java +++ b/TNE/src/net/tnemc/core/common/account/TNEAccount.java @@ -473,7 +473,7 @@ public EconomyResponse removeHoldings(BigDecimal amount, String world) { @Override public EconomyResponse removeHoldings(BigDecimal amount, Currency currency) { if(amount.equals(BigDecimal.ZERO)) return GeneralResponse.SUCCESS; - if(hasHoldings(amount)) { + if(hasHoldings(amount, currency)) { String world = TNE.instance().defaultWorld; removeHoldings(amount, world, currency.name(), false); return GeneralResponse.SUCCESS; @@ -484,7 +484,7 @@ public EconomyResponse removeHoldings(BigDecimal amount, Currency currency) { @Override public EconomyResponse removeHoldings(BigDecimal amount, Currency currency, String world) { if(amount.equals(BigDecimal.ZERO)) return GeneralResponse.SUCCESS; - if(hasHoldings(amount)) { + if(hasHoldings(amount, currency)) { removeHoldings(amount, world, currency.name(), false); return GeneralResponse.SUCCESS; }