fix change address type crash
@@ -479,7 +479,6 @@ public class OptionHotFragment extends Fragment implements Selectable,
private OnClickListener changeAddressTypeClick = new OnClickListener() {
@Override
public void onClick(View v) {
-
if (AppSharedPreference.getInstance().isSegwitAddressType()) {
changeAddressType(false);
return;
@@ -488,10 +487,15 @@ public class OptionHotFragment extends Fragment implements Selectable,
if (addressManager.hasHDAccountHot()) {
if (addressManager.hasHDAccountMonitored() && AbstractDb.hdAccountProvider.getSegwitExternalPub(addressManager.getHDAccountMonitored().getHdSeedId()) == null) {
DialogConfirmTask tip = new DialogConfirmTask(getActivity(), getString(R.string.address_type_switch_hd_account_cold_no_segwit_pub_tips), new Runnable() {
+ @Override
+ public void run() {
+ ThreadUtil.runOnMainThread(new Runnable() {
@Override
public void run() {
changeAddressType(false);
}
+ });
+ }
}, false);
tip.setCancelable(false);
tip.show();
