Updated on 2026-08-14

This commit is contained in:
Tangem 2019-01-10 16:46:15 +03:00
parent 60fb1b56a3
commit 3da5e38973
4 changed files with 6 additions and 9 deletions

View file

@ -16,7 +16,7 @@ data class InsightResponse(
var txid: String = "",
@SerializedName("satoshis")
var satoshis: Int? = null,
var satoshis: Long? = null,
@SerializedName("height")
var height: Int? = null,

View file

@ -5,13 +5,11 @@ import android.text.InputFilter;
import android.util.Log;
import com.tangem.data.network.ElectrumRequest;
import com.tangem.data.network.ServerApiCommon;
import com.tangem.data.network.ServerApiElectrum;
import com.tangem.domain.wallet.BCHUtils;
import com.tangem.domain.wallet.BTCUtils;
import com.tangem.tangemcard.reader.CardProtocol;
import com.tangem.domain.wallet.BalanceValidator;
import com.tangem.data.Blockchain;
import com.tangem.domain.wallet.btc.BtcData;
import com.tangem.domain.wallet.CoinData;
import com.tangem.domain.wallet.CoinEngine;
@ -24,7 +22,6 @@ import com.tangem.util.CryptoUtil;
import com.tangem.util.DecimalDigitsInputFilter;
import com.tangem.util.DerEncodingUtil;
import com.tangem.tangemcard.util.Util;
import com.tangem.util.FormatUtil;
import com.tangem.wallet.R;
import org.json.JSONArray;
@ -594,7 +591,7 @@ public class BtcCashEngine extends CoinEngine {
JSONObject jsUnspent = jsUnspentArray.getJSONObject(i);
BtcData.UnspentTransaction trUnspent = new BtcData.UnspentTransaction();
trUnspent.txID = jsUnspent.getString("tx_hash");
trUnspent.Amount = jsUnspent.getInt("value");
trUnspent.Amount = jsUnspent.getLong("value");
trUnspent.Height = jsUnspent.getInt("height");
coinData.getUnspentTransactions().add(trUnspent);
}

View file

@ -35,14 +35,14 @@ public class BtcData extends CoinData {
public static class UnspentTransaction {
public String txID;
public Integer Amount;
public Long Amount;
public Integer Height;
public String Raw = "";
public Bundle getAsBundle() {
Bundle B = new Bundle();
B.putString("txID", txID);
B.putInt("Amount", Amount);
B.putLong("Amount", Amount);
B.putInt("Height", Height);
B.putString("Raw", Raw);
return B;
@ -50,7 +50,7 @@ public class BtcData extends CoinData {
public void loadFromBundle(Bundle B) {
txID = B.getString("txID");
Amount = B.getInt("Amount");
Amount = B.getLong("Amount");
Height = B.getInt("Height");
Raw = B.getString("Raw");
}

View file

@ -561,7 +561,7 @@ public class BtcEngine extends CoinEngine {
JSONObject jsUnspent = jsUnspentArray.getJSONObject(i);
BtcData.UnspentTransaction trUnspent = new BtcData.UnspentTransaction();
trUnspent.txID = jsUnspent.getString("tx_hash");
trUnspent.Amount = jsUnspent.getInt("value");
trUnspent.Amount = jsUnspent.getLong("value");
trUnspent.Height = jsUnspent.getInt("height");
coinData.getUnspentTransactions().add(trUnspent);
}