mirror of
https://codeberg.org/r4v3r23/mysu.git
synced 2024-09-20 00:50:35 +00:00
Fix offset issue with new wallets, create 0.4.0.1
This commit is contained in:
parent
82ed0f4409
commit
36be2a6613
2 changed files with 6 additions and 5 deletions
|
@ -9,8 +9,8 @@ android {
|
||||||
applicationId "net.mynero.wallet"
|
applicationId "net.mynero.wallet"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 33
|
targetSdkVersion 33
|
||||||
versionCode 400
|
versionCode 40001
|
||||||
versionName "0.4.0 'Fluorine Fermi'"
|
versionName "0.4.0.1 'Fluorine Fermi'"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
|
|
|
@ -225,6 +225,10 @@ public class OnboardingFragment extends Fragment {
|
||||||
long restoreHeight = getNewRestoreHeight();
|
long restoreHeight = getNewRestoreHeight();
|
||||||
File walletFile = new File(mainActivity.getApplicationInfo().dataDir, Constants.WALLET_NAME);
|
File walletFile = new File(mainActivity.getApplicationInfo().dataDir, Constants.WALLET_NAME);
|
||||||
Wallet wallet = null;
|
Wallet wallet = null;
|
||||||
|
if(!offset.isEmpty()) {
|
||||||
|
PrefService.getInstance().edit().putBoolean(Constants.PREF_USES_OFFSET, true).apply();
|
||||||
|
}
|
||||||
|
|
||||||
if (walletSeed.isEmpty()) {
|
if (walletSeed.isEmpty()) {
|
||||||
Wallet tmpWallet = createTempWallet(mainActivity.getApplicationInfo().dataDir); //we do this to get seed, then recover wallet so we can use seed offset
|
Wallet tmpWallet = createTempWallet(mainActivity.getApplicationInfo().dataDir); //we do this to get seed, then recover wallet so we can use seed offset
|
||||||
wallet = WalletManager.getInstance().recoveryWallet(walletFile, walletPassword, tmpWallet.getSeed(""), offset, restoreHeight);
|
wallet = WalletManager.getInstance().recoveryWallet(walletFile, walletPassword, tmpWallet.getSeed(""), offset, restoreHeight);
|
||||||
|
@ -236,9 +240,6 @@ public class OnboardingFragment extends Fragment {
|
||||||
if (!restoreHeightText.isEmpty()) {
|
if (!restoreHeightText.isEmpty()) {
|
||||||
restoreHeight = Long.parseLong(restoreHeightText);
|
restoreHeight = Long.parseLong(restoreHeightText);
|
||||||
}
|
}
|
||||||
if(!offset.isEmpty()) {
|
|
||||||
PrefService.getInstance().edit().putBoolean(Constants.PREF_USES_OFFSET, true).apply();
|
|
||||||
}
|
|
||||||
wallet = WalletManager.getInstance().recoveryWallet(walletFile, walletPassword, walletSeed, offset, restoreHeight);
|
wallet = WalletManager.getInstance().recoveryWallet(walletFile, walletPassword, walletSeed, offset, restoreHeight);
|
||||||
}
|
}
|
||||||
Wallet.Status walletStatus = wallet.getStatus();
|
Wallet.Status walletStatus = wallet.getStatus();
|
||||||
|
|
Loading…
Reference in a new issue