diff --git a/app/src/main/java/com/tangem/domain/wallet/BtcEngine.java b/app/src/main/java/com/tangem/domain/wallet/BtcEngine.java
index 50617a497c..68d015b2d9 100644
--- a/app/src/main/java/com/tangem/domain/wallet/BtcEngine.java
+++ b/app/src/main/java/com/tangem/domain/wallet/BtcEngine.java
@@ -60,24 +60,24 @@ public class BtcEngine extends CoinEngine {
}
-// public static String[] GetBitcoinTestNetServiceHosts() {
-// return new String[]{/*"testnetnode.arihanc.com"*/BitcoinTestNetNode.hsmiths_com.getHost(), BitcoinTestNetNode.qtornado_com.getHost(), BitcoinTestNetNode.bauerj_eu.getHost()};
-// }
-//
-// public static Integer[] GetBitcoinTestNetServicePorts() {
-// return new Integer[]{/*51001*/BitcoinTestNetNode.hsmiths_com.getPort(), BitcoinTestNetNode.qtornado_com.getPort(), BitcoinTestNetNode.bauerj_eu.getPort()};
-// }
-
-
public static String[] GetBitcoinTestNetServiceHosts() {
- return new String[]{BitcoinTestNetNode.bauerj_eu.getHost()};
+ return new String[]{/*"testnetnode.arihanc.com"*/BitcoinTestNetNode.hsmiths_com.getHost(), BitcoinTestNetNode.qtornado_com.getHost(), BitcoinTestNetNode.bauerj_eu.getHost()};
}
public static Integer[] GetBitcoinTestNetServicePorts() {
- return new Integer[]{BitcoinTestNetNode.bauerj_eu.getPort()};
+ return new Integer[]{/*51001*/BitcoinTestNetNode.hsmiths_com.getPort(), BitcoinTestNetNode.qtornado_com.getPort(), BitcoinTestNetNode.bauerj_eu.getPort()};
}
+// public static String[] GetBitcoinTestNetServiceHosts() {
+// return new String[]{BitcoinTestNetNode.bauerj_eu.getHost()};
+// }
+//
+// public static Integer[] GetBitcoinTestNetServicePorts() {
+// return new Integer[]{BitcoinTestNetNode.bauerj_eu.getPort()};
+// }
+
+
// public static String[] GetBitcoinTestNetServiceHosts() {
// return new String[]{"electrum.akinbo.org"/*, "testnet.hsmiths.com", "testnet.qtornado.com", "testnet1.bauerj.eu"*/};
diff --git a/app/src/main/java/com/tangem/presentation/activity/ConfirmPaymentActivity.java b/app/src/main/java/com/tangem/presentation/activity/ConfirmPaymentActivity.java
index c43e06f9ac..26e7ba186e 100644
--- a/app/src/main/java/com/tangem/presentation/activity/ConfirmPaymentActivity.java
+++ b/app/src/main/java/com/tangem/presentation/activity/ConfirmPaymentActivity.java
@@ -61,8 +61,8 @@ public class ConfirmPaymentActivity extends AppCompatActivity implements NfcAdap
private boolean feeRequestSuccess = false;
private boolean balanceRequestSuccess = false;
private EditText etWallet;
- private TextView tvAmountEquivalent;
- private TextView tvFeeEquivalent;
+// private TextView tvAmountEquivalent;
+// private TextView tvFeeEquivalent;
private EditText etAmount;
private EditText etFee;
private ImageView ivCamera;
@@ -353,9 +353,9 @@ public class ConfirmPaymentActivity extends AppCompatActivity implements NfcAdap
TextView tvCurrency2 = findViewById(R.id.tvCurrency2);
etAmount = findViewById(R.id.etAmount);
etFee = findViewById(R.id.etFee);
- TextView tvBalanceEquivalent = findViewById(R.id.tvBalanceEquivalent);
- tvAmountEquivalent = findViewById(R.id.tvAmountEquivalent);
- tvFeeEquivalent = findViewById(R.id.tvFeeEquivalent);
+// TextView tvBalanceEquivalent = findViewById(R.id.tvBalanceEquivalent);
+// tvAmountEquivalent = findViewById(R.id.tvAmountEquivalent);
+// tvFeeEquivalent = findViewById(R.id.tvFeeEquivalent);
ivCamera = findViewById(R.id.ivCamera);
rgFee = findViewById(R.id.rgFee);
@@ -369,19 +369,19 @@ public class ConfirmPaymentActivity extends AppCompatActivity implements NfcAdap
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
- try {
-
- CoinEngine engine = CoinEngineFactory.Create(mCard.getBlockchain());
- tvAmountEquivalent.setText(engine.GetAmountEqualentDescriptor(mCard, etAmount.getText().toString()));
- if (!mCard.getAmountEquivalentDescriptionAvailable()) {
- tvAmountEquivalent.setError("Service unavailable");
- } else {
- tvAmountEquivalent.setError(null);
- }
- } catch (Exception e) {
- e.printStackTrace();
- tvAmountEquivalent.setText("");
- }
+// try {
+//
+// CoinEngine engine = CoinEngineFactory.Create(mCard.getBlockchain());
+// tvAmountEquivalent.setText(engine.GetAmountEqualentDescriptor(mCard, etAmount.getText().toString()));
+// if (!mCard.getAmountEquivalentDescriptionAvailable()) {
+// tvAmountEquivalent.setError("Service unavailable");
+// } else {
+// tvAmountEquivalent.setError(null);
+// }
+// } catch (Exception e) {
+// e.printStackTrace();
+// tvAmountEquivalent.setText("");
+// }
}
@Override
@@ -398,21 +398,21 @@ public class ConfirmPaymentActivity extends AppCompatActivity implements NfcAdap
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
- try {
-
- CoinEngine engine = CoinEngineFactory.Create(mCard.getBlockchain());
- String eqFee = engine.EvaluteFeeEquivalent(mCard, etFee.getText().toString());
- tvFeeEquivalent.setText(eqFee);
-
- if (!mCard.getAmountEquivalentDescriptionAvailable()) {
- tvFeeEquivalent.setError("Service unavailable");
- } else {
- tvFeeEquivalent.setError(null);
- }
- } catch (Exception e) {
- e.printStackTrace();
- tvFeeEquivalent.setText("");
- }
+// try {
+//
+// CoinEngine engine = CoinEngineFactory.Create(mCard.getBlockchain());
+// String eqFee = engine.EvaluteFeeEquivalent(mCard, etFee.getText().toString());
+// tvFeeEquivalent.setText(eqFee);
+//
+// if (!mCard.getAmountEquivalentDescriptionAvailable()) {
+// tvFeeEquivalent.setError("Service unavailable");
+// } else {
+// tvFeeEquivalent.setError(null);
+// }
+// } catch (Exception e) {
+// e.printStackTrace();
+// tvFeeEquivalent.setText("");
+// }
}
@Override
@@ -436,12 +436,12 @@ public class ConfirmPaymentActivity extends AppCompatActivity implements NfcAdap
tvCardID.setText(mCard.getCIDDescription());
//tvBalanceEquivalent.setText(mCard.getBalanceEquivalentDescription());
- tvBalanceEquivalent.setText(engine.GetBalanceEquivalent(mCard));
- if (!mCard.getAmountEquivalentDescriptionAvailable()) {
- tvBalanceEquivalent.setError("Service unavailable");
- } else {
- tvBalanceEquivalent.setError(null);
- }
+// tvBalanceEquivalent.setText(engine.GetBalanceEquivalent(mCard));
+// if (!mCard.getAmountEquivalentDescriptionAvailable()) {
+// tvBalanceEquivalent.setError("Service unavailable");
+// } else {
+// tvBalanceEquivalent.setError(null);
+// }
etWallet.setText(getIntent().getStringExtra("Wallet"));
diff --git a/app/src/main/java/com/tangem/presentation/activity/PreparePaymentActivity.java b/app/src/main/java/com/tangem/presentation/activity/PreparePaymentActivity.java
index f4264d6733..eb567d90ce 100644
--- a/app/src/main/java/com/tangem/presentation/activity/PreparePaymentActivity.java
+++ b/app/src/main/java/com/tangem/presentation/activity/PreparePaymentActivity.java
@@ -34,7 +34,7 @@ public class PreparePaymentActivity extends AppCompatActivity implements NfcAdap
private static final int REQUEST_CODE_SEND_PAYMENT = 2;
private EditText etWallet;
private EditText etAmount;
- private TextView tvAmountEquivalent;
+// private TextView tvAmountEquivalent;
boolean use_mCurrency;
private TangemCard mCard;
private NfcManager mNfcManager;
@@ -59,8 +59,8 @@ public class PreparePaymentActivity extends AppCompatActivity implements NfcAdap
TextView tvCurrency = findViewById(R.id.tvCurrency);
TextView tvCardId = findViewById(R.id.tvCardID);
TextView tvBalance = findViewById(R.id.tvBalance);
- TextView tvBalanceEquivalent = findViewById(R.id.tvBalanceEquivalent);
- tvAmountEquivalent = findViewById(R.id.tvAmountEquivalent);
+// TextView tvBalanceEquivalent = findViewById(R.id.tvBalanceEquivalent);
+// tvAmountEquivalent = findViewById(R.id.tvAmountEquivalent);
tvCardId.setText(mCard.getCIDDescription());
CoinEngine engine = CoinEngineFactory.Create(mCard.getBlockchain());
@@ -72,17 +72,17 @@ public class PreparePaymentActivity extends AppCompatActivity implements NfcAdap
tvBalance.setText(engine.GetBalanceWithAlter(mCard));
}
- tvBalanceEquivalent.setText(engine.GetBalanceEquivalent(mCard));
+// tvBalanceEquivalent.setText(engine.GetBalanceEquivalent(mCard));
if (etAmount != null && mCard.getRemainingSignatures() < 2) {
etAmount.setEnabled(false);
}
- if (!mCard.getAmountEquivalentDescriptionAvailable()) {
- tvBalanceEquivalent.setError("Service unavailable");
- } else {
- tvBalanceEquivalent.setError(null);
- }
+// if (!mCard.getAmountEquivalentDescriptionAvailable()) {
+// tvBalanceEquivalent.setError("Service unavailable");
+// } else {
+// tvBalanceEquivalent.setError(null);
+// }
etAmount.addTextChangedListener(new TextWatcher() {
@Override
@@ -92,18 +92,18 @@ public class PreparePaymentActivity extends AppCompatActivity implements NfcAdap
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
- try {
- CoinEngine engine = CoinEngineFactory.Create(mCard.getBlockchain());
- tvAmountEquivalent.setText(engine.GetAmountEqualentDescriptor(mCard, etAmount.getText().toString()));
- if (!mCard.getAmountEquivalentDescriptionAvailable()) {
- tvAmountEquivalent.setError("Service unavailable");
- } else {
- tvAmountEquivalent.setError(null);
- }
- } catch (Exception e) {
- e.printStackTrace();
- tvAmountEquivalent.setText("");
- }
+// try {
+// CoinEngine engine = CoinEngineFactory.Create(mCard.getBlockchain());
+// tvAmountEquivalent.setText(engine.GetAmountEqualentDescriptor(mCard, etAmount.getText().toString()));
+// if (!mCard.getAmountEquivalentDescriptionAvailable()) {
+// tvAmountEquivalent.setError("Service unavailable");
+// } else {
+// tvAmountEquivalent.setError(null);
+// }
+// } catch (Exception e) {
+// e.printStackTrace();
+// tvAmountEquivalent.setText("");
+// }
}
@Override
diff --git a/app/src/main/java/com/tangem/presentation/dialog/WaitSecurityDelayDialog.java b/app/src/main/java/com/tangem/presentation/dialog/WaitSecurityDelayDialog.java
index b241be42df..2c971ec7b1 100644
--- a/app/src/main/java/com/tangem/presentation/dialog/WaitSecurityDelayDialog.java
+++ b/app/src/main/java/com/tangem/presentation/dialog/WaitSecurityDelayDialog.java
@@ -19,9 +19,9 @@ import java.util.TimerTask;
* Created by dvol on 06.03.2018.
*/
public class WaitSecurityDelayDialog extends DialogFragment {
- ProgressBar progressBar;
- int msTimeout = 60000, msProgress = 0;
- Timer timer;
+ private ProgressBar progressBar;
+ private int msTimeout = 60000, msProgress = 0;
+ private Timer timer;
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
@@ -50,7 +50,7 @@ public class WaitSecurityDelayDialog extends DialogFragment {
}, 1000, 1000);
return new AlertDialog.Builder(getActivity())
.setIcon(R.drawable.tangem_logo_small_new)
- .setTitle("Security delay")
+ .setTitle(R.string.security_delay)
.setView(v)
.setCancelable(false)
.create();
diff --git a/app/src/main/java/com/tangem/presentation/fragment/LoadedWallet.java b/app/src/main/java/com/tangem/presentation/fragment/LoadedWallet.java
index 8dfce8ffe0..77e73e67d2 100644
--- a/app/src/main/java/com/tangem/presentation/fragment/LoadedWallet.java
+++ b/app/src/main/java/com/tangem/presentation/fragment/LoadedWallet.java
@@ -666,6 +666,8 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
} else if (engine.AwaitingConfirmation(mCard)) {
Toast.makeText(getContext(), R.string.please_wait_while_previous, Toast.LENGTH_LONG).show();
return;
+
+
} else if (!engine.CheckUnspentTransaction(mCard)) {
Toast.makeText(getContext(), R.string.please_wait_for_confirmation, Toast.LENGTH_LONG).show();
return;
diff --git a/app/src/main/res/layout/activity_confirm_payment.xml b/app/src/main/res/layout/activity_confirm_payment.xml
index 5f6151d81d..8d71a994ee 100644
--- a/app/src/main/res/layout/activity_confirm_payment.xml
+++ b/app/src/main/res/layout/activity_confirm_payment.xml
@@ -54,7 +54,7 @@
android:textColor="@color/black"
android:textSize="@dimen/text_size_medium"
android:textStyle="bold"
- tools:text="3434 7474 7474 8484"/>
+ tools:text="BB00 0000 1210 0233"/>
-
+ android:layout_marginTop="4dp"
+ android:fontFamily="@font/montserrat_light"
+ android:textColor="@color/black"
+ android:textSize="@dimen/text_size_medium"
+ android:textStyle="bold"
+ tools:text="4.51735 mBtc"/>
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
-
+
+ android:layout_height="wrap_content">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -334,18 +330,18 @@
app:layout_constraintLeft_toRightOf="@+id/etFee"
app:layout_constraintTop_toTopOf="parent"/>
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -353,16 +349,10 @@
diff --git a/app/src/main/res/layout/activity_prepare_payment.xml b/app/src/main/res/layout/activity_prepare_payment.xml
index 86a4d11508..d8435f1694 100644
--- a/app/src/main/res/layout/activity_prepare_payment.xml
+++ b/app/src/main/res/layout/activity_prepare_payment.xml
@@ -56,7 +56,8 @@
android:fontFamily="@font/montserrat_light"
android:textColor="@color/black"
android:textSize="@dimen/text_size_medium"
- android:textStyle="bold"/>
+ android:textStyle="bold"
+ tools:text="BB00 0000 1210 0233"/>
+ tools:text="4.51735 mBtc"/>
-
+
+
+
+
+
+
+
+
+
+
@@ -148,6 +149,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
+ android:layout_marginEnd="8dp"
android:fontFamily="@font/montserrat_light"
android:hint="@string/enter_wallet_address"
android:inputType="text|textMultiLine|textNoSuggestions"
@@ -227,17 +229,17 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@+id/etAmount"/>
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 1b71e19aee..58757ecc32 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -50,6 +50,7 @@
Your Android device is rooted. Security at risk!
Got it
Warning
+ Security delay
The NFC adapter of the device does not support extended length APDU, it\'s possible that some functions will not work!
Your money is at risk!
This banknote has enforced security delay