mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Do not delete the password from the seed
This commit is contained in:
@@ -22,7 +22,7 @@ namespace BTCPayServer.Models.ServerViewModels
|
|||||||
var removedDate = DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ssZ", CultureInfo.InvariantCulture);
|
var removedDate = DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ssZ", CultureInfo.InvariantCulture);
|
||||||
var seedFile = new LndSeedFile
|
var seedFile = new LndSeedFile
|
||||||
{
|
{
|
||||||
wallet_password = "",
|
wallet_password = WalletPassword,
|
||||||
cipher_seed_mnemonic = new List<string> { $"Seed removed on {removedDate}" }
|
cipher_seed_mnemonic = new List<string> { $"Seed removed on {removedDate}" }
|
||||||
};
|
};
|
||||||
var json = JsonConvert.SerializeObject(seedFile);
|
var json = JsonConvert.SerializeObject(seedFile);
|
||||||
@@ -47,7 +47,13 @@ namespace BTCPayServer.Models.ServerViewModels
|
|||||||
{
|
{
|
||||||
var unlockFileContents = File.ReadAllText(lndSeedFilePath);
|
var unlockFileContents = File.ReadAllText(lndSeedFilePath);
|
||||||
var unlockFile = JsonConvert.DeserializeObject<LndSeedFile>(unlockFileContents);
|
var unlockFile = JsonConvert.DeserializeObject<LndSeedFile>(unlockFileContents);
|
||||||
|
#pragma warning disable CA1820 // Test for empty strings using string length
|
||||||
|
if (unlockFile.wallet_password == string.Empty)
|
||||||
|
#pragma warning restore CA1820 // Test for empty strings using string length
|
||||||
|
{
|
||||||
|
// Nicolas stupidinly deleted the password, so we should use the default one here...
|
||||||
|
unlockFile.wallet_password = "hellorockstar";
|
||||||
|
}
|
||||||
if (unlockFile.wallet_password != null)
|
if (unlockFile.wallet_password != null)
|
||||||
{
|
{
|
||||||
return new LndSeedBackupViewModel
|
return new LndSeedBackupViewModel
|
||||||
|
|||||||
Reference in New Issue
Block a user