mirror of
https://github.com/m2049r/xmrwallet
synced 2025-09-08 04:10:49 +02:00
Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5e6d3f3032 | ||
![]() |
65991ff554 | ||
![]() |
b0629e46e8 | ||
![]() |
45ec3198a0 | ||
![]() |
9b66c466f2 | ||
![]() |
d257e183ad | ||
![]() |
10d8e441fe | ||
![]() |
9f9bc4793d | ||
![]() |
8b28e3ea1e | ||
![]() |
e394394538 | ||
![]() |
7424ef07f7 | ||
![]() |
f5ce6ec824 | ||
![]() |
4215a8bf9e |
@@ -7,8 +7,8 @@ android {
|
|||||||
applicationId "com.m2049r.xmrwallet"
|
applicationId "com.m2049r.xmrwallet"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 27
|
targetSdkVersion 27
|
||||||
versionCode 114
|
versionCode 123
|
||||||
versionName "1.6.4 'Nano S'"
|
versionName "1.7.3 'OpenAlias'"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
@@ -82,6 +82,10 @@ dependencies {
|
|||||||
|
|
||||||
implementation 'com.nulab-inc:zxcvbn:1.2.3'
|
implementation 'com.nulab-inc:zxcvbn:1.2.3'
|
||||||
|
|
||||||
|
implementation 'dnsjava:dnsjava:2.1.8'
|
||||||
|
implementation 'org.jitsi:dnssecjava:1.1.3'
|
||||||
|
implementation 'org.slf4j:slf4j-nop:1.7.25'
|
||||||
|
|
||||||
testImplementation "junit:junit:$rootProject.ext.junitVersion"
|
testImplementation "junit:junit:$rootProject.ext.junitVersion"
|
||||||
testImplementation "org.mockito:mockito-all:$rootProject.ext.mockitoVersion"
|
testImplementation "org.mockito:mockito-all:$rootProject.ext.mockitoVersion"
|
||||||
testImplementation "com.squareup.okhttp3:mockwebserver:$rootProject.ext.okHttpVersion"
|
testImplementation "com.squareup.okhttp3:mockwebserver:$rootProject.ext.okHttpVersion"
|
||||||
|
826
app/src/main/assets/licenses.html
Normal file
826
app/src/main/assets/licenses.html
Normal file
File diff suppressed because it is too large
Load Diff
@@ -417,8 +417,8 @@ Java_com_m2049r_xmrwallet_model_WalletManager_verifyWalletPassword(JNIEnv *env,
|
|||||||
//virtual int queryWalletHardware(const std::string &keys_file_name, const std::string &password) const = 0;
|
//virtual int queryWalletHardware(const std::string &keys_file_name, const std::string &password) const = 0;
|
||||||
JNIEXPORT jint JNICALL
|
JNIEXPORT jint JNICALL
|
||||||
Java_com_m2049r_xmrwallet_model_WalletManager_queryWalletHardware(JNIEnv *env, jobject instance,
|
Java_com_m2049r_xmrwallet_model_WalletManager_queryWalletHardware(JNIEnv *env, jobject instance,
|
||||||
jstring keys_file_name,
|
jstring keys_file_name,
|
||||||
jstring password) {
|
jstring password) {
|
||||||
const char *_keys_file_name = env->GetStringUTFChars(keys_file_name, NULL);
|
const char *_keys_file_name = env->GetStringUTFChars(keys_file_name, NULL);
|
||||||
const char *_password = env->GetStringUTFChars(password, NULL);
|
const char *_password = env->GetStringUTFChars(password, NULL);
|
||||||
int hardwareId =
|
int hardwareId =
|
||||||
@@ -686,7 +686,13 @@ Java_com_m2049r_xmrwallet_model_Wallet_initJ(JNIEnv *env, jobject instance,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual bool createWatchOnly(const std::string &path, const std::string &password, const std::string &language) const = 0;
|
// virtual bool createWatchOnly(const std::string &path, const std::string &password, const std::string &language) const = 0;
|
||||||
// virtual void setRefreshFromBlockHeight(uint64_t refresh_from_block_height) = 0;
|
|
||||||
|
JNIEXPORT void JNICALL
|
||||||
|
Java_com_m2049r_xmrwallet_model_Wallet_setRestoreHeight(JNIEnv *env, jobject instance,
|
||||||
|
jlong height) {
|
||||||
|
Bitmonero::Wallet *wallet = getHandle<Bitmonero::Wallet>(env, instance);
|
||||||
|
wallet->setRefreshFromBlockHeight((uint64_t) height);
|
||||||
|
}
|
||||||
|
|
||||||
JNIEXPORT jlong JNICALL
|
JNIEXPORT jlong JNICALL
|
||||||
Java_com_m2049r_xmrwallet_model_Wallet_getRestoreHeight(JNIEnv *env, jobject instance) {
|
Java_com_m2049r_xmrwallet_model_Wallet_getRestoreHeight(JNIEnv *env, jobject instance) {
|
||||||
|
@@ -145,7 +145,8 @@ public class GenerateFragment extends Fragment {
|
|||||||
|
|
||||||
etWalletName.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
etWalletName.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_NEXT)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_NEXT)) {
|
||||||
if (checkName()) {
|
if (checkName()) {
|
||||||
etWalletPassword.requestFocus();
|
etWalletPassword.requestFocus();
|
||||||
} // otherwise ignore
|
} // otherwise ignore
|
||||||
@@ -183,7 +184,8 @@ public class GenerateFragment extends Fragment {
|
|||||||
etWalletPassword.getEditText().setImeOptions(EditorInfo.IME_ACTION_DONE);
|
etWalletPassword.getEditText().setImeOptions(EditorInfo.IME_ACTION_DONE);
|
||||||
etWalletPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
etWalletPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_DONE)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_DONE)) {
|
||||||
Helper.hideKeyboard(getActivity());
|
Helper.hideKeyboard(getActivity());
|
||||||
generateWallet();
|
generateWallet();
|
||||||
return true;
|
return true;
|
||||||
@@ -195,7 +197,8 @@ public class GenerateFragment extends Fragment {
|
|||||||
etWalletPassword.getEditText().setImeOptions(EditorInfo.IME_ACTION_DONE);
|
etWalletPassword.getEditText().setImeOptions(EditorInfo.IME_ACTION_DONE);
|
||||||
etWalletPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
etWalletPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_DONE)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_DONE)) {
|
||||||
etWalletRestoreHeight.requestFocus();
|
etWalletRestoreHeight.requestFocus();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -205,7 +208,8 @@ public class GenerateFragment extends Fragment {
|
|||||||
} else if (type.equals(TYPE_SEED)) {
|
} else if (type.equals(TYPE_SEED)) {
|
||||||
etWalletPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
etWalletPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_NEXT)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_NEXT)) {
|
||||||
etWalletMnemonic.requestFocus();
|
etWalletMnemonic.requestFocus();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -215,7 +219,8 @@ public class GenerateFragment extends Fragment {
|
|||||||
etWalletMnemonic.setVisibility(View.VISIBLE);
|
etWalletMnemonic.setVisibility(View.VISIBLE);
|
||||||
etWalletMnemonic.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
etWalletMnemonic.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_NEXT)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_NEXT)) {
|
||||||
if (checkMnemonic()) {
|
if (checkMnemonic()) {
|
||||||
etWalletRestoreHeight.requestFocus();
|
etWalletRestoreHeight.requestFocus();
|
||||||
}
|
}
|
||||||
@@ -227,7 +232,8 @@ public class GenerateFragment extends Fragment {
|
|||||||
} else if (type.equals(TYPE_KEY) || type.equals(TYPE_VIEWONLY)) {
|
} else if (type.equals(TYPE_KEY) || type.equals(TYPE_VIEWONLY)) {
|
||||||
etWalletPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
etWalletPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_NEXT)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_NEXT)) {
|
||||||
etWalletAddress.requestFocus();
|
etWalletAddress.requestFocus();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -239,7 +245,8 @@ public class GenerateFragment extends Fragment {
|
|||||||
|
|
||||||
{
|
{
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_NEXT)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_NEXT)) {
|
||||||
if (checkAddress()) {
|
if (checkAddress()) {
|
||||||
etWalletViewKey.requestFocus();
|
etWalletViewKey.requestFocus();
|
||||||
}
|
}
|
||||||
@@ -251,7 +258,8 @@ public class GenerateFragment extends Fragment {
|
|||||||
etWalletViewKey.setVisibility(View.VISIBLE);
|
etWalletViewKey.setVisibility(View.VISIBLE);
|
||||||
etWalletViewKey.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
etWalletViewKey.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_NEXT)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_NEXT)) {
|
||||||
if (checkViewKey()) {
|
if (checkViewKey()) {
|
||||||
if (type.equals(TYPE_KEY)) {
|
if (type.equals(TYPE_KEY)) {
|
||||||
etWalletSpendKey.requestFocus();
|
etWalletSpendKey.requestFocus();
|
||||||
@@ -271,7 +279,8 @@ public class GenerateFragment extends Fragment {
|
|||||||
|
|
||||||
{
|
{
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_NEXT)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_NEXT)) {
|
||||||
if (checkSpendKey()) {
|
if (checkSpendKey()) {
|
||||||
etWalletRestoreHeight.requestFocus();
|
etWalletRestoreHeight.requestFocus();
|
||||||
}
|
}
|
||||||
@@ -285,7 +294,8 @@ public class GenerateFragment extends Fragment {
|
|||||||
etWalletRestoreHeight.setVisibility(View.VISIBLE);
|
etWalletRestoreHeight.setVisibility(View.VISIBLE);
|
||||||
etWalletRestoreHeight.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
etWalletRestoreHeight.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_DONE)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_DONE)) {
|
||||||
Helper.hideKeyboard(getActivity());
|
Helper.hideKeyboard(getActivity());
|
||||||
generateWallet();
|
generateWallet();
|
||||||
return true;
|
return true;
|
||||||
|
@@ -594,7 +594,8 @@ public class GenerateReviewFragment extends Fragment {
|
|||||||
// accept keyboard "ok"
|
// accept keyboard "ok"
|
||||||
etPasswordB.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
etPasswordB.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_DONE)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_DONE)) {
|
||||||
String newPasswordA = etPasswordA.getEditText().getText().toString();
|
String newPasswordA = etPasswordA.getEditText().getText().toString();
|
||||||
String newPasswordB = etPasswordB.getEditText().getText().toString();
|
String newPasswordB = etPasswordB.getEditText().getText().toString();
|
||||||
// disallow empty passwords
|
// disallow empty passwords
|
||||||
|
@@ -326,7 +326,8 @@ public class LoginActivity extends BaseActivity
|
|||||||
// accept keyboard "ok"
|
// accept keyboard "ok"
|
||||||
etRename.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
etRename.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_DONE)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_DONE)) {
|
||||||
Helper.hideKeyboardAlways(LoginActivity.this);
|
Helper.hideKeyboardAlways(LoginActivity.this);
|
||||||
String newName = etRename.getText().toString();
|
String newName = etRename.getText().toString();
|
||||||
dialog.cancel();
|
dialog.cancel();
|
||||||
|
@@ -206,7 +206,8 @@ public class LoginFragment extends Fragment implements WalletInfoAdapter.OnInter
|
|||||||
|
|
||||||
etDaemonAddress.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
etDaemonAddress.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_DONE)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_DONE)) {
|
||||||
Helper.hideKeyboard(getActivity());
|
Helper.hideKeyboard(getActivity());
|
||||||
etDummy.requestFocus();
|
etDummy.requestFocus();
|
||||||
return true;
|
return true;
|
||||||
|
@@ -20,7 +20,6 @@ import android.content.Context;
|
|||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.drawable.BitmapDrawable;
|
import android.graphics.drawable.BitmapDrawable;
|
||||||
import android.nfc.NfcAdapter;
|
|
||||||
import android.nfc.NfcManager;
|
import android.nfc.NfcManager;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -67,9 +66,8 @@ public class ReceiveFragment extends Fragment {
|
|||||||
private ProgressBar pbProgress;
|
private ProgressBar pbProgress;
|
||||||
private TextView tvAddressLabel;
|
private TextView tvAddressLabel;
|
||||||
private TextView tvAddress;
|
private TextView tvAddress;
|
||||||
private TextInputLayout etPaymentId;
|
private TextInputLayout etNotes;
|
||||||
private ExchangeView evAmount;
|
private ExchangeView evAmount;
|
||||||
private Button bPaymentId;
|
|
||||||
private TextView tvQrCode;
|
private TextView tvQrCode;
|
||||||
private ImageView qrCode;
|
private ImageView qrCode;
|
||||||
private ImageView qrCodeFull;
|
private ImageView qrCodeFull;
|
||||||
@@ -97,9 +95,8 @@ public class ReceiveFragment extends Fragment {
|
|||||||
pbProgress = (ProgressBar) view.findViewById(R.id.pbProgress);
|
pbProgress = (ProgressBar) view.findViewById(R.id.pbProgress);
|
||||||
tvAddressLabel = (TextView) view.findViewById(R.id.tvAddressLabel);
|
tvAddressLabel = (TextView) view.findViewById(R.id.tvAddressLabel);
|
||||||
tvAddress = (TextView) view.findViewById(R.id.tvAddress);
|
tvAddress = (TextView) view.findViewById(R.id.tvAddress);
|
||||||
etPaymentId = (TextInputLayout) view.findViewById(R.id.etPaymentId);
|
etNotes = (TextInputLayout) view.findViewById(R.id.etNotes);
|
||||||
evAmount = (ExchangeView) view.findViewById(R.id.evAmount);
|
evAmount = (ExchangeView) view.findViewById(R.id.evAmount);
|
||||||
bPaymentId = (Button) view.findViewById(R.id.bPaymentId);
|
|
||||||
qrCode = (ImageView) view.findViewById(R.id.qrCode);
|
qrCode = (ImageView) view.findViewById(R.id.qrCode);
|
||||||
tvQrCode = (TextView) view.findViewById(R.id.tvQrCode);
|
tvQrCode = (TextView) view.findViewById(R.id.tvQrCode);
|
||||||
qrCodeFull = (ImageView) view.findViewById(R.id.qrCodeFull);
|
qrCodeFull = (ImageView) view.findViewById(R.id.qrCodeFull);
|
||||||
@@ -107,7 +104,6 @@ public class ReceiveFragment extends Fragment {
|
|||||||
bCopyAddress = (ImageButton) view.findViewById(R.id.bCopyAddress);
|
bCopyAddress = (ImageButton) view.findViewById(R.id.bCopyAddress);
|
||||||
bSubaddress = (Button) view.findViewById(R.id.bSubaddress);
|
bSubaddress = (Button) view.findViewById(R.id.bSubaddress);
|
||||||
|
|
||||||
etPaymentId.getEditText().setRawInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
|
|
||||||
etDummy.setRawInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
|
etDummy.setRawInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
|
||||||
|
|
||||||
bCopyAddress.setOnClickListener(new View.OnClickListener() {
|
bCopyAddress.setOnClickListener(new View.OnClickListener() {
|
||||||
@@ -136,39 +132,32 @@ public class ReceiveFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
etPaymentId.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
final EditText notesEdit = etNotes.getEditText();
|
||||||
|
notesEdit.setRawInputType(InputType.TYPE_CLASS_TEXT);
|
||||||
|
notesEdit.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_DONE)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
if (checkPaymentId()) { // && evAmount.checkXmrAmount(true)) {
|
|| (actionId == EditorInfo.IME_ACTION_DONE)) {
|
||||||
generateQr();
|
generateQr();
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
etPaymentId.getEditText().addTextChangedListener(new TextWatcher() {
|
notesEdit.addTextChangedListener(new TextWatcher() {
|
||||||
@Override
|
|
||||||
public void afterTextChanged(Editable editable) {
|
|
||||||
clearQR();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
clearQR();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
bPaymentId.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void afterTextChanged(Editable s) {
|
||||||
etPaymentId.getEditText().setText((Wallet.generatePaymentId()));
|
|
||||||
etPaymentId.getEditText().setSelection(etPaymentId.getEditText().getText().length());
|
|
||||||
if (checkPaymentId()) { //&& evAmount.checkXmrAmount(true)) {
|
|
||||||
generateQr();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -192,10 +181,12 @@ public class ReceiveFragment extends Fragment {
|
|||||||
qrCode.setOnClickListener(new View.OnClickListener() {
|
qrCode.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
Helper.hideKeyboard(getActivity());
|
||||||
|
etDummy.requestFocus();
|
||||||
if (qrValid) {
|
if (qrValid) {
|
||||||
qrCodeFull.setImageBitmap(((BitmapDrawable) qrCode.getDrawable()).getBitmap());
|
qrCodeFull.setImageBitmap(((BitmapDrawable) qrCode.getDrawable()).getBitmap());
|
||||||
qrCodeFull.setVisibility(View.VISIBLE);
|
qrCodeFull.setVisibility(View.VISIBLE);
|
||||||
} else if (checkPaymentId()) {
|
} else {
|
||||||
evAmount.doExchange();
|
evAmount.doExchange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -292,8 +283,6 @@ public class ReceiveFragment extends Fragment {
|
|||||||
listenerCallback.setTitle(wallet.getName());
|
listenerCallback.setTitle(wallet.getName());
|
||||||
listenerCallback.setSubtitle(wallet.getAccountLabel());
|
listenerCallback.setSubtitle(wallet.getAccountLabel());
|
||||||
tvAddress.setText(wallet.getAddress());
|
tvAddress.setText(wallet.getAddress());
|
||||||
etPaymentId.setEnabled(true);
|
|
||||||
bPaymentId.setEnabled(true);
|
|
||||||
enableCopyAddress(true);
|
enableCopyAddress(true);
|
||||||
hideProgress();
|
hideProgress();
|
||||||
generateQr();
|
generateQr();
|
||||||
@@ -381,18 +370,6 @@ public class ReceiveFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean checkPaymentId() {
|
|
||||||
String paymentId = etPaymentId.getEditText().getText().toString();
|
|
||||||
boolean ok = paymentId.isEmpty() || Wallet.isPaymentIdValid(paymentId);
|
|
||||||
|
|
||||||
if (!ok) {
|
|
||||||
etPaymentId.setError(getString(R.string.receive_paymentid_invalid));
|
|
||||||
} else {
|
|
||||||
etPaymentId.setError(null);
|
|
||||||
}
|
|
||||||
return ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BarcodeData getBarcodeData() {
|
public BarcodeData getBarcodeData() {
|
||||||
if (qrValid)
|
if (qrValid)
|
||||||
return bcData;
|
return bcData;
|
||||||
@@ -405,15 +382,15 @@ public class ReceiveFragment extends Fragment {
|
|||||||
private void generateQr() {
|
private void generateQr() {
|
||||||
Timber.d("GENQR");
|
Timber.d("GENQR");
|
||||||
String address = tvAddress.getText().toString();
|
String address = tvAddress.getText().toString();
|
||||||
String paymentId = etPaymentId.getEditText().getText().toString();
|
String notes = etNotes.getEditText().getText().toString();
|
||||||
String xmrAmount = evAmount.getAmount();
|
String xmrAmount = evAmount.getAmount();
|
||||||
Timber.d("%s/%s/%s", xmrAmount, paymentId, address);
|
Timber.d("%s/%s/%s", xmrAmount, notes, address);
|
||||||
if ((xmrAmount == null) || !Wallet.isAddressValid(address)) {
|
if ((xmrAmount == null) || !Wallet.isAddressValid(address)) {
|
||||||
clearQR();
|
clearQR();
|
||||||
Timber.d("CLEARQR");
|
Timber.d("CLEARQR");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bcData = new BarcodeData(BarcodeData.Asset.XMR, address, paymentId, xmrAmount);
|
bcData = new BarcodeData(BarcodeData.Asset.XMR, address, null, notes, xmrAmount);
|
||||||
int size = Math.min(qrCode.getHeight(), qrCode.getWidth());
|
int size = Math.min(qrCode.getHeight(), qrCode.getWidth());
|
||||||
Bitmap qr = generate(bcData.getUriString(), size, size);
|
Bitmap qr = generate(bcData.getUriString(), size, size);
|
||||||
if (qr != null) {
|
if (qr != null) {
|
||||||
|
@@ -273,6 +273,7 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste
|
|||||||
break;
|
break;
|
||||||
case Toolbar.BUTTON_CANCEL:
|
case Toolbar.BUTTON_CANCEL:
|
||||||
onDisposeRequest();
|
onDisposeRequest();
|
||||||
|
Helper.hideKeyboard(WalletActivity.this);
|
||||||
WalletActivity.super.onBackPressed();
|
WalletActivity.super.onBackPressed();
|
||||||
break;
|
break;
|
||||||
case Toolbar.BUTTON_CLOSE:
|
case Toolbar.BUTTON_CLOSE:
|
||||||
@@ -920,7 +921,6 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste
|
|||||||
drawer.closeDrawer(GravityCompat.START);
|
drawer.closeDrawer(GravityCompat.START);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragment_container);
|
final Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragment_container);
|
||||||
if (fragment instanceof OnBackPressedListener) {
|
if (fragment instanceof OnBackPressedListener) {
|
||||||
if (!((OnBackPressedListener) fragment).onBackPressed()) {
|
if (!((OnBackPressedListener) fragment).onBackPressed()) {
|
||||||
@@ -1026,7 +1026,8 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste
|
|||||||
// accept keyboard "ok"
|
// accept keyboard "ok"
|
||||||
etRename.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
etRename.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_DONE)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_DONE)) {
|
||||||
Helper.hideKeyboardAlways(WalletActivity.this);
|
Helper.hideKeyboardAlways(WalletActivity.this);
|
||||||
String newName = etRename.getText().toString();
|
String newName = etRename.getText().toString();
|
||||||
dialog.cancel();
|
dialog.cancel();
|
||||||
|
@@ -20,6 +20,7 @@ import android.net.Uri;
|
|||||||
|
|
||||||
import com.m2049r.xmrwallet.model.Wallet;
|
import com.m2049r.xmrwallet.model.Wallet;
|
||||||
import com.m2049r.xmrwallet.util.BitcoinAddressValidator;
|
import com.m2049r.xmrwallet.util.BitcoinAddressValidator;
|
||||||
|
import com.m2049r.xmrwallet.util.OpenAliasHelper;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -27,9 +28,14 @@ import java.util.Map;
|
|||||||
import timber.log.Timber;
|
import timber.log.Timber;
|
||||||
|
|
||||||
public class BarcodeData {
|
public class BarcodeData {
|
||||||
|
|
||||||
public static final String XMR_SCHEME = "monero:";
|
public static final String XMR_SCHEME = "monero:";
|
||||||
public static final String XMR_PAYMENTID = "tx_payment_id";
|
public static final String XMR_PAYMENTID = "tx_payment_id";
|
||||||
public static final String XMR_AMOUNT = "tx_amount";
|
public static final String XMR_AMOUNT = "tx_amount";
|
||||||
|
public static final String XMR_DESCRIPTION = "tx_description";
|
||||||
|
|
||||||
|
public static final String OA_XMR_ASSET = "xmr";
|
||||||
|
public static final String OA_BTC_ASSET = "btc";
|
||||||
|
|
||||||
static final String BTC_SCHEME = "bitcoin:";
|
static final String BTC_SCHEME = "bitcoin:";
|
||||||
static final String BTC_AMOUNT = "amount";
|
static final String BTC_AMOUNT = "amount";
|
||||||
@@ -38,10 +44,19 @@ public class BarcodeData {
|
|||||||
XMR, BTC
|
XMR, BTC
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum Security {
|
||||||
|
NORMAL,
|
||||||
|
OA_NO_DNSSEC,
|
||||||
|
OA_DNSSEC
|
||||||
|
}
|
||||||
|
|
||||||
public Asset asset = null;
|
public Asset asset = null;
|
||||||
|
public String addressName = null;
|
||||||
public String address = null;
|
public String address = null;
|
||||||
public String paymentId = null;
|
public String paymentId = null;
|
||||||
public String amount = null;
|
public String amount = null;
|
||||||
|
public String description = null;
|
||||||
|
public Security security = Security.NORMAL;
|
||||||
|
|
||||||
public BarcodeData(String uri) {
|
public BarcodeData(String uri) {
|
||||||
this.asset = asset;
|
this.asset = asset;
|
||||||
@@ -66,6 +81,22 @@ public class BarcodeData {
|
|||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BarcodeData(Asset asset, String address, String paymentId, String description, String amount) {
|
||||||
|
this.asset = asset;
|
||||||
|
this.address = address;
|
||||||
|
this.paymentId = paymentId;
|
||||||
|
this.description = description;
|
||||||
|
this.amount = amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddressName(String name) {
|
||||||
|
addressName = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecurity(Security security) {
|
||||||
|
this.security = security;
|
||||||
|
}
|
||||||
|
|
||||||
public Uri getUri() {
|
public Uri getUri() {
|
||||||
return Uri.parse(getUriString());
|
return Uri.parse(getUriString());
|
||||||
}
|
}
|
||||||
@@ -80,12 +111,13 @@ public class BarcodeData {
|
|||||||
first = false;
|
first = false;
|
||||||
sb.append(BarcodeData.XMR_PAYMENTID).append('=').append(paymentId);
|
sb.append(BarcodeData.XMR_PAYMENTID).append('=').append(paymentId);
|
||||||
}
|
}
|
||||||
if (!amount.isEmpty()) {
|
if ((description != null) && !description.isEmpty()) {
|
||||||
if (first) {
|
sb.append(first ? "?" : "&");
|
||||||
sb.append("?");
|
first = false;
|
||||||
} else {
|
sb.append(BarcodeData.XMR_DESCRIPTION).append('=').append(Uri.encode(description));
|
||||||
sb.append("&");
|
}
|
||||||
}
|
if ((amount != null) && !amount.isEmpty()) {
|
||||||
|
sb.append(first ? "?" : "&");
|
||||||
sb.append(BarcodeData.XMR_AMOUNT).append('=').append(amount);
|
sb.append(BarcodeData.XMR_AMOUNT).append('=').append(amount);
|
||||||
}
|
}
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
@@ -102,10 +134,14 @@ public class BarcodeData {
|
|||||||
if (bcData == null) {
|
if (bcData == null) {
|
||||||
bcData = parseBitcoinUri(qrCode);
|
bcData = parseBitcoinUri(qrCode);
|
||||||
}
|
}
|
||||||
// check for naked btc addres
|
// check for naked btc address
|
||||||
if (bcData == null) {
|
if (bcData == null) {
|
||||||
bcData = parseBitcoinNaked(qrCode);
|
bcData = parseBitcoinNaked(qrCode);
|
||||||
}
|
}
|
||||||
|
// check for OpenAlias
|
||||||
|
if (bcData == null) {
|
||||||
|
bcData = parseOpenAlias(qrCode);
|
||||||
|
}
|
||||||
return bcData;
|
return bcData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,6 +176,7 @@ public class BarcodeData {
|
|||||||
}
|
}
|
||||||
String address = monero.getPath();
|
String address = monero.getPath();
|
||||||
String paymentId = parms.get(XMR_PAYMENTID);
|
String paymentId = parms.get(XMR_PAYMENTID);
|
||||||
|
String description = parms.get(XMR_DESCRIPTION);
|
||||||
String amount = parms.get(XMR_AMOUNT);
|
String amount = parms.get(XMR_AMOUNT);
|
||||||
if (amount != null) {
|
if (amount != null) {
|
||||||
try {
|
try {
|
||||||
@@ -158,7 +195,7 @@ public class BarcodeData {
|
|||||||
Timber.d("address invalid");
|
Timber.d("address invalid");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return new BarcodeData(Asset.XMR, address, paymentId, amount);
|
return new BarcodeData(Asset.XMR, address, paymentId, description, amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
static public BarcodeData parseMoneroNaked(String address) {
|
static public BarcodeData parseMoneroNaked(String address) {
|
||||||
@@ -226,4 +263,61 @@ public class BarcodeData {
|
|||||||
|
|
||||||
return new BarcodeData(BarcodeData.Asset.BTC, address);
|
return new BarcodeData(BarcodeData.Asset.BTC, address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static public BarcodeData parseOpenAlias(String oaString) {
|
||||||
|
Timber.d("parseOpenAlias=%s", oaString);
|
||||||
|
if (oaString == null) return null;
|
||||||
|
|
||||||
|
Map<String, String> oaAttrs = OpenAliasHelper.parse(oaString);
|
||||||
|
if (oaAttrs == null) return null;
|
||||||
|
|
||||||
|
String oaAsset = oaAttrs.get(OpenAliasHelper.OA1_ASSET);
|
||||||
|
if (oaAsset == null) return null;
|
||||||
|
|
||||||
|
String address = oaAttrs.get(OpenAliasHelper.OA1_ADDRESS);
|
||||||
|
if (address == null) return null;
|
||||||
|
|
||||||
|
Asset asset;
|
||||||
|
if (OA_XMR_ASSET.equals(oaAsset)) {
|
||||||
|
if (!Wallet.isAddressValid(address)) {
|
||||||
|
Timber.d("XMR address invalid");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
asset = Asset.XMR;
|
||||||
|
} else if (OA_BTC_ASSET.equals(oaAsset)) {
|
||||||
|
if (!BitcoinAddressValidator.validate(address)) {
|
||||||
|
Timber.d("BTC address invalid");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
asset = Asset.BTC;
|
||||||
|
} else {
|
||||||
|
Timber.i("Unsupported OpenAlias asset %s", oaAsset);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
String paymentId = oaAttrs.get(OpenAliasHelper.OA1_PAYMENTID);
|
||||||
|
String description = oaAttrs.get(OpenAliasHelper.OA1_DESCRIPTION);
|
||||||
|
if (description == null) {
|
||||||
|
description = oaAttrs.get(OpenAliasHelper.OA1_NAME);
|
||||||
|
}
|
||||||
|
String amount = oaAttrs.get(OpenAliasHelper.OA1_AMOUNT);
|
||||||
|
String addressName = oaAttrs.get(OpenAliasHelper.OA1_NAME);
|
||||||
|
|
||||||
|
if (amount != null) {
|
||||||
|
try {
|
||||||
|
Double.parseDouble(amount);
|
||||||
|
} catch (NumberFormatException ex) {
|
||||||
|
Timber.d(ex.getLocalizedMessage());
|
||||||
|
return null; // we have an amount but its not a number!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((paymentId != null) && !Wallet.isPaymentIdValid(paymentId)) {
|
||||||
|
Timber.d("paymentId invalid");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
BarcodeData bc = new BarcodeData(asset, address, paymentId, description, amount);
|
||||||
|
bc.setAddressName(addressName);
|
||||||
|
return bc;
|
||||||
|
}
|
||||||
}
|
}
|
@@ -32,6 +32,14 @@ import android.widget.TextView;
|
|||||||
import com.m2049r.xmrwallet.BuildConfig;
|
import com.m2049r.xmrwallet.BuildConfig;
|
||||||
import com.m2049r.xmrwallet.R;
|
import com.m2049r.xmrwallet.R;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
|
import timber.log.Timber;
|
||||||
|
|
||||||
public class AboutFragment extends DialogFragment {
|
public class AboutFragment extends DialogFragment {
|
||||||
static final String TAG = "AboutFragment";
|
static final String TAG = "AboutFragment";
|
||||||
|
|
||||||
@@ -52,7 +60,7 @@ public class AboutFragment extends DialogFragment {
|
|||||||
@Override
|
@Override
|
||||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
final View view = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_about, null);
|
final View view = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_about, null);
|
||||||
((TextView) view.findViewById(R.id.tvHelp)).setText(Html.fromHtml(getString(R.string.about_licenses)));
|
((TextView) view.findViewById(R.id.tvHelp)).setText(Html.fromHtml(getLicencesHtml()));
|
||||||
((TextView) view.findViewById(R.id.tvVersion)).setText(getString(R.string.about_version, BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE));
|
((TextView) view.findViewById(R.id.tvVersion)).setText(getString(R.string.about_version, BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE));
|
||||||
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||||
@@ -66,4 +74,18 @@ public class AboutFragment extends DialogFragment {
|
|||||||
});
|
});
|
||||||
return builder.create();
|
return builder.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getLicencesHtml() {
|
||||||
|
try (BufferedReader reader = new BufferedReader(
|
||||||
|
new InputStreamReader(getContext().getAssets().open("licenses.html"), StandardCharsets.UTF_8))) {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
String line;
|
||||||
|
while ((line = reader.readLine()) != null)
|
||||||
|
sb.append(line);
|
||||||
|
return sb.toString();
|
||||||
|
} catch (IOException ex) {
|
||||||
|
Timber.e(ex);
|
||||||
|
return ex.getLocalizedMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@@ -25,6 +25,7 @@ import android.text.Editable;
|
|||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.text.InputType;
|
import android.text.InputType;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
|
import android.util.Patterns;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -39,9 +40,12 @@ import com.m2049r.xmrwallet.data.BarcodeData;
|
|||||||
import com.m2049r.xmrwallet.data.TxData;
|
import com.m2049r.xmrwallet.data.TxData;
|
||||||
import com.m2049r.xmrwallet.data.TxDataBtc;
|
import com.m2049r.xmrwallet.data.TxDataBtc;
|
||||||
import com.m2049r.xmrwallet.model.Wallet;
|
import com.m2049r.xmrwallet.model.Wallet;
|
||||||
import com.m2049r.xmrwallet.model.WalletManager;
|
|
||||||
import com.m2049r.xmrwallet.util.BitcoinAddressValidator;
|
import com.m2049r.xmrwallet.util.BitcoinAddressValidator;
|
||||||
import com.m2049r.xmrwallet.util.Helper;
|
import com.m2049r.xmrwallet.util.Helper;
|
||||||
|
import com.m2049r.xmrwallet.util.OpenAliasHelper;
|
||||||
|
import com.m2049r.xmrwallet.util.UserNotes;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import timber.log.Timber;
|
import timber.log.Timber;
|
||||||
|
|
||||||
@@ -75,6 +79,7 @@ public class SendAddressWizardFragment extends SendWizardFragment {
|
|||||||
private EditText etDummy;
|
private EditText etDummy;
|
||||||
private TextInputLayout etAddress;
|
private TextInputLayout etAddress;
|
||||||
private TextInputLayout etPaymentId;
|
private TextInputLayout etPaymentId;
|
||||||
|
private TextInputLayout etNotes;
|
||||||
private Button bPaymentId;
|
private Button bPaymentId;
|
||||||
private CardView cvScan;
|
private CardView cvScan;
|
||||||
private View tvPaymentIdIntegrated;
|
private View tvPaymentIdIntegrated;
|
||||||
@@ -82,6 +87,8 @@ public class SendAddressWizardFragment extends SendWizardFragment {
|
|||||||
private TextView tvXmrTo;
|
private TextView tvXmrTo;
|
||||||
private View llXmrTo;
|
private View llXmrTo;
|
||||||
|
|
||||||
|
private boolean resolvingOA = false;
|
||||||
|
|
||||||
OnScanListener onScanListener;
|
OnScanListener onScanListener;
|
||||||
|
|
||||||
public interface OnScanListener {
|
public interface OnScanListener {
|
||||||
@@ -105,8 +112,13 @@ public class SendAddressWizardFragment extends SendWizardFragment {
|
|||||||
etAddress.getEditText().setRawInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
|
etAddress.getEditText().setRawInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
|
||||||
etAddress.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
etAddress.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_NEXT)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
if (checkAddress()) {
|
|| (actionId == EditorInfo.IME_ACTION_NEXT)) {
|
||||||
|
String dnsOA = dnsFromOpenAlias(etAddress.getEditText().getText().toString());
|
||||||
|
Timber.d("OpenAlias is %s", dnsOA);
|
||||||
|
if (dnsOA != null) {
|
||||||
|
processOpenAlias(dnsOA);
|
||||||
|
} else if (checkAddress()) {
|
||||||
if (llPaymentId.getVisibility() == View.VISIBLE) {
|
if (llPaymentId.getVisibility() == View.VISIBLE) {
|
||||||
etPaymentId.requestFocus();
|
etPaymentId.requestFocus();
|
||||||
} else {
|
} else {
|
||||||
@@ -155,15 +167,14 @@ public class SendAddressWizardFragment extends SendWizardFragment {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
etPaymentId = (TextInputLayout) view.findViewById(R.id.etPaymentId);
|
etPaymentId = (TextInputLayout) view.findViewById(R.id.etPaymentId);
|
||||||
etPaymentId.getEditText().setRawInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
|
etPaymentId.getEditText().setRawInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
|
||||||
etPaymentId.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
etPaymentId.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_DONE)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_NEXT)) {
|
||||||
if (checkPaymentId()) {
|
if (checkPaymentId()) {
|
||||||
etDummy.requestFocus();
|
etNotes.requestFocus();
|
||||||
Helper.hideKeyboard(getActivity());
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -193,6 +204,20 @@ public class SendAddressWizardFragment extends SendWizardFragment {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
etNotes = (TextInputLayout) view.findViewById(R.id.etNotes);
|
||||||
|
etNotes.getEditText().setRawInputType(InputType.TYPE_CLASS_TEXT);
|
||||||
|
etNotes.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_DONE)) {
|
||||||
|
etDummy.requestFocus();
|
||||||
|
Helper.hideKeyboard(getActivity());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
cvScan = (CardView) view.findViewById(R.id.bScan);
|
cvScan = (CardView) view.findViewById(R.id.bScan);
|
||||||
cvScan.setOnClickListener(new View.OnClickListener() {
|
cvScan.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -215,6 +240,38 @@ public class SendAddressWizardFragment extends SendWizardFragment {
|
|||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void processOpenAlias(String dnsOA) {
|
||||||
|
if (resolvingOA) return; // already resolving - just wait
|
||||||
|
if (dnsOA != null) {
|
||||||
|
resolvingOA = true;
|
||||||
|
etAddress.setError(getString(R.string.send_address_resolve_openalias));
|
||||||
|
OpenAliasHelper.resolve(dnsOA, new OpenAliasHelper.OnResolvedListener() {
|
||||||
|
@Override
|
||||||
|
public void onResolved(Map<BarcodeData.Asset, BarcodeData> dataMap) {
|
||||||
|
resolvingOA = false;
|
||||||
|
BarcodeData barcodeData = dataMap.get(BarcodeData.Asset.XMR);
|
||||||
|
if (barcodeData == null) barcodeData = dataMap.get(BarcodeData.Asset.BTC);
|
||||||
|
if (barcodeData != null) {
|
||||||
|
Timber.d("Security=%s, %s", barcodeData.security.toString(), barcodeData.address);
|
||||||
|
processScannedData(barcodeData);
|
||||||
|
etDummy.requestFocus();
|
||||||
|
Helper.hideKeyboard(getActivity());
|
||||||
|
} else {
|
||||||
|
etAddress.setError(getString(R.string.send_address_not_openalias));
|
||||||
|
Timber.d("NO XMR OPENALIAS TXT FOUND");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure() {
|
||||||
|
resolvingOA = false;
|
||||||
|
etAddress.setError(getString(R.string.send_address_not_openalias));
|
||||||
|
Timber.e("OA FAILED");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} // else ignore
|
||||||
|
}
|
||||||
|
|
||||||
private boolean checkAddressNoError() {
|
private boolean checkAddressNoError() {
|
||||||
String address = etAddress.getEditText().getText().toString();
|
String address = etAddress.getEditText().getText().toString();
|
||||||
return Wallet.isAddressValid(address)
|
return Wallet.isAddressValid(address)
|
||||||
@@ -261,12 +318,21 @@ public class SendAddressWizardFragment extends SendWizardFragment {
|
|||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void shakeAddress() {
|
||||||
|
etAddress.startAnimation(Helper.getShakeAnimation(getContext()));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onValidateFields() {
|
public boolean onValidateFields() {
|
||||||
boolean ok = true;
|
boolean ok = true;
|
||||||
if (!checkAddressNoError()) {
|
if (!checkAddressNoError()) {
|
||||||
etAddress.startAnimation(Helper.getShakeAnimation(getContext()));
|
shakeAddress();
|
||||||
ok = false;
|
ok = false;
|
||||||
|
String dnsOA = dnsFromOpenAlias(etAddress.getEditText().getText().toString());
|
||||||
|
Timber.d("OpenAlias is %s", dnsOA);
|
||||||
|
if (dnsOA != null) {
|
||||||
|
processOpenAlias(dnsOA);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!checkPaymentId()) {
|
if (!checkPaymentId()) {
|
||||||
etPaymentId.startAnimation(Helper.getShakeAnimation(getContext()));
|
etPaymentId.startAnimation(Helper.getShakeAnimation(getContext()));
|
||||||
@@ -283,6 +349,7 @@ public class SendAddressWizardFragment extends SendWizardFragment {
|
|||||||
txData.setDestinationAddress(etAddress.getEditText().getText().toString());
|
txData.setDestinationAddress(etAddress.getEditText().getText().toString());
|
||||||
txData.setPaymentId(etPaymentId.getEditText().getText().toString());
|
txData.setPaymentId(etPaymentId.getEditText().getText().toString());
|
||||||
}
|
}
|
||||||
|
txData.setUserNotes(new UserNotes(etNotes.getEditText().getText().toString()));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -320,19 +387,31 @@ public class SendAddressWizardFragment extends SendWizardFragment {
|
|||||||
String scannedAddress = barcodeData.address;
|
String scannedAddress = barcodeData.address;
|
||||||
if (scannedAddress != null) {
|
if (scannedAddress != null) {
|
||||||
etAddress.getEditText().setText(scannedAddress);
|
etAddress.getEditText().setText(scannedAddress);
|
||||||
checkAddress();
|
if (checkAddress()) {
|
||||||
|
if (barcodeData.security == BarcodeData.Security.OA_NO_DNSSEC)
|
||||||
|
etAddress.setError(getString(R.string.send_address_no_dnssec));
|
||||||
|
else if (barcodeData.security == BarcodeData.Security.OA_DNSSEC)
|
||||||
|
etAddress.setError(getString(R.string.send_address_openalias));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
etAddress.getEditText().getText().clear();
|
etAddress.getEditText().getText().clear();
|
||||||
etAddress.setError(null);
|
etAddress.setError(null);
|
||||||
}
|
}
|
||||||
String scannedPaymenId = barcodeData.paymentId;
|
String scannedPaymentId = barcodeData.paymentId;
|
||||||
if (scannedPaymenId != null) {
|
if (scannedPaymentId != null) {
|
||||||
etPaymentId.getEditText().setText(scannedPaymenId);
|
etPaymentId.getEditText().setText(scannedPaymentId);
|
||||||
checkPaymentId();
|
checkPaymentId();
|
||||||
} else {
|
} else {
|
||||||
etPaymentId.getEditText().getText().clear();
|
etPaymentId.getEditText().getText().clear();
|
||||||
etPaymentId.setError(null);
|
etPaymentId.setError(null);
|
||||||
}
|
}
|
||||||
|
String scannedNotes = barcodeData.description;
|
||||||
|
if (scannedNotes != null) {
|
||||||
|
etNotes.getEditText().setText(scannedNotes);
|
||||||
|
} else {
|
||||||
|
etNotes.getEditText().getText().clear();
|
||||||
|
etNotes.setError(null);
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
Timber.d("barcodeData=null");
|
Timber.d("barcodeData=null");
|
||||||
}
|
}
|
||||||
@@ -344,4 +423,14 @@ public class SendAddressWizardFragment extends SendWizardFragment {
|
|||||||
Helper.hideKeyboard(getActivity());
|
Helper.hideKeyboard(getActivity());
|
||||||
etDummy.requestFocus();
|
etDummy.requestFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String dnsFromOpenAlias(String openalias) {
|
||||||
|
Timber.d("checking openalias candidate %s", openalias);
|
||||||
|
if (Patterns.DOMAIN_NAME.matcher(openalias).matches()) return openalias;
|
||||||
|
if (Patterns.EMAIL_ADDRESS.matcher(openalias).matches()) {
|
||||||
|
openalias = openalias.replaceFirst("@", ".");
|
||||||
|
if (Patterns.DOMAIN_NAME.matcher(openalias).matches()) return openalias;
|
||||||
|
}
|
||||||
|
return null; // not an openalias
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -421,7 +421,8 @@ public class SendBtcConfirmWizardFragment extends SendWizardFragment implements
|
|||||||
// accept keyboard "ok"
|
// accept keyboard "ok"
|
||||||
etPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
etPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_DONE)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_DONE)) {
|
||||||
String pass = etPassword.getEditText().getText().toString();
|
String pass = etPassword.getEditText().getText().toString();
|
||||||
if (getActivityCallback().verifyWalletPassword(pass)) {
|
if (getActivityCallback().verifyWalletPassword(pass)) {
|
||||||
Helper.hideKeyboardAlways(activity);
|
Helper.hideKeyboardAlways(activity);
|
||||||
|
@@ -302,7 +302,8 @@ public class SendConfirmWizardFragment extends SendWizardFragment implements Sen
|
|||||||
// accept keyboard "ok"
|
// accept keyboard "ok"
|
||||||
etPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
etPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_DONE)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_DONE)) {
|
||||||
String pass = etPassword.getEditText().getText().toString();
|
String pass = etPassword.getEditText().getText().toString();
|
||||||
if (getActivityCallback().verifyWalletPassword(pass)) {
|
if (getActivityCallback().verifyWalletPassword(pass)) {
|
||||||
Helper.hideKeyboardAlways(activity);
|
Helper.hideKeyboardAlways(activity);
|
||||||
|
@@ -62,10 +62,8 @@ public class SendSettingsWizardFragment extends SendWizardFragment {
|
|||||||
PendingTransaction.Priority.Priority_High}; // must match the layout XML
|
PendingTransaction.Priority.Priority_High}; // must match the layout XML
|
||||||
|
|
||||||
private Spinner sPriority;
|
private Spinner sPriority;
|
||||||
private EditText etNotes;
|
|
||||||
private EditText etDummy;
|
private EditText etDummy;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
@@ -77,19 +75,6 @@ public class SendSettingsWizardFragment extends SendWizardFragment {
|
|||||||
|
|
||||||
sPriority = (Spinner) view.findViewById(R.id.sPriority);
|
sPriority = (Spinner) view.findViewById(R.id.sPriority);
|
||||||
|
|
||||||
etNotes = (EditText) view.findViewById(R.id.etNotes);
|
|
||||||
etNotes.setRawInputType(InputType.TYPE_CLASS_TEXT);
|
|
||||||
etNotes.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_DONE)) {
|
|
||||||
etDummy.requestFocus();
|
|
||||||
Helper.hideKeyboard(getActivity());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
etDummy = (EditText) view.findViewById(R.id.etDummy);
|
etDummy = (EditText) view.findViewById(R.id.etDummy);
|
||||||
etDummy.setRawInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
|
etDummy.setRawInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
|
||||||
|
|
||||||
@@ -102,7 +87,6 @@ public class SendSettingsWizardFragment extends SendWizardFragment {
|
|||||||
TxData txData = sendListener.getTxData();
|
TxData txData = sendListener.getTxData();
|
||||||
txData.setPriority(Priorities[sPriority.getSelectedItemPosition()]);
|
txData.setPriority(Priorities[sPriority.getSelectedItemPosition()]);
|
||||||
txData.setMixin(MIXIN);
|
txData.setMixin(MIXIN);
|
||||||
txData.setUserNotes(new UserNotes(etNotes.getText().toString()));
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -151,6 +151,8 @@ public class Wallet {
|
|||||||
// virtual bool createWatchOnly(const std::string &path, const std::string &password, const std::string &language) const = 0;
|
// virtual bool createWatchOnly(const std::string &path, const std::string &password, const std::string &language) const = 0;
|
||||||
// virtual void setRefreshFromBlockHeight(uint64_t refresh_from_block_height) = 0;
|
// virtual void setRefreshFromBlockHeight(uint64_t refresh_from_block_height) = 0;
|
||||||
|
|
||||||
|
public native void setRestoreHeight(long height);
|
||||||
|
|
||||||
public native long getRestoreHeight();
|
public native long getRestoreHeight();
|
||||||
|
|
||||||
// virtual void setRecoveringFromSeed(bool recoveringFromSeed) = 0;
|
// virtual void setRecoveringFromSeed(bool recoveringFromSeed) = 0;
|
||||||
|
@@ -18,6 +18,7 @@ package com.m2049r.xmrwallet.model;
|
|||||||
|
|
||||||
import com.m2049r.xmrwallet.data.WalletNode;
|
import com.m2049r.xmrwallet.data.WalletNode;
|
||||||
import com.m2049r.xmrwallet.ledger.Ledger;
|
import com.m2049r.xmrwallet.ledger.Ledger;
|
||||||
|
import com.m2049r.xmrwallet.util.RestoreHeight;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -25,6 +26,7 @@ import java.io.FileReader;
|
|||||||
import java.io.FilenameFilter;
|
import java.io.FilenameFilter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import timber.log.Timber;
|
import timber.log.Timber;
|
||||||
@@ -76,6 +78,13 @@ public class WalletManager {
|
|||||||
long walletHandle = createWalletJ(aFile.getAbsolutePath(), password, language, getNetworkType().getValue());
|
long walletHandle = createWalletJ(aFile.getAbsolutePath(), password, language, getNetworkType().getValue());
|
||||||
Wallet wallet = new Wallet(walletHandle);
|
Wallet wallet = new Wallet(walletHandle);
|
||||||
manageWallet(wallet);
|
manageWallet(wallet);
|
||||||
|
if (wallet.getStatus() == Wallet.Status.Status_Ok) {
|
||||||
|
// (Re-)Estimate restore height based on what we know
|
||||||
|
long oldHeight = wallet.getRestoreHeight();
|
||||||
|
wallet.setRestoreHeight(RestoreHeight.getInstance().getHeight(new Date()));
|
||||||
|
Timber.d("Changed Restore Height from %d to %d", oldHeight, wallet.getRestoreHeight());
|
||||||
|
wallet.setPassword(password); // this rewrites the keys file (which contains the restore height)
|
||||||
|
}
|
||||||
return wallet;
|
return wallet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -563,7 +563,8 @@ public class Helper {
|
|||||||
// accept keyboard "ok"
|
// accept keyboard "ok"
|
||||||
etPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
etPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_DONE)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_DONE)) {
|
||||||
String pass = etPassword.getEditText().getText().toString();
|
String pass = etPassword.getEditText().getText().toString();
|
||||||
if (loginTask == null) {
|
if (loginTask == null) {
|
||||||
loginTask = new LoginWalletTask(pass, false);
|
loginTask = new LoginWalletTask(pass, false);
|
||||||
|
245
app/src/main/java/com/m2049r/xmrwallet/util/OpenAliasHelper.java
Normal file
245
app/src/main/java/com/m2049r/xmrwallet/util/OpenAliasHelper.java
Normal file
@@ -0,0 +1,245 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018 m2049r
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Specs from https://openalias.org/
|
||||||
|
|
||||||
|
package com.m2049r.xmrwallet.util;
|
||||||
|
|
||||||
|
import android.os.AsyncTask;
|
||||||
|
|
||||||
|
import com.m2049r.xmrwallet.data.BarcodeData;
|
||||||
|
|
||||||
|
import org.jitsi.dnssec.validator.ValidatingResolver;
|
||||||
|
import org.xbill.DNS.DClass;
|
||||||
|
import org.xbill.DNS.Flags;
|
||||||
|
import org.xbill.DNS.Message;
|
||||||
|
import org.xbill.DNS.Name;
|
||||||
|
import org.xbill.DNS.RRset;
|
||||||
|
import org.xbill.DNS.Rcode;
|
||||||
|
import org.xbill.DNS.Record;
|
||||||
|
import org.xbill.DNS.Section;
|
||||||
|
import org.xbill.DNS.SimpleResolver;
|
||||||
|
import org.xbill.DNS.TXTRecord;
|
||||||
|
import org.xbill.DNS.Type;
|
||||||
|
|
||||||
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import timber.log.Timber;
|
||||||
|
|
||||||
|
public class OpenAliasHelper {
|
||||||
|
public static final String OA1_SCHEME = "oa1:";
|
||||||
|
public static final String OA1_ASSET = "asset";
|
||||||
|
public static final String OA1_ADDRESS = "recipient_address";
|
||||||
|
public static final String OA1_NAME = "recipient_name";
|
||||||
|
public static final String OA1_DESCRIPTION = "tx_description";
|
||||||
|
public static final String OA1_AMOUNT = "tx_amount";
|
||||||
|
public static final String OA1_PAYMENTID = "tx_payment_id";
|
||||||
|
|
||||||
|
public static final int DNS_LOOKUP_TIMEOUT = 2500; // ms
|
||||||
|
|
||||||
|
public static void resolve(String name, OnResolvedListener resolvedListener) {
|
||||||
|
new DnsTxtResolver(resolvedListener).execute(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Map<String, String> parse(String oaString) {
|
||||||
|
return new OpenAliasParser(oaString).parse();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnResolvedListener {
|
||||||
|
void onResolved(Map<BarcodeData.Asset, BarcodeData> dataMap);
|
||||||
|
|
||||||
|
void onFailure();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class DnsTxtResolver extends AsyncTask<String, Void, Boolean> {
|
||||||
|
List<String> txts = new ArrayList<>();
|
||||||
|
boolean dnssec = false;
|
||||||
|
|
||||||
|
private final OnResolvedListener resolvedListener;
|
||||||
|
|
||||||
|
private DnsTxtResolver(OnResolvedListener resolvedListener) {
|
||||||
|
this.resolvedListener = resolvedListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
// trust anchor of the root zone
|
||||||
|
// http://data.iana.org/root-anchors/root-anchors.xml
|
||||||
|
final String ROOT =
|
||||||
|
". IN DS 19036 8 2 49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5\n" +
|
||||||
|
". IN DS 20326 8 2 E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237C7F8EC8D";
|
||||||
|
final String[] DNSSEC_SERVERS = {
|
||||||
|
"4.2.2.1", // Level3
|
||||||
|
"4.2.2.2", // Level3
|
||||||
|
"4.2.2.6", // Level3
|
||||||
|
"1.1.1.1", // cloudflare
|
||||||
|
"9.9.9.9", // quad9
|
||||||
|
"8.8.4.4", // google
|
||||||
|
"8.8.8.8" // google
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Boolean doInBackground(String... args) {
|
||||||
|
//main();
|
||||||
|
if (args.length != 1) return false;
|
||||||
|
String name = args[0];
|
||||||
|
if ((name == null) || (name.isEmpty()))
|
||||||
|
return false; //pointless trying to lookup nothing
|
||||||
|
Timber.d("Resolving %s", name);
|
||||||
|
try {
|
||||||
|
SimpleResolver sr = new SimpleResolver(DNSSEC_SERVERS[new Random().nextInt(DNSSEC_SERVERS.length)]);
|
||||||
|
ValidatingResolver vr = new ValidatingResolver(sr);
|
||||||
|
vr.setTimeout(0, DNS_LOOKUP_TIMEOUT);
|
||||||
|
vr.loadTrustAnchors(new ByteArrayInputStream(ROOT.getBytes("ASCII")));
|
||||||
|
Record qr = Record.newRecord(Name.fromConstantString(name + "."), Type.TXT, DClass.IN);
|
||||||
|
Message response = vr.send(Message.newQuery(qr));
|
||||||
|
final int rcode = response.getRcode();
|
||||||
|
if (rcode != Rcode.NOERROR) {
|
||||||
|
Timber.i("Rcode: %s", Rcode.string(rcode));
|
||||||
|
for (RRset set : response.getSectionRRsets(Section.ADDITIONAL)) {
|
||||||
|
if (set.getName().equals(Name.root) && set.getType() == Type.TXT
|
||||||
|
&& set.getDClass() == ValidatingResolver.VALIDATION_REASON_QCLASS) {
|
||||||
|
Timber.i("Reason: %s", ((TXTRecord) set.first()).getStrings().get(0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
dnssec = response.getHeader().getFlag(Flags.AD);
|
||||||
|
for (Record record : response.getSectionArray(Section.ANSWER)) {
|
||||||
|
if (record.getType() == Type.TXT) {
|
||||||
|
txts.addAll(((TXTRecord) record).getStrings());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (IOException | IllegalArgumentException ex) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPostExecute(Boolean success) {
|
||||||
|
if (resolvedListener != null)
|
||||||
|
if (success) {
|
||||||
|
Map<BarcodeData.Asset, BarcodeData> dataMap = new HashMap<>();
|
||||||
|
for (String txt : txts) {
|
||||||
|
BarcodeData bc = BarcodeData.parseOpenAlias(txt);
|
||||||
|
if (bc != null) {
|
||||||
|
bc.setSecurity(dnssec ? BarcodeData.Security.OA_DNSSEC : BarcodeData.Security.OA_NO_DNSSEC);
|
||||||
|
if (!dataMap.containsKey(bc.asset)) {
|
||||||
|
dataMap.put(bc.asset, bc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
resolvedListener.onResolved(dataMap);
|
||||||
|
} else {
|
||||||
|
resolvedListener.onFailure();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class OpenAliasParser {
|
||||||
|
int currentPos = 0;
|
||||||
|
final String oaString;
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
OpenAliasParser(String oaString) {
|
||||||
|
this.oaString = oaString;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, String> parse() {
|
||||||
|
if ((oaString == null) || !oaString.startsWith(OA1_SCHEME)) return null;
|
||||||
|
if (oaString.charAt(oaString.length() - 1) != ';') return null;
|
||||||
|
|
||||||
|
Map<String, String> oaAttributes = new HashMap<>();
|
||||||
|
|
||||||
|
final int assetEnd = oaString.indexOf(' ');
|
||||||
|
if (assetEnd > 20) return null; // random sanity check
|
||||||
|
String asset = oaString.substring(OA1_SCHEME.length(), assetEnd);
|
||||||
|
oaAttributes.put(OA1_ASSET, asset);
|
||||||
|
|
||||||
|
boolean inQuote = false;
|
||||||
|
boolean inKey = true;
|
||||||
|
String key = null;
|
||||||
|
for (currentPos = assetEnd; currentPos < oaString.length() - 1; currentPos++) {
|
||||||
|
char c = currentChar();
|
||||||
|
if (inKey) {
|
||||||
|
if ((sb.length() == 0) && Character.isWhitespace(c)) continue;
|
||||||
|
if ((c == '\\') || (c == ';')) return null;
|
||||||
|
if (c == '=') {
|
||||||
|
key = sb.toString();
|
||||||
|
if (oaAttributes.containsKey(key)) return null; // no duplicate keys allowed
|
||||||
|
sb.setLength(0);
|
||||||
|
inKey = false;
|
||||||
|
} else {
|
||||||
|
sb.append(c);
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// now we are in the value
|
||||||
|
if ((sb.length() == 0) && (c == '"')) {
|
||||||
|
inQuote = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ((!inQuote || ((sb.length() > 0) && (c == '"'))) && (nextChar() == ';')) {
|
||||||
|
if (!inQuote) appendCurrentEscapedChar();
|
||||||
|
oaAttributes.put(key, sb.toString());
|
||||||
|
sb.setLength(0);
|
||||||
|
currentPos++; // skip the next ;
|
||||||
|
inQuote = false;
|
||||||
|
inKey = true;
|
||||||
|
key = null;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
appendCurrentEscapedChar();
|
||||||
|
}
|
||||||
|
if (inQuote) return null;
|
||||||
|
|
||||||
|
if (key != null) {
|
||||||
|
oaAttributes.put(key, sb.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
return oaAttributes;
|
||||||
|
}
|
||||||
|
|
||||||
|
char currentChar() {
|
||||||
|
return oaString.charAt(currentPos);
|
||||||
|
}
|
||||||
|
|
||||||
|
char nextChar() throws IndexOutOfBoundsException {
|
||||||
|
int pos = currentPos;
|
||||||
|
char c = oaString.charAt(pos);
|
||||||
|
if (c == '\\') {
|
||||||
|
pos++;
|
||||||
|
}
|
||||||
|
return oaString.charAt(pos + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void appendCurrentEscapedChar() throws IndexOutOfBoundsException {
|
||||||
|
char c = oaString.charAt(currentPos);
|
||||||
|
if (c == '\\') {
|
||||||
|
c = oaString.charAt(++currentPos);
|
||||||
|
}
|
||||||
|
sb.append(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@@ -94,6 +94,7 @@ public class RestoreHeight {
|
|||||||
blockheight.put("2018-06-01", 1585135L);
|
blockheight.put("2018-06-01", 1585135L);
|
||||||
blockheight.put("2018-07-01", 1606715L);
|
blockheight.put("2018-07-01", 1606715L);
|
||||||
blockheight.put("2018-08-01", 1629017L);
|
blockheight.put("2018-08-01", 1629017L);
|
||||||
|
blockheight.put("2018-09-01", 1651347L);
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getHeight(String date) {
|
public long getHeight(String date) {
|
||||||
|
@@ -226,7 +226,8 @@ public class ExchangeView extends LinearLayout
|
|||||||
|
|
||||||
etAmount.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
etAmount.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_DONE)) {
|
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|
||||||
|
|| (actionId == EditorInfo.IME_ACTION_DONE)) {
|
||||||
doExchange();
|
doExchange();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -89,46 +89,21 @@
|
|||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:orientation="vertical" />
|
android:orientation="vertical" />
|
||||||
|
|
||||||
<LinearLayout
|
<android.support.design.widget.TextInputLayout
|
||||||
|
android:id="@+id/etNotes"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:orientation="horizontal"
|
|
||||||
android:weightSum="10">
|
|
||||||
|
|
||||||
<android.support.design.widget.TextInputLayout
|
<EditText
|
||||||
android:id="@+id/etPaymentId"
|
style="@style/MoneroEdit"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="10"
|
android:hint="@string/receive_desc_hint"
|
||||||
app:counterEnabled="true"
|
android:imeOptions="actionDone"
|
||||||
app:counterMaxLength="16"
|
android:inputType="textMultiLine"
|
||||||
app:errorEnabled="true">
|
android:textAlignment="textStart" />
|
||||||
|
|
||||||
<android.support.design.widget.TextInputEditText
|
</android.support.design.widget.TextInputLayout>
|
||||||
style="@style/MoneroEdit"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:backgroundTint="@color/moneroGray"
|
|
||||||
android:hint="@string/receive_paymentid_hint"
|
|
||||||
android:imeOptions="actionDone"
|
|
||||||
android:inputType="textMultiLine"
|
|
||||||
android:textAlignment="textStart" />
|
|
||||||
|
|
||||||
</android.support.design.widget.TextInputLayout>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/bPaymentId"
|
|
||||||
style="@style/MoneroText.Button.Small"
|
|
||||||
android:layout_width="56dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="0"
|
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
|
||||||
android:drawableTop="@drawable/ic_settings_orange_24dp"
|
|
||||||
android:text="@string/send_generate_paymentid_hint"
|
|
||||||
android:textColor="@color/moneroGray"
|
|
||||||
android:visibility="visible" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -175,9 +150,9 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:gravity="center"
|
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
android:drawableStart="@drawable/ic_nfc_black_24dp"
|
android:drawableStart="@drawable/ic_nfc_black_24dp"
|
||||||
|
android:gravity="center"
|
||||||
android:text="@string/nfc_tag_tap"
|
android:text="@string/nfc_tag_tap"
|
||||||
android:visibility="visible" />
|
android:visibility="visible" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -43,27 +43,9 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="start"
|
android:layout_gravity="start"
|
||||||
android:gravity="center"
|
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
android:drawableStart="@drawable/ic_info_outline_gray_24dp"
|
android:drawableStart="@drawable/ic_info_outline_gray_24dp"
|
||||||
|
android:gravity="center"
|
||||||
android:text="@string/info_send_prio_fees" />
|
android:text="@string/info_send_prio_fees" />
|
||||||
|
|
||||||
<android.support.design.widget.TextInputLayout
|
|
||||||
android:id="@+id/etAddress"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="32dp">
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/etNotes"
|
|
||||||
style="@style/MoneroEdit"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/send_notes_hint"
|
|
||||||
android:imeOptions="actionDone"
|
|
||||||
android:inputType="textMultiLine"
|
|
||||||
android:textAlignment="textStart" />
|
|
||||||
|
|
||||||
</android.support.design.widget.TextInputLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@@ -230,12 +230,12 @@
|
|||||||
<string name="help_create_ledger"><![CDATA[
|
<string name="help_create_ledger"><![CDATA[
|
||||||
<h1>Wallet erstellen - Ledger</h1>
|
<h1>Wallet erstellen - Ledger</h1>
|
||||||
<p>Falls du dein Wallet mit einem Ledger Nano S wiederherstellen willst!</p>
|
<p>Falls du dein Wallet mit einem Ledger Nano S wiederherstellen willst!</p>
|
||||||
<p>Dein geheimer Schüssel verlässt nie das Ledger-Gerät, also muss es immer eingesteckt sein
|
<p>Dein geheimer Schüssel verlässt nie das Ledger-Gerät, also muss es immer eingesteckt sein,
|
||||||
wenn du dieses Wallet beutzt.</p>
|
wenn du dieses Wallet benutzt.</p>
|
||||||
<p>Gib einen eindeutigen Walletnamen und Passwort ein. Das Passwort schützt deine Walletdaten auf dem Gerät.
|
<p>Gib einen eindeutigen Walletnamen und Passwort ein. Das Passwort schützt deine Walletdaten auf dem Gerät.
|
||||||
Benutze ein starkes Passwort - noch besser ist eine Passwortphrase.<p>
|
Benutze ein starkes Passwort - noch besser ist eine Passwortphrase.<p>
|
||||||
<p>Gib die Blocknummer der ersten Transaktion dieser Adresse in das Feld \"Restore Height\" ein.
|
<p>Gib die Blocknummer der ersten Transaktion dieser Adresse in das Feld \"Restore Height\" ein.
|
||||||
Du kannst auch ein Datum im Format JJJJ-MM-DD eingeben. Falls du nicht sicher bist, gib ein
|
Du kannst auch ein Datum im Format JJJJ-MM-DD eingeben. Falls du nicht sicher bist, gib ein
|
||||||
ungefähres Datum oder Blockhöhe <em>bevor</em> du diese Adresse zum ersten mal benutzt hast ein.<p>
|
ungefähres Datum oder Blockhöhe, <em>bevor</em> du diese Adresse zum ersten Mal benutzt hast, ein.<p>
|
||||||
]]></string>
|
]]></string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -222,7 +222,6 @@
|
|||||||
|
|
||||||
<string name="send_amount_btc_xmr">%1$s (Anhaltswert)</string>
|
<string name="send_amount_btc_xmr">%1$s (Anhaltswert)</string>
|
||||||
|
|
||||||
<string name="send_address_hint">XMR oder BTC Adresse des Empfängers</string>
|
|
||||||
<string name="send_paymentid_hint">Zahlungs-ID (optional)</string>
|
<string name="send_paymentid_hint">Zahlungs-ID (optional)</string>
|
||||||
<string name="send_amount_hint">0.00</string>
|
<string name="send_amount_hint">0.00</string>
|
||||||
<string name="send_notes_hint">Private Notizen (optional)</string>
|
<string name="send_notes_hint">Private Notizen (optional)</string>
|
||||||
@@ -324,9 +323,9 @@
|
|||||||
|
|
||||||
<string name="fab_restore_ledger">Wallet mit Ledger Nano S wiederherstellen</string>
|
<string name="fab_restore_ledger">Wallet mit Ledger Nano S wiederherstellen</string>
|
||||||
|
|
||||||
<string name="progress_ledger_progress">Kommunikation with Ledger</string>
|
<string name="progress_ledger_progress">Kommunikation mit Ledger</string>
|
||||||
<string name="progress_ledger_confirm">Bestätigung auf Ledger benötigt!</string>
|
<string name="progress_ledger_confirm">Bestätigung auf Ledger benötigt!</string>
|
||||||
<string name="progress_ledger_lookahead">Abrufen von Subaddressen</string>
|
<string name="progress_ledger_lookahead">Abrufen von Subadressen</string>
|
||||||
<string name="progress_ledger_verify">Prüfe Schlüssel</string>
|
<string name="progress_ledger_verify">Prüfe Schlüssel</string>
|
||||||
<string name="progress_ledger_opentx">Mache verrückte Mathe</string>
|
<string name="progress_ledger_opentx">Mache verrückte Mathe</string>
|
||||||
<string name="progress_ledger_mlsag">Berechne ein paar Hashwerte</string>
|
<string name="progress_ledger_mlsag">Berechne ein paar Hashwerte</string>
|
||||||
@@ -338,6 +337,14 @@
|
|||||||
<string name="toast_ledger_attached">%1$s angesteckt</string>
|
<string name="toast_ledger_attached">%1$s angesteckt</string>
|
||||||
<string name="toast_ledger_detached">%1$s abgesteckt</string>
|
<string name="toast_ledger_detached">%1$s abgesteckt</string>
|
||||||
|
|
||||||
|
<string name="receive_desc_hint">Beschreibung (optional)</string>
|
||||||
|
|
||||||
|
<string name="send_address_not_openalias">OpenAlias Adresse nicht verfügbar</string>
|
||||||
|
<string name="send_address_openalias">OpenAlias sicher ✔</string>
|
||||||
|
<string name="send_address_resolve_openalias">Löse OpenAlias auf…</string>
|
||||||
|
<string name="send_address_no_dnssec">OpenAlias ohne DNSSEC - Adresse kann gefälscht sein!</string>
|
||||||
|
<string name="send_address_hint">Empfänger XMR/BTC Adresse oder OpenAlias</string>
|
||||||
|
|
||||||
<string name="progress_nfc_write">Writing Tag</string>
|
<string name="progress_nfc_write">Writing Tag</string>
|
||||||
<string name="nfc_write_failed">Writing Tag failed!</string>
|
<string name="nfc_write_failed">Writing Tag failed!</string>
|
||||||
<string name="nfc_write_successful">Writing Tag successful</string>
|
<string name="nfc_write_successful">Writing Tag successful</string>
|
||||||
|
@@ -196,7 +196,6 @@
|
|||||||
|
|
||||||
<string name="send_amount_btc_xmr">%1$s (ενδεικτικό)</string>
|
<string name="send_amount_btc_xmr">%1$s (ενδεικτικό)</string>
|
||||||
|
|
||||||
<string name="send_address_hint">Διεύθυνση XMR ή BTC παραλήπτη</string>
|
|
||||||
<string name="send_paymentid_hint">ID Πληρωμής(Payment ID)(προαιρετικό)</string>
|
<string name="send_paymentid_hint">ID Πληρωμής(Payment ID)(προαιρετικό)</string>
|
||||||
<string name="send_amount_hint">0.00</string>
|
<string name="send_amount_hint">0.00</string>
|
||||||
<string name="send_notes_hint">Προσωπικές σημειώσεις (προαιρετικό)</string>
|
<string name="send_notes_hint">Προσωπικές σημειώσεις (προαιρετικό)</string>
|
||||||
@@ -346,4 +345,12 @@
|
|||||||
<string name="nfc_tag_read_what">I don\'t know what you want!</string>
|
<string name="nfc_tag_read_what">I don\'t know what you want!</string>
|
||||||
<string name="nfc_tag_read_success">Reading Tag successful</string>
|
<string name="nfc_tag_read_success">Reading Tag successful</string>
|
||||||
<string name="nfc_tag_tap">NFC Available!</string>
|
<string name="nfc_tag_tap">NFC Available!</string>
|
||||||
|
|
||||||
|
<string name="receive_desc_hint">Description (optional)</string>
|
||||||
|
|
||||||
|
<string name="send_address_not_openalias">OpenAlias address not available</string>
|
||||||
|
<string name="send_address_openalias">OpenAlias secure ✔</string>
|
||||||
|
<string name="send_address_resolve_openalias">Resolving OpenAlias…</string>
|
||||||
|
<string name="send_address_no_dnssec">OpenAlias without DNSSEC - address may be spoofed</string>
|
||||||
|
<string name="send_address_hint">Receiver\'s XMR/BTC Address or OpenAlias</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -164,7 +164,6 @@
|
|||||||
<string name="generate_check_address">Introduce una dirección válida</string>
|
<string name="generate_check_address">Introduce una dirección válida</string>
|
||||||
<string name="generate_check_mnemonic">Introduce tu semilla de 25 palabras</string>
|
<string name="generate_check_mnemonic">Introduce tu semilla de 25 palabras</string>
|
||||||
|
|
||||||
<string name="send_address_hint">Dirección XMR o BTC del Destinatario</string>
|
|
||||||
<string name="send_paymentid_hint">ID de Pago (opcional)</string>
|
<string name="send_paymentid_hint">ID de Pago (opcional)</string>
|
||||||
<string name="send_amount_hint">0.00</string>
|
<string name="send_amount_hint">0.00</string>
|
||||||
<string name="send_notes_hint">Notas Privadas (opcional)</string>
|
<string name="send_notes_hint">Notas Privadas (opcional)</string>
|
||||||
@@ -333,4 +332,12 @@
|
|||||||
<string name="nfc_tag_read_what">I don\'t know what you want!</string>
|
<string name="nfc_tag_read_what">I don\'t know what you want!</string>
|
||||||
<string name="nfc_tag_read_success">Reading Tag successful</string>
|
<string name="nfc_tag_read_success">Reading Tag successful</string>
|
||||||
<string name="nfc_tag_tap">NFC Available!</string>
|
<string name="nfc_tag_tap">NFC Available!</string>
|
||||||
|
|
||||||
|
<string name="receive_desc_hint">Description (optional)</string>
|
||||||
|
|
||||||
|
<string name="send_address_not_openalias">OpenAlias address not available</string>
|
||||||
|
<string name="send_address_openalias">OpenAlias secure ✔</string>
|
||||||
|
<string name="send_address_resolve_openalias">Resolving OpenAlias…</string>
|
||||||
|
<string name="send_address_no_dnssec">OpenAlias without DNSSEC - address may be spoofed</string>
|
||||||
|
<string name="send_address_hint">Receiver\'s XMR/BTC Address or OpenAlias</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -224,7 +224,6 @@
|
|||||||
|
|
||||||
<string name="send_amount_btc_xmr">%1$s (indicatif)</string>
|
<string name="send_amount_btc_xmr">%1$s (indicatif)</string>
|
||||||
|
|
||||||
<string name="send_address_hint">Adresse XMR ou BTC du Destinataire</string>
|
|
||||||
<string name="send_paymentid_hint">ID de Paiement (optionnel)</string>
|
<string name="send_paymentid_hint">ID de Paiement (optionnel)</string>
|
||||||
<string name="send_amount_hint">0.00</string>
|
<string name="send_amount_hint">0.00</string>
|
||||||
<string name="send_notes_hint">Notes Privées (optionnelles)</string>
|
<string name="send_notes_hint">Notes Privées (optionnelles)</string>
|
||||||
@@ -349,4 +348,12 @@
|
|||||||
|
|
||||||
<string name="menu_language">Language</string>
|
<string name="menu_language">Language</string>
|
||||||
<string name="language_system_default">Use System Language</string>
|
<string name="language_system_default">Use System Language</string>
|
||||||
|
|
||||||
|
<string name="receive_desc_hint">Description (optional)</string>
|
||||||
|
|
||||||
|
<string name="send_address_not_openalias">OpenAlias address not available</string>
|
||||||
|
<string name="send_address_openalias">OpenAlias secure ✔</string>
|
||||||
|
<string name="send_address_resolve_openalias">Resolving OpenAlias…</string>
|
||||||
|
<string name="send_address_no_dnssec">OpenAlias without DNSSEC - address may be spoofed</string>
|
||||||
|
<string name="send_address_hint">Receiver\'s XMR/BTC Address or OpenAlias</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -222,7 +222,6 @@
|
|||||||
|
|
||||||
<string name="send_amount_btc_xmr">%1$s (előrejelzés)</string>
|
<string name="send_amount_btc_xmr">%1$s (előrejelzés)</string>
|
||||||
|
|
||||||
<string name="send_address_hint">Kedvezményezett XMR vagy BTC címe</string>
|
|
||||||
<string name="send_paymentid_hint">Fizetési azonosító (opcionális)</string>
|
<string name="send_paymentid_hint">Fizetési azonosító (opcionális)</string>
|
||||||
<string name="send_amount_hint">0.00</string>
|
<string name="send_amount_hint">0.00</string>
|
||||||
<string name="send_notes_hint">Privát közlemény (opcionális)</string>
|
<string name="send_notes_hint">Privát közlemény (opcionális)</string>
|
||||||
@@ -347,4 +346,12 @@
|
|||||||
<string name="nfc_tag_read_what">Nem tudom, mit akarsz!</string>
|
<string name="nfc_tag_read_what">Nem tudom, mit akarsz!</string>
|
||||||
<string name="nfc_tag_read_success">Sikeres címkeolvasás</string>
|
<string name="nfc_tag_read_success">Sikeres címkeolvasás</string>
|
||||||
<string name="nfc_tag_tap">NFC elérhető!</string>
|
<string name="nfc_tag_tap">NFC elérhető!</string>
|
||||||
|
|
||||||
|
<string name="receive_desc_hint">Description (optional)</string>
|
||||||
|
|
||||||
|
<string name="send_address_not_openalias">OpenAlias address not available</string>
|
||||||
|
<string name="send_address_openalias">OpenAlias secure ✔</string>
|
||||||
|
<string name="send_address_resolve_openalias">Resolving OpenAlias…</string>
|
||||||
|
<string name="send_address_no_dnssec">OpenAlias without DNSSEC - address may be spoofed</string>
|
||||||
|
<string name="send_address_hint">Receiver\'s XMR/BTC Address or OpenAlias</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -223,7 +223,6 @@
|
|||||||
|
|
||||||
<string name="send_amount_btc_xmr">%1$s (indicativo)</string>
|
<string name="send_amount_btc_xmr">%1$s (indicativo)</string>
|
||||||
|
|
||||||
<string name="send_address_hint">Indirizzo XMR o BTC del ricevente</string>
|
|
||||||
<string name="send_paymentid_hint">ID pagamento (opzionale)</string>
|
<string name="send_paymentid_hint">ID pagamento (opzionale)</string>
|
||||||
<string name="send_amount_hint">0,00</string>
|
<string name="send_amount_hint">0,00</string>
|
||||||
<string name="send_notes_hint">Note private (opzionali)</string>
|
<string name="send_notes_hint">Note private (opzionali)</string>
|
||||||
@@ -348,4 +347,12 @@
|
|||||||
<string name="nfc_tag_read_what">I don\'t know what you want!</string>
|
<string name="nfc_tag_read_what">I don\'t know what you want!</string>
|
||||||
<string name="nfc_tag_read_success">Reading Tag successful</string>
|
<string name="nfc_tag_read_success">Reading Tag successful</string>
|
||||||
<string name="nfc_tag_tap">NFC Available!</string>
|
<string name="nfc_tag_tap">NFC Available!</string>
|
||||||
|
|
||||||
|
<string name="receive_desc_hint">Description (optional)</string>
|
||||||
|
|
||||||
|
<string name="send_address_not_openalias">OpenAlias address not available</string>
|
||||||
|
<string name="send_address_openalias">OpenAlias secure ✔</string>
|
||||||
|
<string name="send_address_resolve_openalias">Resolving OpenAlias…</string>
|
||||||
|
<string name="send_address_no_dnssec">OpenAlias without DNSSEC - address may be spoofed</string>
|
||||||
|
<string name="send_address_hint">Receiver\'s XMR/BTC Address or OpenAlias</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
<string name="menu_rename">Gi nytt navn …</string>
|
<string name="menu_rename">Gi nytt navn …</string>
|
||||||
<string name="menu_archive">Arkiver</string>
|
<string name="menu_archive">Arkiver</string>
|
||||||
<string name="menu_backup">Backup</string>
|
<string name="menu_backup">Backup</string>
|
||||||
<string name="menu_changepw">[Forandre passord]</string>
|
<string name="menu_changepw">[Forandre passord]</string>
|
||||||
|
|
||||||
<string name="password_weak">Fortsett å skrive …</string>
|
<string name="password_weak">Fortsett å skrive …</string>
|
||||||
<string name="password_fair">Meh …</string>
|
<string name="password_fair">Meh …</string>
|
||||||
@@ -96,15 +96,15 @@
|
|||||||
<string name="archive_progress">Arkivering pågår</string>
|
<string name="archive_progress">Arkivering pågår</string>
|
||||||
<string name="rename_progress">Nytt navn gis</string>
|
<string name="rename_progress">Nytt navn gis</string>
|
||||||
<string name="open_progress">Sjekker daemon-tilkobling</string>
|
<string name="open_progress">Sjekker daemon-tilkobling</string>
|
||||||
<string name="changepw_progress">[Passordforandring i gang]</string>
|
<string name="changepw_progress">[Passordforandring i gang]</string>
|
||||||
|
|
||||||
<string name="service_progress">Gjør ting ferdig …\nDette kan ta si tid!</string>
|
<string name="service_progress">Gjør ting ferdig …\nDette kan ta si tid!</string>
|
||||||
|
|
||||||
<string name="backup_failed">Backup feila!</string>
|
<string name="backup_failed">Backup feila!</string>
|
||||||
<string name="archive_failed">Arkivering feila!</string>
|
<string name="archive_failed">Arkivering feila!</string>
|
||||||
<string name="rename_failed">Kunne ikke gi nytt navn!</string>
|
<string name="rename_failed">Kunne ikke gi nytt navn!</string>
|
||||||
<string name="changepw_failed">[Passordforandring feila!]</string>
|
<string name="changepw_failed">[Passordforandring feila!]</string>
|
||||||
<string name="changepw_success">[Passord forandra]</string>
|
<string name="changepw_success">[Passord forandra]</string>
|
||||||
|
|
||||||
<string name="label_daemon">Node</string>
|
<string name="label_daemon">Node</string>
|
||||||
<string name="prompt_daemon">([<bruker>:<pass>@]<daemon>[:<port>])</string>
|
<string name="prompt_daemon">([<bruker>:<pass>@]<daemon>[:<port>])</string>
|
||||||
@@ -127,8 +127,8 @@
|
|||||||
|
|
||||||
<string name="prompt_rename">Gi nytt navn til %1$s</string>
|
<string name="prompt_rename">Gi nytt navn til %1$s</string>
|
||||||
|
|
||||||
<string name="prompt_changepw">[Nytt passord for %1$s]</string>
|
<string name="prompt_changepw">[Nytt passord for %1$s]</string>
|
||||||
<string name="prompt_changepwB">[Gjenta passord for %1$s]</string>
|
<string name="prompt_changepwB">[Gjenta passord for %1$s]</string>
|
||||||
<string name="prompt_password">Passord for %1$s</string>
|
<string name="prompt_password">Passord for %1$s</string>
|
||||||
<string name="prompt_fingerprint_auth">[You can also open wallet using fingerprint.\nPlease touch sensor.]</string>
|
<string name="prompt_fingerprint_auth">[You can also open wallet using fingerprint.\nPlease touch sensor.]</string>
|
||||||
<string name="prompt_send_password">Bekreft passord</string>
|
<string name="prompt_send_password">Bekreft passord</string>
|
||||||
@@ -221,7 +221,6 @@
|
|||||||
|
|
||||||
<string name="send_amount_btc_xmr">%1$s (veiledende)</string>
|
<string name="send_amount_btc_xmr">%1$s (veiledende)</string>
|
||||||
|
|
||||||
<string name="send_address_hint">Mottakers BTC eller XMR adresse</string>
|
|
||||||
<string name="send_paymentid_hint">Betalings-ID (valgfritt)</string>
|
<string name="send_paymentid_hint">Betalings-ID (valgfritt)</string>
|
||||||
<string name="send_amount_hint">0,00</string>
|
<string name="send_amount_hint">0,00</string>
|
||||||
<string name="send_notes_hint">Privat notat (valgfritt)</string>
|
<string name="send_notes_hint">Privat notat (valgfritt)</string>
|
||||||
@@ -346,4 +345,12 @@
|
|||||||
<string name="nfc_tag_read_what">I don\'t know what you want!</string>
|
<string name="nfc_tag_read_what">I don\'t know what you want!</string>
|
||||||
<string name="nfc_tag_read_success">Reading Tag successful</string>
|
<string name="nfc_tag_read_success">Reading Tag successful</string>
|
||||||
<string name="nfc_tag_tap">NFC Available!</string>
|
<string name="nfc_tag_tap">NFC Available!</string>
|
||||||
|
|
||||||
|
<string name="receive_desc_hint">Description (optional)</string>
|
||||||
|
|
||||||
|
<string name="send_address_not_openalias">OpenAlias address not available</string>
|
||||||
|
<string name="send_address_openalias">OpenAlias secure ✔</string>
|
||||||
|
<string name="send_address_resolve_openalias">Resolving OpenAlias…</string>
|
||||||
|
<string name="send_address_no_dnssec">OpenAlias without DNSSEC - address may be spoofed</string>
|
||||||
|
<string name="send_address_hint">Receiver\'s XMR/BTC Address or OpenAlias</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user