disable Ledger

This commit is contained in:
m2049r 2021-04-19 14:42:27 +02:00
parent 818b16f654
commit c21dc53186
No known key found for this signature in database
GPG Key ID: 4386E69AF260078D
4 changed files with 10 additions and 10 deletions

View File

@ -60,9 +60,6 @@
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
<meta-data
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/usb_device_filter" />
</activity>
<activity
android:name=".onboarding.OnBoardingActivity"

View File

@ -36,7 +36,7 @@ import java.nio.charset.StandardCharsets;
import timber.log.Timber;
public class Ledger {
static final public boolean ENABLED = true;
static final public boolean ENABLED = false;
// 5:20 is same as wallet2.cpp::restore()
static public final int LOOKAHEAD_ACCOUNTS = 5;
static public final int LOOKAHEAD_SUBADDRESSES = 20;

View File

@ -53,6 +53,7 @@ public class LegacyStorageHelper {
public void migrate() {
String addressPrefix = WalletManager.getInstance().addressPrefix();
File[] wallets = srcDir.listFiles((dir, filename) -> filename.endsWith(".keys"));
if (wallets == null) return;
for (File wallet : wallets) {
final String walletName = wallet.getName().substring(0, wallet.getName().length() - ".keys".length());
if (addressPrefix.indexOf(getAddress(walletName).charAt(0)) < 0) {

View File

@ -30,6 +30,7 @@ import androidx.fragment.app.FragmentManager;
import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.dialog.HelpFragment;
import com.m2049r.xmrwallet.ledger.Ledger;
import java.util.ArrayList;
import java.util.List;
@ -52,12 +53,13 @@ public class Notice {
R.string.help_xmrto,
1)
);
notices.add(
new Notice(NOTICE_SHOW_LEDGER,
R.string.info_ledger_enabled,
R.string.help_create_ledger,
1)
);
if (Ledger.ENABLED)
notices.add(
new Notice(NOTICE_SHOW_LEDGER,
R.string.info_ledger_enabled,
R.string.help_create_ledger,
1)
);
}
}