Updated on 2026-08-14
This commit is contained in:
commit
66ee693070
12 changed files with 132 additions and 106 deletions
|
|
@ -36,8 +36,8 @@ android {
|
|||
flavorDimensions ""
|
||||
productFlavors {
|
||||
tangemAccess {
|
||||
versionCode 109
|
||||
versionName "0.905.1." + generateVersionName()
|
||||
versionCode 110
|
||||
versionName "0.906.1." + generateVersionName()
|
||||
applicationId "com.tangem.wallet"
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
|
|
|
|||
19
app/src/debug/AndroidManifest.xml
Normal file
19
app/src/debug/AndroidManifest.xml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.tangem.wallet">
|
||||
|
||||
|
||||
<application
|
||||
tools:ignore="GoogleAppIndexingWarning">
|
||||
|
||||
<provider
|
||||
android:name="com.tangem.data.LogFileProvider"
|
||||
android:authorities="@string/log_file_provider_authorities"
|
||||
android:enabled="true"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
|
@ -30,12 +30,12 @@
|
|||
android:theme="@style/AppTheme"
|
||||
tools:ignore="GoogleAppIndexingWarning">
|
||||
|
||||
<provider
|
||||
android:name="com.tangem.data.LogFileProvider"
|
||||
android:authorities="@string/log_file_provider_authorities"
|
||||
android:enabled="true"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true" />
|
||||
<!--<provider-->
|
||||
<!--android:name="com.tangem.data.LogFileProvider"-->
|
||||
<!--android:authorities="@string/log_file_provider_authorities"-->
|
||||
<!--android:enabled="true"-->
|
||||
<!--android:exported="false"-->
|
||||
<!--android:grantUriPermissions="true" />-->
|
||||
|
||||
<activity
|
||||
android:name="com.tangem.ui.activity.LogoActivity"
|
||||
|
|
@ -59,6 +59,15 @@
|
|||
<data
|
||||
android:host="www.tangem.com"
|
||||
android:scheme="http" />
|
||||
<data
|
||||
android:host="www.tangem.com"
|
||||
android:scheme="https" />
|
||||
<data
|
||||
android:host="tangem.com"
|
||||
android:scheme="http" />
|
||||
<data
|
||||
android:host="tangem.com"
|
||||
android:scheme="https" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.nfc.action.TECH_DISCOVERED" />
|
||||
|
|
|
|||
|
|
@ -20,11 +20,7 @@ import java.util.Objects;
|
|||
|
||||
public class LogFileProvider extends ContentProvider {
|
||||
|
||||
private static final String CLASS_NAME = "LogFileProvider";
|
||||
|
||||
// The authority is the symbolic name for the provider class
|
||||
// public static final String AUTHORITY = "com.tangem.LogFileProvider";
|
||||
// public static final String AUTHORITY = "com.tangem.LogFileProvider";
|
||||
private static final String TAG = LogFileProvider.class.getSimpleName() + "-oF";
|
||||
|
||||
// UriMatcher used to match against incoming requests
|
||||
private UriMatcher uriMatcher;
|
||||
|
|
@ -37,20 +33,15 @@ public class LogFileProvider extends ContentProvider {
|
|||
// 'content://it.my.app.LogFileProvider/*'
|
||||
// and return 1 in the case that the incoming Uri matches this pattern
|
||||
|
||||
// uriMatcher.addURI(Objects.requireNonNull(getContext()).getString(R.string.log_file_provider_authorities), "*", 1);
|
||||
// uriMatcher.addURI(Objects.requireNonNull("com.tangem.data.LogFileProvider"), "*", 1);
|
||||
uriMatcher.addURI(Objects.requireNonNull(getContext()).getString(R.string.log_file_provider_authorities), "*", 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ParcelFileDescriptor openFile(Uri uri, String mode)
|
||||
throws FileNotFoundException {
|
||||
public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {
|
||||
|
||||
String LOG_TAG = CLASS_NAME + "-oF";
|
||||
|
||||
Log.v(LOG_TAG,
|
||||
"Called with uri: '" + uri + "'." + uri.getLastPathSegment());
|
||||
Log.v(TAG, "Called with uri: '" + uri + "'." + uri.getLastPathSegment());
|
||||
|
||||
// check incoming Uri against the matcher
|
||||
switch (uriMatcher.match(uri)) {
|
||||
|
|
@ -74,9 +65,8 @@ public class LogFileProvider extends ContentProvider {
|
|||
|
||||
// Otherwise unrecognised Uri
|
||||
default:
|
||||
Log.v(LOG_TAG, "Unsupported uri: '" + uri + "'.");
|
||||
throw new FileNotFoundException("Unsupported uri: "
|
||||
+ uri.toString());
|
||||
Log.v(TAG, "Unsupported uri: '" + uri + "'.");
|
||||
throw new FileNotFoundException("Unsupported uri: " + uri.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -317,15 +317,16 @@ public class ServerApiElectrum {
|
|||
// install the all-trusting host verifier
|
||||
HttpsURLConnection.setDefaultHostnameVerifier(allHostsValid);
|
||||
|
||||
SSLSocket sslSocket;
|
||||
Socket sslSocket = new Socket();
|
||||
|
||||
List<ElectrumRequest> result = new ArrayList<>();
|
||||
Collections.addAll(result, electrumRequest);
|
||||
|
||||
try {
|
||||
Log.i(TAG, host + " " + port);
|
||||
sslSocket = (SSLSocket) sf.createSocket(host, port);
|
||||
sslSocket.connect(new InetSocketAddress(host,port), 3000);
|
||||
sslSocket.setSoTimeout(3000);
|
||||
sslSocket = sf.createSocket(sslSocket, host, port, true);
|
||||
try {
|
||||
OutputStream os = sslSocket.getOutputStream();
|
||||
OutputStreamWriter out = new OutputStreamWriter(os, "UTF-8");
|
||||
|
|
|
|||
|
|
@ -97,6 +97,12 @@ class MainFragment : Fragment(), NfcAdapter.ReaderCallback, CardProtocol.Notific
|
|||
viewModel.getVersionName().observe(this, Observer { text ->
|
||||
(activity as MainActivity).toastHelper.showSnackbarUpdateVersion(context!!, cl, text)
|
||||
})
|
||||
|
||||
val intent = activity?.intent
|
||||
if (intent != null && (NfcAdapter.ACTION_TECH_DISCOVERED == intent.action || NfcAdapter.ACTION_NDEF_DISCOVERED == intent.action)) {
|
||||
val tag = intent.getParcelableExtra<Tag>(NfcAdapter.EXTRA_TAG)
|
||||
onTagDiscovered(tag)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ package com.tangem.wallet.bch
|
|||
|
||||
enum class BitcoinCashNode(val host: String, val port: Int, val proto: String) {
|
||||
N_001("electrumx.hillsideinternet.com", 50002, "ssl"),
|
||||
N_002("dedi.jochen-hoenicke.de", 51002, "ssl"),
|
||||
N_003("crypto.mldlabs.com", 50002, "ssl"),
|
||||
N_004("electroncash.cascharia.com", 50002, "ssl"),
|
||||
N_005("bch.crypto.mldlabs.com", 50002, "ssl"),
|
||||
// N_002("dedi.jochen-hoenicke.de", 51002, "ssl"),
|
||||
// N_003("crypto.mldlabs.com", 50002, "ssl"),
|
||||
// N_004("electroncash.cascharia.com", 50002, "ssl"),
|
||||
// N_005("bch.crypto.mldlabs.com", 50002, "ssl"),
|
||||
N_006("electron.coinucopia.io", 50002, "ssl"),
|
||||
N_007("blackie.c3-soft.com", 50002, "ssl"),
|
||||
N_008("electrum.imaginary.cash", 50002, "ssl"),
|
||||
N_009("bitcoincash.quangld.com", 50002, "ssl"),
|
||||
N_010("bch.stitthappens.com", 50002, "ssl"),
|
||||
// N_009("bitcoincash.quangld.com", 50002, "ssl"),
|
||||
// N_010("bch.stitthappens.com", 50002, "ssl"),
|
||||
}
|
||||
|
|
@ -44,7 +44,8 @@ public class CashAddr {
|
|||
byte[] checksumBytes = calculateChecksumBytesPolymod(allChecksumInput);
|
||||
checksumBytes = convertBits(checksumBytes, 8, 5, true);
|
||||
String cashAddress = BitcoinCashBase32.encode(concatenateByteArrays(payloadBytes, checksumBytes));
|
||||
return prefixString + SEPARATOR + cashAddress;
|
||||
//return prefixString + SEPARATOR + cashAddress;
|
||||
return cashAddress;
|
||||
}
|
||||
|
||||
public static BitcoinCashAddressDecodedParts decodeCashAddress(String bitcoinCashAddress) {
|
||||
|
|
|
|||
|
|
@ -1,68 +1,68 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#FFFFFF"
|
||||
tools:context="com.tangem.ui.activity.LogoActivity"
|
||||
tools:ignore="contentDescription">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvExtension"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="13dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:fontFamily="@font/maax"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textColor="@android:color/holo_red_light"
|
||||
android:textSize="@dimen/text_size_small"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivLogo"
|
||||
tools:text="@string/cardano"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivLogo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:src="@drawable/tangem_logo_full_new"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAppVersion"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="@string/beta"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textColor="@android:color/holo_red_light"
|
||||
android:textSize="@dimen/text_size_small"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvExtension" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="@string/smart_cash_ag"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="@dimen/text_size_small"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#FFFFFF"
|
||||
tools:context="com.tangem.ui.activity.LogoActivity"
|
||||
tools:ignore="contentDescription">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvExtension"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="13dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:fontFamily="@font/maax"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textColor="@android:color/holo_red_light"
|
||||
android:textSize="@dimen/text_size_small"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivLogo"
|
||||
tools:text="@string/cardano"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivLogo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:src="@drawable/tangem_logo_full_new"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAppVersion"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="@string/beta"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textColor="@android:color/holo_red_light"
|
||||
android:textSize="@dimen/text_size_small"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvExtension" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="@string/tangem_ag"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="@dimen/text_size_small"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="@string/smart_cash_ag"
|
||||
android:text="@string/tangem_ag"
|
||||
android:textColor="@color/primary_dark"
|
||||
android:textSize="@dimen/text_size_medium"
|
||||
android:textStyle="normal|bold" />
|
||||
|
|
@ -317,7 +317,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="@string/smart_cash_ag"
|
||||
android:text="@string/tangem_ag"
|
||||
android:textColor="@color/primary_dark"
|
||||
android:textSize="@dimen/text_size_medium"
|
||||
android:textStyle="normal|bold" />
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
<string name="amount">Amount</string>
|
||||
<string name="m_btc">BTC</string>
|
||||
<string name="scan_again_to_verify_the_card">Scan again to verify the card</string>
|
||||
<string name="smart_cash_ag">Smart Cash AG</string>
|
||||
<string name="tangem_ag">Tangem AG</string>
|
||||
<string name="wallet">Wallet</string>
|
||||
<string name="need_attach_card_again">Scan again to verify the card</string>
|
||||
<string name="reading">READING…</string>
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ package com.tangem.card_common.data;
|
|||
public enum Manufacturer {
|
||||
|
||||
Unknown("", "Unknown"),
|
||||
SMARTCASH_AG("SMART CASH AG", "SMART CASH AG"),
|
||||
DEVELOPERS_SMARTCASH_AG("DEVELOP CASH AG", "SMART CASH AG (DEVELOPERS)"),
|
||||
SMARTCASH("SMART CASH", "SMART CASH");
|
||||
SMARTCASH_AG("SMART CASH AG", "TANGEM AG"),
|
||||
DEVELOPERS_SMARTCASH_AG("DEVELOP CASH AG", "TANGEM AG (DEVELOPERS)"),
|
||||
SMARTCASH("SMART CASH", "TANGEM");
|
||||
|
||||
private String ID;
|
||||
private String officialName;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue