Browse Source

choose cobo by default (#37)

V1.2.0-btc-release
JunZhang 5 years ago
committed by GitHub
parent
commit
9d5afbc78b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      app/src/main/java/com/cobo/cold/selfcheck/SecurityCheck.java
  2. 2
      app/src/main/java/com/cobo/cold/ui/fragment/setting/ChooseWatchWalletFragment.java
  3. 4
      app/src/main/java/com/cobo/cold/viewmodel/WatchWallet.java
  4. 1
      app/src/main/res/values-zh-rCN/strings.xml
  5. 1
      app/src/main/res/values/strings.xml
  6. 2
      app/src/main/res/xml/main_preference.xml

9
app/src/main/java/com/cobo/cold/selfcheck/SecurityCheck.java

@ -106,7 +106,10 @@ public class SecurityCheck {
Log.i(TAG, "check firmware status");
try {
final Callable<Packet> callable = new BlockingCallable(
new Packet.Builder(CONSTANTS.METHODS.GET_FIRMWARE_STATUS).setRetryTimes(2).build());
new Packet.Builder(CONSTANTS.METHODS.GET_FIRMWARE_STATUS)
.setRetryTimes(5)
.setTimeout(5)
.build());
final Packet result = callable.call();
final Payload payload = result.getPayload(CONSTANTS.TAGS.FIRMWARE_STATUS);
@ -143,7 +146,9 @@ public class SecurityCheck {
Log.i(TAG, "check firmware status");
try {
final Callable<Packet> callable = new BlockingCallable(
new Packet.Builder(CONSTANTS.METHODS.GET_FIRMWARE_STATUS).setRetryTimes(2).build());
new Packet.Builder(CONSTANTS.METHODS.GET_FIRMWARE_STATUS)
.setTimeout(5)
.setRetryTimes(5).build());
final Packet result = callable.call();
final Payload payload = result.getPayload(CONSTANTS.TAGS.FIRMWARE_STATUS);

2
app/src/main/java/com/cobo/cold/ui/fragment/setting/ChooseWatchWalletFragment.java

@ -100,7 +100,7 @@ public class ChooseWatchWalletFragment extends ListPreferenceFragment {
@Override
protected String defaultValue() {
return WatchWallet.ELECTRUM.getWalletId();
return WatchWallet.COBO.getWalletId();
}
@Override

4
app/src/main/java/com/cobo/cold/viewmodel/WatchWallet.java

@ -47,8 +47,8 @@ public enum WatchWallet {
public static WatchWallet getWatchWallet(Context context) {
String wallet = Utilities.getPrefs(context)
.getString(SETTING_CHOOSE_WATCH_WALLET, ELECTRUM.getWalletId());
WatchWallet selectWatchWallet = ELECTRUM;
.getString(SETTING_CHOOSE_WATCH_WALLET, COBO.getWalletId());
WatchWallet selectWatchWallet = COBO;
for (WatchWallet watchWallet: WatchWallet.values()) {
if (watchWallet.getWalletId().equals(wallet)) {
selectWatchWallet = watchWallet;

1
app/src/main/res/values-zh-rCN/strings.xml

@ -379,6 +379,7 @@
<string name="txid">交易ID</string>
<string name="skip_export">已导出 / 暂不导出</string>
<string name="choose_watch_only_wallet">选择观察钱包</string>
<string name="watch_only_wallet">观察钱包</string>
<string name="switch_watch_only_wallet_guide">切换观察钱包可前往【菜单--设置--选择观察钱包】</string>
<string name="wallet_info">钱包信息</string>
<string name="wallet">钱包:</string>

1
app/src/main/res/values/strings.xml

@ -439,6 +439,7 @@
<string name="txid">TxID</string>
<string name="skip_export">Exported / Export Later</string>
<string name="choose_watch_only_wallet">Select a watch-only wallet</string>
<string name="watch_only_wallet">Watch-only Wallet</string>
<string name="switch_watch_only_wallet_guide">Go to Menu > Settings > Select Watch-Only Wallet</string>
<string name="wallet_info">Wallet Info</string>
<string name="wallet">Key Fingerprint:</string>

2
app/src/main/res/xml/main_preference.xml

@ -20,7 +20,7 @@
<com.cobo.cold.ui.preference.SimplePreference
android:key="setting_choose_watch_only_wallet"
android:title="@string/choose_watch_only_wallet" />
android:title="@string/watch_only_wallet" />
<com.cobo.cold.ui.preference.SimplePreference
android:key="setting_change_pwd"
android:title="@string/change_password" />

Loading…
Cancel
Save