diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index 844c25b12..a9d6827e1 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 eb571000e..3be3e1346 100644 Binary files a/.idea/caches/gradle_models.ser and b/.idea/caches/gradle_models.ser differ diff --git a/app/build.gradle b/app/build.gradle index 749e17b2e..373bf6b32 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId = 'com.wagerrwallet' minSdkVersion 23 targetSdkVersion 28 - versionCode 237 - versionName "237" + versionCode 239 + versionName "239" multiDexEnabled true // Similar to other properties in the defaultConfig block, 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 6acc7d8ff..52378b85e 100644 --- a/app/src/main/java/com/wagerrwallet/presenter/activities/EventsActivity.java +++ b/app/src/main/java/com/wagerrwallet/presenter/activities/EventsActivity.java @@ -271,15 +271,13 @@ public void onClick(View v) { boolean cryptoPreferred = BRSharedPrefs.isCryptoPreferred(this); if (cryptoPreferred) { - swap(); + setPriceTags(cryptoPreferred, false); + //swap(); // buggy when restoring activity } // Check if the "Twilight" screen altering app is currently running if (checkIfScreenAlteringAppIsRunning("com.urbandroid.lux")) { - BRDialog.showSimpleDialog(this, getString(R.string.Dialog_screenAlteringTitle), getString(R.string.Dialog_screenAlteringMessage)); - - } } 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 e213c2ffc..e73715ffe 100644 --- a/app/src/main/java/com/wagerrwallet/presenter/activities/LoginActivity.java +++ b/app/src/main/java/com/wagerrwallet/presenter/activities/LoginActivity.java @@ -8,6 +8,7 @@ import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.graphics.drawable.GradientDrawable; +import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.support.annotation.NonNull; @@ -239,14 +240,23 @@ public void checkLatestVersion(final Activity app) { JSONObject jsonObject = new JSONObject(jsonString); String sTag = jsonObject.getString("tag_name"); - int tag = Integer.parseInt((sTag!=null)?sTag:""); + final int tag = Integer.parseInt((sTag!=null)?sTag:""); PackageInfo pInfo = app.getPackageManager().getPackageInfo(app.getPackageName(), 0); String version = pInfo.versionName; int versionCode = pInfo.versionCode; 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.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() { + @Override + public void onClick(BRDialogView brDialogView) { + brDialogView.dismiss(); + Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("https://github.com/wagerr/WagerrWalletAndroid/releases/tag/%d", tag))); + app.startActivity(browserIntent); + app.overridePendingTransition(R.anim.enter_from_bottom, R.anim.empty_300); + } + }, null, null, 0); } } catch(PackageManager.NameNotFoundException e) { e.printStackTrace(); 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 788211c42..3cd588014 100644 --- a/app/src/main/java/com/wagerrwallet/presenter/fragments/FragmentEventDetails.java +++ b/app/src/main/java/com/wagerrwallet/presenter/fragments/FragmentEventDetails.java @@ -3,6 +3,8 @@ import android.app.Dialog; import android.app.DialogFragment; import android.content.Context; +import android.content.Intent; +import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.support.annotation.Nullable; @@ -70,6 +72,7 @@ public class FragmentEventDetails extends DialogFragment implements View.OnClick private BRText mTxEventHeader; private BRText mTxEventDate; + private BRText mTxEventId; private BRText mTxHomeTeam; private BRText mTxAwayTeam; //private BRText mTxHomeResult; @@ -171,6 +174,16 @@ public void onClick(View v) { mMainLayout = rootView.findViewById(R.id.dynamic_container); mTxEventHeader = rootView.findViewById(R.id.tx_eventheader); mTxEventDate= rootView.findViewById(R.id.tx_eventdate); + mTxEventId= rootView.findViewById(R.id.tx_eventid); + final long evID = mTransaction.getEventID(); + mTxEventId.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("https://explorer.wagerr.com/#/bet/event/%d", evID))); + startActivity(browserIntent); + getActivity().overridePendingTransition(R.anim.enter_from_bottom, R.anim.empty_300); + } + }); mTxHomeTeam = rootView.findViewById(R.id.tx_home); mTxAwayTeam= rootView.findViewById(R.id.tx_away); //mTxHomeResult = rootView.findViewById(R.id.tx_home_result); @@ -636,6 +649,7 @@ public void updateUi() { mTxEventHeader.setText(item.getTxEventHeader()); mTxEventDate.setText( item.getTxEventDate() ); + mTxEventId.setText( String.format("Event #%d",item.getEventID()) ); // timestamp is 0 if it's not confirmed in a block yet so make it now mTxDate.setText(BRDateUtil.getEventDate(mTransaction.getTimestamp() == 0 ? System.currentTimeMillis() : (mTransaction.getTimestamp() * 1000))); diff --git a/app/src/main/java/com/wagerrwallet/tools/adapter/TransactionListAdapter.java b/app/src/main/java/com/wagerrwallet/tools/adapter/TransactionListAdapter.java index 660845d7b..109deaca7 100644 --- a/app/src/main/java/com/wagerrwallet/tools/adapter/TransactionListAdapter.java +++ b/app/src/main/java/com/wagerrwallet/tools/adapter/TransactionListAdapter.java @@ -4,6 +4,7 @@ import android.content.Context; import android.support.constraint.ConstraintLayout; import android.support.v7.widget.RecyclerView; +import android.text.Html; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -254,7 +255,7 @@ else if (confirms == 3) if (item.getBetEntity()==null) { if (item.isCoinbase() && item.getBlockHeight() != Integer.MAX_VALUE) { // then payout reward boolean immature = (nCurrentHeight - item.getBlockHeight()) <= PAYOUT_MATURITY; - String strMatureInfo = String.format("%d/%d", (nCurrentHeight - item.getBlockHeight()), PAYOUT_MATURITY); + String strMatureInfo = String.format("%d/%d", (nCurrentHeight - item.getBlockHeight()), PAYOUT_MATURITY); int amountColor = (!immature) ? R.color.transaction_amount_payout_color : R.color.transaction_amount_inmature_color; convertView.transactionAmount.setTextColor(mContext.getResources().getColor(amountColor, null)); BetResultTxDataStore brds = BetResultTxDataStore.getInstance(mContext); @@ -273,7 +274,7 @@ else if (confirms == 3) txDate = "PAYOUT"; } isNormalTx = false; - if (immature) txDate += " " + strMatureInfo; + if (immature) txDate += " " + strMatureInfo; } else { if (level > 4) { @@ -296,7 +297,7 @@ else if (confirms == 3) } convertView.transactionDetail.setText(txDescription); - convertView.transactionDate.setText(shortDate + " " + txDate); + convertView.transactionDate.setText(Html.fromHtml(shortDate + " " + txDate)); } private void showTransactionProgress(TxHolder holder, int progress) { diff --git a/app/src/main/res/layout/event_details.xml b/app/src/main/res/layout/event_details.xml index b203f3773..c90b4e814 100644 --- a/app/src/main/res/layout/event_details.xml +++ b/app/src/main/res/layout/event_details.xml @@ -59,6 +59,19 @@ android:textSize="18sp" app:customTFont="CircularPro-Book.otf" /> + + Turn device passcode on - A device screen lock is needed to safeguard your wallet. Go to \"Settings\" > \"Security\" > \"Screen lock\" and enable to continue. + A device screen lock is mandatory to use the Wagerr wallet. Please enable the screen lock in your device settings and reinstall the application to enable wallet encryption We can\'t proceed because your screen lock settings have been changed (e.g. password was disabled, fingerprints were changed). For security purposes, Android has permanently locked your key store. Therefore, your Wagerr app data must be wiped by uninstalling. Don’t worry, your funds are still secure! Reinstall the app and recover your wallet using your paper key.