Skip to content

Commit

Permalink
Merge pull request #194 from xidaokun/dev_v1.3
Browse files Browse the repository at this point in the history
Dev v1.3
  • Loading branch information
li.fayi authored Apr 26, 2019
2 parents 2555bf9 + 99a8a96 commit dd76ae5
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 111 deletions.
31 changes: 0 additions & 31 deletions app/src/main/java/com/breadwallet/BreadApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,14 @@
import android.arch.lifecycle.ProcessLifecycleOwner;
import android.content.Context;
import android.content.IntentFilter;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.graphics.Point;
import android.hardware.fingerprint.FingerprintManager;
import android.net.ConnectivityManager;
import android.os.Build;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.util.Log;
import android.view.Display;
import android.view.WindowManager;

import com.breadwallet.cache.UpgradeHandler;
import com.breadwallet.presenter.activities.util.ApplicationLifecycleObserver;
import com.breadwallet.presenter.activities.util.BRActivity;
import com.breadwallet.tools.crypto.Base32;
Expand All @@ -30,15 +25,11 @@
import com.breadwallet.tools.manager.InternetManager;
import com.breadwallet.tools.util.BRConstants;
import com.breadwallet.tools.util.Utils;
import com.breadwallet.wallet.wallets.ela.ElaDataSource;
import com.crashlytics.android.Crashlytics;
import com.platform.APIClient;
import com.tencent.bugly.Bugly;
import com.tencent.bugly.beta.Beta;
import com.tencent.bugly.crashreport.CrashReport;

import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
Expand All @@ -50,8 +41,6 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import io.fabric.sdk.android.Fabric;

/**
* BreadWallet
* <p/>
Expand Down Expand Up @@ -156,26 +145,6 @@ public void onCreate() {

Beta.upgradeDialogLayoutId = R.layout.upgrade_layout;
Bugly.init(getApplicationContext(), BuildConfig.UPGRADE_TESTNET? "8b437eefc0":"8a9b0190e0", false);
upgradeAction();
}


private void upgradeAction(){
PackageInfo packageInfo = null;
try {
packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
int newVersion = packageInfo != null ? packageInfo.versionCode : 0;
int oldVerson = BRSharedPrefs.getVersionCode(this, "version");
if(oldVerson != newVersion){
BRSharedPrefs.putCachedBalance(this, "ELA", new BigDecimal(0));
UpgradeHandler.getInstance(this).deleteAllTransactions();
// UpgradeHandler.getInstance(this).deleteAllKVs();
BRSharedPrefs.putVersionCode(this, "version", newVersion);
}

}

public static void generateWalletIfIfNeeded(Context app, String address) {
Expand Down
78 changes: 0 additions & 78 deletions app/src/main/java/com/breadwallet/cache/UpgradeHandler.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ public void onCreate(SQLiteDatabase database) {
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

db.execSQL("DROP TABLE IF EXISTS " + ELA_TX_TABLE_NAME);
if (/*oldVersion < 13 && (newVersion >= 13)*/ newVersion==16) {
boolean migrationNeeded = !tableExists(MB_TABLE_NAME, db);
onCreate(db); //create new db tables
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@
<string name="redpackage_title">红包</string>
<string name="vote_title">投票</string>
<string name="vote_nodes_count">你正在向%1$d个节点投票(最多36个)</string>
<string name="vote_hint">投票只需要很少的手续费:0.0001</string>
<string name="vote_hint">投票只需要很少的手续费:0.0000486 ELA</string>
<string name="vote_hint2">投票结束后,您可以随时使用ELA,但您的投票将被取消。</string>
<string name="pin_author_vote">授权投票</string>
<string name="vote_cancel_btn_txt">取消</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@
<string name="vote_nodes_count">You are going to vote %1$d nodes(36 max)</string>
<string name="vote_balance">%1$s ELA</string>
<string name="vote_wallet_balance_title">Wallet Balance:</string>
<string name="vote_hint">You only need to pay a little transaction fee: 0.0001 ELA</string>
<string name="vote_hint">You only need to pay a little transaction fee: 0.0000486 ELA</string>
<string name="vote_hint2">You can spend your ELA anytime after vote while your votes will be revoked.</string>
<string name="pin_author_vote">Authorize Vote</string>
<string name="vote_cancel_btn_txt">Cancel</string>
Expand Down

0 comments on commit dd76ae5

Please sign in to comment.