1
mirror of https://github.com/m2049r/xmrwallet synced 2024-11-30 19:29:35 +01:00

decrease restore height on new wallet

This commit is contained in:
m2049r 2019-07-14 12:49:18 +02:00
parent 6ad423567f
commit 317976b34a
No known key found for this signature in database
GPG Key ID: 4386E69AF260078D

View File

@ -940,8 +940,9 @@ public class LoginActivity extends BaseActivity
@Override @Override
public boolean createWallet(File aFile, String password) { public boolean createWallet(File aFile, String password) {
NodeInfo currentNode = getNode(); NodeInfo currentNode = getNode();
// get it from the connected node if we have one, and go back ca. 4 days
final long restoreHeight = final long restoreHeight =
(currentNode != null) ? currentNode.getHeight() - 20 : -1; (currentNode != null) ? currentNode.getHeight() - 2000 : -1;
Wallet newWallet = WalletManager.getInstance() Wallet newWallet = WalletManager.getInstance()
.createWallet(aFile, password, MNEMONIC_LANGUAGE, restoreHeight); .createWallet(aFile, password, MNEMONIC_LANGUAGE, restoreHeight);
return checkAndCloseWallet(newWallet); return checkAndCloseWallet(newWallet);