Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
Choose the right currency for removing holdings (#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugo4715 authored Aug 1, 2020
1 parent 1ee9ded commit 7f40192
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TNE/src/net/tnemc/core/common/account/TNEAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit 7f40192

Please sign in to comment.