diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser
index 415ad18db..684306268 100644
Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ
diff --git a/.idea/caches/gradle_models.ser b/.idea/caches/gradle_models.ser
index 1b5701a2e..94c04efb1 100644
Binary files a/.idea/caches/gradle_models.ser and b/.idea/caches/gradle_models.ser differ
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index 30aa626c2..ae78c113f 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -1,29 +1,113 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ xmlns:android
+
+ ^$
+
+
+
+
+
+
+
+
+ xmlns:.*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*:id
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ .*:name
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ name
+
+ ^$
+
+
+
+
+
+
+
+
+ style
+
+ ^$
+
+
+
+
+
+
+
+
+ .*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*
+
+ http://schemas.android.com/apk/res/android
+
+
+ ANDROID_ATTRIBUTE_ORDER
+
+
+
+
+
+
+ .*
+
+ .*
+
+
+ BY_NAME
+
+
+
+
+
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index 0a6ba141a..6ac746a6c 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -7,8 +7,8 @@ android {
applicationId = 'com.wagerrwallet'
minSdkVersion 23
targetSdkVersion 28
- versionCode 253
- versionName "253"
+ versionCode 255
+ versionName "255"
multiDexEnabled true
// Similar to other properties in the defaultConfig block,
@@ -50,7 +50,7 @@ android {
wagerr {
applicationId = "com.wagerrwallet"
dimension "mode"
- resValue "string", "app_name", "Wagerr Bet"
+ resValue "string", "app_name", "Wagerr Pro"
buildConfigField "boolean", "BITCOIN_TESTNET", "false"
externalNativeBuild {
cmake {
diff --git a/app/src/main/java/com/wagerrwallet/presenter/activities/EventsActivity.java b/app/src/main/java/com/wagerrwallet/presenter/activities/EventsActivity.java
index d82777497..97faf2a51 100644
--- a/app/src/main/java/com/wagerrwallet/presenter/activities/EventsActivity.java
+++ b/app/src/main/java/com/wagerrwallet/presenter/activities/EventsActivity.java
@@ -329,7 +329,7 @@ public void updateSports() {
BetMappingEntity bmeS = (BetMappingEntity)mSpinnerSport.getSelectedItem();
// add item 0
- sports.add(0, new BetMappingEntity("",0, BetMappingEntity.MappingNamespaceType.SPORT, -1, "",0,0,"wgr"));
+ sports.add(0, new BetMappingEntity("",0, BetMappingEntity.MappingNamespaceType.SPORT, -1, "Sport",0,0,"wgr"));
currPosition = findItemIndex( bmeS, sports);
ArrayAdapter dataAdapter = getDataAdapter(sports);
@@ -353,11 +353,11 @@ public void updateTournaments() {
sportID = bmeS.getMappingID();
tournaments = bmds.getAllTournaments(this, "wgr", sportID, timeStamp );
// add item 0
- tournaments.add(0, new BetMappingEntity("",0, BetMappingEntity.MappingNamespaceType.TOURNAMENT, -1, "",0,0,"wgr"));
+ tournaments.add(0, new BetMappingEntity("",0, BetMappingEntity.MappingNamespaceType.TOURNAMENT, -1, "League",0,0,"wgr"));
currPosition = findItemIndex( bmeT, tournaments);
}
else {
- tournaments.add(0, new BetMappingEntity("",0, BetMappingEntity.MappingNamespaceType.TOURNAMENT, -1, "",0,0,"wgr"));
+ tournaments.add(0, new BetMappingEntity("",0, BetMappingEntity.MappingNamespaceType.TOURNAMENT, -1, "League",0,0,"wgr"));
}
ArrayAdapter dataAdapter = getDataAdapter(tournaments);
@@ -563,7 +563,7 @@ private void setPriceTags(final boolean cryptoPreferred, boolean animate) {
// Align crypto balance to the right parent
set.connect(R.id.balance_secondary, ConstraintSet.END, ConstraintSet.PARENT_ID, ConstraintSet.END, px8);
- set.connect(R.id.balance_secondary, ConstraintSet.BOTTOM, ConstraintSet.PARENT_ID, ConstraintSet.BOTTOM, -px8);
+ set.connect(R.id.balance_secondary, ConstraintSet.TOP, R.id.currency_usd_price, ConstraintSet.BOTTOM, -px8);
// Align swap icon to left of crypto balance
set.connect(R.id.swap, ConstraintSet.END, R.id.balance_secondary, ConstraintSet.START, px8);
@@ -572,7 +572,7 @@ private void setPriceTags(final boolean cryptoPreferred, boolean animate) {
set.connect(R.id.balance_primary, ConstraintSet.END, R.id.swap, ConstraintSet.START, px8);
mBalancePrimary.setPadding(0, 0, 0, Utils.getPixelsFromDps(this, 6));
- mBalanceSecondary.setPadding(0, 0, 0, Utils.getPixelsFromDps(this, 4));
+ mBalanceSecondary.setPadding(0, Utils.getPixelsFromDps(this, 6), 0, Utils.getPixelsFromDps(this, 4));
mSwap.setPadding(0, 0, 0, Utils.getPixelsFromDps(this, 2));
Log.d(TAG, "CryptoPreferred " + cryptoPreferred);
@@ -598,7 +598,7 @@ private void setPriceTags(final boolean cryptoPreferred, boolean animate) {
set.connect(R.id.balance_secondary, ConstraintSet.END, R.id.swap, ConstraintSet.START, px8);
mBalancePrimary.setPadding(0, 0, 0, Utils.getPixelsFromDps(this, 2));
- mBalanceSecondary.setPadding(0, 0, 0, Utils.getPixelsFromDps(this, 4));
+ mBalanceSecondary.setPadding(0, Utils.getPixelsFromDps(this, 6), 0, Utils.getPixelsFromDps(this, 4));
mSwap.setPadding(0, 0, 0, Utils.getPixelsFromDps(this, 2));
//mBalancePrimary.setPadding(0,0, 0, Utils.getPixelsFromDps(this, -4));
diff --git a/app/src/main/java/com/wagerrwallet/presenter/activities/InputWordsActivity.java b/app/src/main/java/com/wagerrwallet/presenter/activities/InputWordsActivity.java
index 443648398..61299ee6a 100644
--- a/app/src/main/java/com/wagerrwallet/presenter/activities/InputWordsActivity.java
+++ b/app/src/main/java/com/wagerrwallet/presenter/activities/InputWordsActivity.java
@@ -16,6 +16,7 @@
import com.wagerrwallet.presenter.activities.intro.IntroActivity;
import com.wagerrwallet.presenter.activities.util.BRActivity;
import com.wagerrwallet.presenter.customviews.BRDialogView;
+import com.wagerrwallet.presenter.interfaces.BROnSignalCompletion;
import com.wagerrwallet.tools.animation.BRAnimator;
import com.wagerrwallet.tools.animation.BRDialog;
import com.wagerrwallet.tools.animation.SpringAnimator;
@@ -58,6 +59,7 @@ public static InputWordsActivity getApp() {
//will be true if this screen was called from the restore screen
private boolean restore = false;
private boolean resetPin = false;
+ private boolean validateSeed = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -134,6 +136,7 @@ public void onClick(View v) {
restore = getIntent().getExtras() != null && getIntent().getExtras().getBoolean("restore");
resetPin = getIntent().getExtras() != null && getIntent().getExtras().getBoolean("resetPin");
+ validateSeed = getIntent().getExtras() != null && getIntent().getExtras().getBoolean("validateSeed");
if (restore) {
//change the labels
@@ -143,6 +146,10 @@ public void onClick(View v) {
//change the labels
title.setText(getString(R.string.RecoverWallet_header_reset_pin));
description.setText(getString(R.string.RecoverWallet_subheader_reset_pin));
+ } else if (validateSeed) {
+ //change the labels
+ title.setText(getString(R.string.SecurityCenter_paperKeyTitle));
+ description.setText(getString(R.string.ConfirmPaperPhrase_label12));
}
word12.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@@ -173,7 +180,7 @@ public void onClick(View v) {
}
if (SmartValidator.isPaperKeyValid(app, cleanPhrase)) {
- if (restore || resetPin) {
+ if (restore || resetPin || validateSeed) {
if (SmartValidator.isPaperKeyCorrect(cleanPhrase, app)) {
Utils.hideKeyboard(app);
clearWords();
@@ -196,11 +203,21 @@ public void onClick(BRDialogView brDialogView) {
}
}, null, 0);
- } else {
+ } else if (resetPin) {
AuthManager.getInstance().setPinCode("", InputWordsActivity.this);
Intent intent = new Intent(app, SetPinActivity.class);
intent.putExtra("noPin", true);
finalizeIntent(intent);
+ } else if (validateSeed) {
+ BRSharedPrefs.putPhraseWroteDown(InputWordsActivity.this, true);
+ BRAnimator.showBreadSignal(InputWordsActivity.this, getString(R.string.Alerts_paperKeySet), getString(R.string.Alerts_paperKeySetSubheader), R.drawable.ic_check_mark_white, new BROnSignalCompletion() {
+ @Override
+ public void onComplete() {
+ BRAnimator.startBreadActivity(InputWordsActivity.this, false);
+ overridePendingTransition(R.anim.enter_from_right, R.anim.exit_to_left);
+ finishAffinity();
+ }
+ });
}
diff --git a/app/src/main/java/com/wagerrwallet/presenter/activities/LoginActivity.java b/app/src/main/java/com/wagerrwallet/presenter/activities/LoginActivity.java
index e73715ffe..d6292975d 100644
--- a/app/src/main/java/com/wagerrwallet/presenter/activities/LoginActivity.java
+++ b/app/src/main/java/com/wagerrwallet/presenter/activities/LoginActivity.java
@@ -248,7 +248,7 @@ public void checkLatestVersion(final Activity app) {
Log.d("MyApp", "Version Name : "+version + "\n Version Code : "+versionCode);
if (versionCode < tag) {
//BRDialog.showSimpleDialog(app, "New version available", "A new version of Wagerr Bet app is available");
- BRDialog.showCustomDialog(app, "New version available", "A new version of Wagerr Bet app is available", app.getString(R.string.Button_ok), null, new BRDialogView.BROnClickListener() {
+ BRDialog.showCustomDialog(app, "New version available", "A new version of Wagerr Pro app is available", app.getString(R.string.Button_ok), null, new BRDialogView.BROnClickListener() {
@Override
public void onClick(BRDialogView brDialogView) {
brDialogView.dismiss();
diff --git a/app/src/main/java/com/wagerrwallet/presenter/fragments/FragmentEventDetails.java b/app/src/main/java/com/wagerrwallet/presenter/fragments/FragmentEventDetails.java
index 6f8e5d866..85134f8dc 100644
--- a/app/src/main/java/com/wagerrwallet/presenter/fragments/FragmentEventDetails.java
+++ b/app/src/main/java/com/wagerrwallet/presenter/fragments/FragmentEventDetails.java
@@ -724,9 +724,9 @@ public void run() {
});
// Set the transaction block number
- mConfirmedInBlock.setText(String.valueOf(mTransaction.getBlockheight()));
-
-
+ String confirmedBlock = String.valueOf(mTransaction.getBlockheight());
+ if ( confirmedBlock.equals(BRConstants.INT23_MAX)) confirmedBlock = "Unconfirmed";
+ mConfirmedInBlock.setText(confirmedBlock);
/*
mToFrom.setText(sent ? "To " : "Via ");
diff --git a/app/src/main/java/com/wagerrwallet/presenter/fragments/FragmentTxDetails.java b/app/src/main/java/com/wagerrwallet/presenter/fragments/FragmentTxDetails.java
index 920257bc2..8f256687e 100644
--- a/app/src/main/java/com/wagerrwallet/presenter/fragments/FragmentTxDetails.java
+++ b/app/src/main/java/com/wagerrwallet/presenter/fragments/FragmentTxDetails.java
@@ -364,7 +364,9 @@ public void onClick(View v) {
});
// Set the transaction block number
- mConfirmedInBlock.setText(String.valueOf(mTransaction.getBlockHeight()));
+ String confirmedBlock = String.valueOf(mTransaction.getBlockHeight());
+ if ( confirmedBlock.equals(BRConstants.INT23_MAX)) confirmedBlock = "Unconfirmed";
+ mConfirmedInBlock.setText(confirmedBlock);
} else {
Toast.makeText(getContext(), "Error getting transaction data", Toast.LENGTH_SHORT).show();
diff --git a/app/src/main/java/com/wagerrwallet/tools/manager/EventTxManager.java b/app/src/main/java/com/wagerrwallet/tools/manager/EventTxManager.java
index ef903963f..996c60a97 100644
--- a/app/src/main/java/com/wagerrwallet/tools/manager/EventTxManager.java
+++ b/app/src/main/java/com/wagerrwallet/tools/manager/EventTxManager.java
@@ -100,7 +100,9 @@ public void onClick(BRDialogView brDialogView) {
}
}, null, null, 0);
}
- BRAnimator.showEventDetails(app, item, position);
+ else {
+ BRAnimator.showEventDetails(app, item, position);
+ }
}
catch (ArrayIndexOutOfBoundsException e) {
diff --git a/app/src/main/java/com/wagerrwallet/tools/security/PostAuth.java b/app/src/main/java/com/wagerrwallet/tools/security/PostAuth.java
index 2f817cd22..dee2bb01e 100644
--- a/app/src/main/java/com/wagerrwallet/tools/security/PostAuth.java
+++ b/app/src/main/java/com/wagerrwallet/tools/security/PostAuth.java
@@ -11,6 +11,7 @@
import com.wagerrwallet.core.BRCoreKey;
import com.wagerrwallet.core.BRCoreMasterPubKey;
import com.wagerrwallet.core.BRCoreTransaction;
+import com.wagerrwallet.presenter.activities.InputWordsActivity;
import com.wagerrwallet.presenter.activities.SetPinActivity;
import com.wagerrwallet.presenter.activities.PaperKeyActivity;
import com.wagerrwallet.presenter.activities.PaperKeyProveActivity;
@@ -130,8 +131,10 @@ public void onPhraseProveAuth(Activity app, boolean authAsked) {
}
return;
}
- Intent intent = new Intent(app, PaperKeyProveActivity.class);
- intent.putExtra("phrase", cleanPhrase);
+ //Intent intent = new Intent(app, PaperKeyProveActivity.class);
+ //intent.putExtra("phrase", cleanPhrase);
+ Intent intent = new Intent(app, InputWordsActivity.class);
+ intent.putExtra("validateSeed", true);
app.startActivity(intent);
app.overridePendingTransition(R.anim.enter_from_right, R.anim.exit_to_left);
}
diff --git a/app/src/main/java/com/wagerrwallet/tools/util/BRConstants.java b/app/src/main/java/com/wagerrwallet/tools/util/BRConstants.java
index 7713716f4..3950f2eed 100644
--- a/app/src/main/java/com/wagerrwallet/tools/util/BRConstants.java
+++ b/app/src/main/java/com/wagerrwallet/tools/util/BRConstants.java
@@ -90,6 +90,7 @@ public class BRConstants {
public static boolean PLATFORM_ON = true;
public static final RoundingMode ROUNDING_MODE = RoundingMode.HALF_EVEN;
public static final boolean WAL = true;
+ public static final String INT23_MAX = "2147483647";
/**
* Support Center article ids.
diff --git a/app/src/main/java/com/wagerrwallet/wallet/wallets/wagerr/WalletWagerrManager.java b/app/src/main/java/com/wagerrwallet/wallet/wallets/wagerr/WalletWagerrManager.java
index 1d11c8e19..1a257ad9f 100644
--- a/app/src/main/java/com/wagerrwallet/wallet/wallets/wagerr/WalletWagerrManager.java
+++ b/app/src/main/java/com/wagerrwallet/wallet/wallets/wagerr/WalletWagerrManager.java
@@ -303,6 +303,7 @@ protected void CleanChainBugs(Context app) {
BetMappingTxDataStore.getInstance(app).deleteTxByHash(app,"wgr", "cc89779e8e57d49e5e6d3e16ad57e648b19d86fb8f4714bc7df5abd3f92daa1d");
BetMappingTxDataStore.getInstance(app).deleteTxByHash(app,"wgr", "d8e1e8389bbcffe1c79cf11e2206281377e54b99219ec6ccec296c2adb8ad65f");
BetMappingTxDataStore.getInstance(app).deleteTxByHash(app,"wgr", "929972a7b2fdf55f6da7488ccaf7312fd5d22c4bca003ca089293c93f1c32917");
+ BetMappingTxDataStore.getInstance(app).deleteTxByHash(app,"wgr", "e4e3a4f782569fa3bf0135297942c8a1c791ec869ca036bf530ab95633d17815");
}
@Override
diff --git a/app/src/main/jni/breadwallet-core b/app/src/main/jni/breadwallet-core
index 70dd580d6..141bdf02b 160000
--- a/app/src/main/jni/breadwallet-core
+++ b/app/src/main/jni/breadwallet-core
@@ -1 +1 @@
-Subproject commit 70dd580d6599e646ca55566a96b070a62ccbed36
+Subproject commit 141bdf02bc4ba16500c97160edf7f49f7bc52be2
diff --git a/app/src/main/res/layout/activity_betsettings.xml b/app/src/main/res/layout/activity_betsettings.xml
index d4d5e13c8..070842fff 100644
--- a/app/src/main/res/layout/activity_betsettings.xml
+++ b/app/src/main/res/layout/activity_betsettings.xml
@@ -36,7 +36,7 @@
android:layout_marginStart="@dimen/bread_margin"
android:layout_marginTop="32dp"
android:lineSpacingMultiplier="1.3"
- android:text="Wagerr Bet Display Settings"
+ android:text="Wagerr Pro Display Settings"
android:textColor="@color/almost_black"
android:textSize="@dimen/header"
app:customTFont="CircularPro-Bold.otf"
diff --git a/app/src/main/res/layout/activity_events.xml b/app/src/main/res/layout/activity_events.xml
index 0d5441706..14b03ca6f 100644
--- a/app/src/main/res/layout/activity_events.xml
+++ b/app/src/main/res/layout/activity_events.xml
@@ -93,15 +93,15 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp"
- android:layout_marginBottom="54dp"
+ android:layout_marginTop="14dp"
android:text="@string/CurrencyBalance"
android:textColor="@color/trans_white"
android:textSize="14sp"
android:visibility="visible"
app:customTFont="CircularPro-Book.otf"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintRight_toRightOf="parent" />
+ app:layout_constraintTop_toBottomOf="@+id/currency_usd_price"
+ app:layout_constraintStart_toStartOf="@id/back_icon"
+ />
@@ -158,9 +158,9 @@
android:layout_height="14dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
- android:layout_marginBottom="23dp"
+ android:layout_marginTop="20dp"
android:background="@drawable/ic_swap_horizontal"
- app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/currency_usd_price"
app:layout_constraintRight_toLeftOf="@id/balance_primary"
app:layout_constraintVertical_bias="0.492" />
@@ -170,13 +170,14 @@
android:layout_height="wrap_content"
android:layout_marginStart="28dp"
android:layout_marginEnd="8dp"
- android:paddingTop="18dp"
- android:paddingBottom="20dp"
+ android:layout_marginTop="10dp"
+ android:paddingTop="1dp"
+ android:paddingBottom="0dp"
android:text="1.56739 BTC"
android:textColor="@color/trans_white"
android:textSize="16sp"
app:customTFont="CircularPro-Book.otf"
- app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/currency_usd_price"
app:layout_constraintEnd_toStartOf="@id/swap"
app:layout_constraintRight_toLeftOf="@id/swap"
app:layout_constraintVertical_bias="0.492" />
@@ -205,31 +206,43 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
-
-
-
+
+
+
+
+
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 1410ae2a0..bd5374aee 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -134,6 +134,8 @@
Total Cost:
To make sure everything was written down correctly, please enter the following words from your paper key.
+
+ To make sure everything was written down correctly, please enter again the 12 words from your paper key.
Word #%1$s