Skip to content

Commit 5f2f5ba

Browse files
committed
- Update address verification to support Panthera
- Update XLA donation address
1 parent f0c7052 commit 5f2f5ba

File tree

7 files changed

+18
-26
lines changed

7 files changed

+18
-26
lines changed

app/build.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ android {
1414
applicationId "io.scalaproject.androidminer"
1515
minSdkVersion 19
1616
targetSdkVersion 28 // to avoid an error 13 when running exe in assets folder (sdk 29 gives the error)
17-
versionCode 6
18-
versionName "2.0.0"
17+
versionCode 7
18+
versionName "2.1.0"
1919
buildConfigField "long", "BUILD_TIME", System.currentTimeMillis() + "L"
2020
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2121
vectorDrawables.useSupportLibrary = true
@@ -32,8 +32,6 @@ android {
3232
dependencies {
3333
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
3434
implementation 'com.google.android.material:material:1.1.0'
35-
//noinspection GradleDynamicVersion,GradleDependency
36-
implementation 'com.google.android.gms:play-services-vision:9.4.0+'
3735
implementation 'com.github.KingsMentor:MobileVisionBarcodeScanner:2.0.0'
3836
implementation 'androidx.appcompat:appcompat:1.1.0'
3937
implementation 'androidx.legacy:legacy-support-v4:1.0.0'

app/src/main/java/io/scalaproject/androidminer/Config.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class Config {
2121
static final int DefaultPoolIndex = 1;
2222
public static final Long statsDelay = 30000L;
2323
static final String miner_xlarig = "xlarig";
24-
static final String algo = "defyx";
24+
static final String algo = "panthera";
2525

2626
public static final String version = "4";
2727
static final Integer logMaxLength = 50000;

app/src/main/java/io/scalaproject/androidminer/MainActivity.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public class MainActivity extends BaseActivity
120120
{
121121
private static final String LOG_TAG = "MainActivity";
122122

123-
private TextView tvHashrate, tvStatus, tvNbCores, tvCPUTemperature, tvBatteryTemperature, tvAcceptedShares, tvDifficulty, tvConnection, tvLog;
123+
private TextView tvHashrate, tvStatus, tvNbCores, tvCPUTemperature, tvBatteryTemperature, tvAcceptedShares, tvDifficulty, tvConnection, tvLog, tvStatusProgess;
124124
private TubeSpeedometer meterCores, meterHashrate, meterHashrate_avg, meterHashrate_max;
125125
private SeekBar sbCores = null;
126126

@@ -273,6 +273,8 @@ protected void onCreate(Bundle savedInstanceState) {
273273
pbStatus.setMax(MAX_HASHRATE_TIMER * 2);
274274
pbStatus.setProgress(0);
275275

276+
tvStatusProgess = findViewById(R.id.hr_progress);
277+
276278
// Log
277279
tvLog = findViewById(R.id.output);
278280
tvLog.setMovementMethod(new ScrollingMovementMethod());
@@ -1086,15 +1088,17 @@ else if(status == STATE_MINING) {
10861088
tvStatus.setText(getResources().getString(R.string.paused));
10871089
stopTimerStatusHashrate();
10881090

1089-
pbStatus.setIndeterminate(false);
1091+
pbStatus.setIndeterminate(true);
10901092
pbStatus.setProgress(0);
1093+
tvStatusProgess.setVisibility(View.INVISIBLE);
10911094
} else if (status == STATE_COOLING && isDeviceMining()) {
10921095
tvStatus.setText(getResources().getString(R.string.cooling));
10931096
stopTimerStatusHashrate();
10941097

10951098
pbStatus.setIndeterminate(true);
10961099
} else if (status == STATE_CALCULATING) {
10971100
tvStatus.setText(getResources().getString(R.string.processing));
1101+
tvStatusProgess.setVisibility(View.VISIBLE);
10981102

10991103
pbStatus.setIndeterminate(false);
11001104
startTimerStatusHashrate();
@@ -1134,8 +1138,9 @@ public void stopTimerStatusHashrate() {
11341138
timerTaskHashrate = null;
11351139

11361140
pbStatus.setProgress(0);
1137-
TextView tvHrProgess = findViewById(R.id.hr_progress);
1138-
tvHrProgess.setText("0%");
1141+
1142+
tvStatusProgess.setVisibility(View.VISIBLE);
1143+
tvStatusProgess.setText("0%");
11391144
}
11401145
}
11411146

@@ -1171,10 +1176,8 @@ private void updateHashrateTicks(float fMax) {
11711176
private void incrementProgressHashrate() {
11721177
pbStatus.setProgress(pbStatus.getProgress() + 1);
11731178

1174-
TextView tvHrProgess = findViewById(R.id.hr_progress);
1175-
11761179
String sProgessPercent = String.valueOf(Math.round((float)pbStatus.getProgress() / (float)pbStatus.getMax() *100.0f));
1177-
tvHrProgess.setText(String.format("%s%%", sProgessPercent));
1180+
tvStatusProgess.setText(String.format("%s%%", sProgessPercent));
11781181
}
11791182

11801183
private boolean isDeviceMining() {

app/src/main/java/io/scalaproject/androidminer/Utils.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,13 @@ final class Utils {
3939

4040
static String SCALA_BTC_ADDRESS = "1XTLY5LqdBXRW6hcHtnuMU7c68mAyW6qm";
4141
static String SCALA_ETH_ADDRESS = "0x133a15dF7177823Dd407ca87A190bbE4585a379e";
42-
static String SCALA_XLA_ADDRESS = "SEiTBcLGpfm3uj5b5RaZDGSUoAGnLCyG5aJjAwko67jqRwWEH26NFPd26EUpdL1zh4RTmTdRWLz8WCmk5F4umYaFByMtJT6RLjD6vzApQJWfi";
42+
static String SCALA_XLA_ADDRESS = "SvkFLjR4DST5bAG8SSHWfta4MsCzRrDEPNx72cTetqcoPfkwi7cFA2sYGG2Tf51rQ9EMSPHVuzxeoS4Y7ieicg5A1M24A8TTW";
4343
static String SCALA_LTC_ADDRESS = "LeLK5hopvfArVyKtkZBzF3B5wj6rGrNUGk";
4444

4545
static boolean verifyAddress(String input) {
46-
Pattern p = Pattern.compile("^Se[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{95}$");
46+
Pattern p = Pattern.compile("^S[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{96}$");
4747
Matcher m = p.matcher(input.trim());
48-
boolean b = m.matches();
49-
if(b) {
50-
return b;
51-
}
52-
Pattern p1 = Pattern.compile("^SE[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{107}$");
53-
Matcher m2 = p1.matcher(input.trim());
54-
return m2.matches();
48+
return m.matches();
5549
}
5650

5751
static float convertStringToFloat(String sNumber) {

app/src/main/java/io/scalaproject/androidminer/miner/Workers.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ public class Workers extends AsyncTask<String, Integer, String> {
1111

1212
public Workers(){
1313
data.hashes =0;
14-
1514
}
1615

17-
1816
@Override
1917
protected void onPreExecute() {
2018
//Setup precondition to execute some task
@@ -28,7 +26,6 @@ protected String doInBackground(String... params) {
2826

2927
@Override
3028
protected void onProgressUpdate(Integer... values) {
31-
3229
//Update the progress of current task
3330
}
3431

app/src/main/java/io/scalaproject/androidminer/miner/algo/DefyxAlgo.java renamed to app/src/main/java/io/scalaproject/androidminer/miner/algo/PantheraAlgo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
package io.scalaproject.androidminer.miner.algo;
66

7-
public class DefyxAlgo extends AlgoAbstract {
7+
public class PantheraAlgo extends AlgoAbstract {
88
}

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:4.0.0'
10+
classpath 'com.android.tools.build:gradle:4.0.1'
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72"
1212

1313
// NOTE: Do not place your application dependencies here; they belong

0 commit comments

Comments
 (0)