Browse Source

disable omni-usdt

V1.1.0-btc-release
ZhangJun 5 years ago
parent
commit
c76a06df23
  1. 6
      app/src/main/java/com/cobo/cold/ui/fragment/main/QRCodeScanFragment.java
  2. 3
      app/src/main/java/com/cobo/cold/viewmodel/QrScanViewModel.java
  3. 1
      app/src/main/res/values-zh-rCN/strings.xml
  4. 1
      app/src/main/res/values/strings.xml

6
app/src/main/java/com/cobo/cold/ui/fragment/main/QRCodeScanFragment.java

@ -235,11 +235,7 @@ public class QRCodeScanFragment extends BaseFragment<QrcodeScanFragmentBinding>
alert(getString(R.string.incorrect_qrcode)); alert(getString(R.string.incorrect_qrcode));
} catch (CoinNotFindException e) { } catch (CoinNotFindException e) {
e.printStackTrace(); e.printStackTrace();
alert(null,getString(R.string.version_not_match), () -> { alert(null, getString(R.string.only_support_btc), null);
navigateUp();
((MainActivity) mActivity).getNavController().navigateUp();
((MainActivity) mActivity).getNavController().navigate(R.id.action_to_settingFragment);
});
} catch (UuidNotMatchException e) { } catch (UuidNotMatchException e) {
e.printStackTrace(); e.printStackTrace();
alert(getString(R.string.uuid_not_match)); alert(getString(R.string.uuid_not_match));

3
app/src/main/java/com/cobo/cold/viewmodel/QrScanViewModel.java

@ -203,7 +203,8 @@ public class QrScanViewModel extends AndroidViewModel {
String coinCode = object.getJSONObject("signTx") String coinCode = object.getJSONObject("signTx")
.getString("coinCode"); .getString("coinCode");
if (!Coins.isCoinSupported(coinCode)) { if (!Coins.isCoinSupported(coinCode)
|| object.getJSONObject("signTx").has("omniTx")) {
throw new CoinNotFindException("not support " + coinCode); throw new CoinNotFindException("not support " + coinCode);
} }
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();

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

@ -310,4 +310,5 @@
<string name="from_electrum">来自Electrum</string> <string name="from_electrum">来自Electrum</string>
<string name="update_failed">升级失败</string> <string name="update_failed">升级失败</string>
<string name="contact_cobo_service">您可邮件联系客服:support@cobo.com\n 状态码:%s</string> <string name="contact_cobo_service">您可邮件联系客服:support@cobo.com\n 状态码:%s</string>
<string name="only_support_btc">仅支持扫描 BTC</string>
</resources> </resources>

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

@ -334,4 +334,5 @@
<string name="from_electrum">From Electrum</string> <string name="from_electrum">From Electrum</string>
<string name="update_failed">Update failed</string> <string name="update_failed">Update failed</string>
<string name="contact_cobo_service">contact us: support@cobo.com\n Status Code:%s</string> <string name="contact_cobo_service">contact us: support@cobo.com\n Status Code:%s</string>
<string name="only_support_btc">Please scan only BTC</string>
</resources> </resources>

Loading…
Cancel
Save