From 93e71887a8f897a010447cd097da450134b63f9b Mon Sep 17 00:00:00 2001 From: hvarona Date: Wed, 21 Nov 2018 22:42:59 -0400 Subject: [PATCH] Fixed bitocin balance --- .../crystalwallet/manager/GeneralAccountManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/cy/agorise/crystalwallet/manager/GeneralAccountManager.java b/app/src/main/java/cy/agorise/crystalwallet/manager/GeneralAccountManager.java index fa6a6b8..17fc1d8 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/manager/GeneralAccountManager.java +++ b/app/src/main/java/cy/agorise/crystalwallet/manager/GeneralAccountManager.java @@ -280,11 +280,11 @@ public class GeneralAccountManager implements CryptoAccountManager, CryptoNetInf } ccTransaction.setAmount(amount); - CryptoCurrency currency = db.cryptoCurrencyDao().getByNameAndCryptoNet(this.cryptoCoin.name(), this.cryptoCoin.getCryptoNet().name()); + CryptoCurrency currency = db.cryptoCurrencyDao().getByNameAndCryptoNet(this.cryptoCoin.getLabel(), this.cryptoCoin.getCryptoNet().name()); if (currency == null) { currency = new CryptoCurrency(); currency.setCryptoNet(this.cryptoCoin.getCryptoNet()); - currency.setName(this.cryptoCoin.name()); + currency.setName(this.cryptoCoin.getLabel()); currency.setPrecision(this.cryptoCoin.getPrecision()); long idCurrency = db.cryptoCurrencyDao().insertCryptoCurrency(currency)[0]; currency.setId(idCurrency); @@ -325,11 +325,11 @@ public class GeneralAccountManager implements CryptoAccountManager, CryptoNetInf } private void updateBalance(CryptoCoinTransaction ccTransaction, long amount, CrystalDatabase db){ - CryptoCurrency currency = db.cryptoCurrencyDao().getByNameAndCryptoNet(this.cryptoCoin.name(), this.cryptoCoin.getCryptoNet().name()); + CryptoCurrency currency = db.cryptoCurrencyDao().getByNameAndCryptoNet(this.cryptoCoin.getLabel(), this.cryptoCoin.getCryptoNet().name()); if (currency == null) { currency = new CryptoCurrency(); currency.setCryptoNet(this.cryptoCoin.getCryptoNet()); - currency.setName(this.cryptoCoin.name()); + currency.setName(this.cryptoCoin.getLabel()); currency.setPrecision(this.cryptoCoin.getPrecision()); long idCurrency = db.cryptoCurrencyDao().insertCryptoCurrency(currency)[0]; currency.setId(idCurrency);