fix calculate uri

This commit is contained in:
hvarona 2018-11-11 22:26:34 -04:00
parent 6e81192b37
commit 9c6db3a6ea

View file

@ -500,7 +500,7 @@ public class GeneralAccountManager implements CryptoAccountManager, CryptoNetInf
CrystalDatabase db = CrystalDatabase.getAppDatabase(request.getContext()); CrystalDatabase db = CrystalDatabase.getAppDatabase(request.getContext());
long index = db.bitcoinAddressDao().getLastExternalAddress(request.getAccount().getId()); long index = db.bitcoinAddressDao().getLastExternalAddress(request.getAccount().getId());
BitcoinAddress address = db.bitcoinAddressDao().getExternalByIndex(index); BitcoinAddress address = db.bitcoinAddressDao().getExternalByIndex(index);
if(db.bitcoinTransactionDao().getGtxIOByAddress(address.getAddress()).size()<=0){ if(address != null && db.bitcoinTransactionDao().getGtxIOByAddress(address.getAddress()).size()<=0){
uri.append(address.getAddress()); uri.append(address.getAddress());
}else { }else {
index++; index++;