Skip to content

Commit

Permalink
fix crash if auth failed (#684)
Browse files Browse the repository at this point in the history
  • Loading branch information
m2049r authored Sep 23, 2020
1 parent 97fb0a5 commit 8bda7aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,15 @@

package com.m2049r.xmrwallet.fragment.send;

import android.app.Activity;
import android.content.DialogInterface;
import android.os.Bundle;
import android.os.Handler;
import android.support.design.widget.TextInputLayout;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.view.inputmethod.EditorInfo;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

import com.m2049r.xmrwallet.BuildConfig;
import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.data.TxData;
import com.m2049r.xmrwallet.data.TxDataBtc;
Expand Down Expand Up @@ -353,7 +344,9 @@ public void act(String walletName, String password, boolean fingerprintUsed) {
}

public void fail(String walletName, String password, boolean fingerprintUsed) {
bSend.setEnabled(sendCountdown > 0); // allow to try again
getActivity().runOnUiThread(() -> {
bSend.setEnabled(sendCountdown > 0); // allow to try again
});
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,19 @@

package com.m2049r.xmrwallet.fragment.send;

import android.app.Activity;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.design.widget.TextInputLayout;
import android.support.v7.app.AlertDialog;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.view.inputmethod.EditorInfo;
import android.widget.Button;
import android.widget.TextView;

import com.m2049r.xmrwallet.BuildConfig;
import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.data.TxData;
import com.m2049r.xmrwallet.data.UserNotes;
import com.m2049r.xmrwallet.model.PendingTransaction;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.util.Helper;
import com.m2049r.xmrwallet.data.UserNotes;

import timber.log.Timber;

Expand Down Expand Up @@ -237,7 +227,9 @@ public void act(String walletName, String password, boolean fingerprintUsed) {
}

public void fail(String walletName, String password, boolean fingerprintUsed) {
bSend.setEnabled(true); // allow to try again
getActivity().runOnUiThread(() -> {
bSend.setEnabled(true); // allow to try again
});
}
});
}
Expand Down

0 comments on commit 8bda7aa

Please sign in to comment.