upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui.cpp14
-rw-r--r--src/walletcmd.cpp6
2 files changed, 12 insertions, 8 deletions
diff --git a/src/gui.cpp b/src/gui.cpp
index 81dd8e0..672f0ff 100644
--- a/src/gui.cpp
+++ b/src/gui.cpp
@@ -175,7 +175,11 @@ static bool PathIsInsideDataDir(const std::string& strPath)
175 175
176static void SetDefaultBackupPath() 176static void SetDefaultBackupPath()
177{ 177{
178 std::string path = DefaultBackupDir() + "/wallet-backup-" + BackupTimeSuffix() + ".dat"; 178 // Match the extension to the live backend: BackupWallet copies wallet.sqlite
179 // under the SQLite backend and wallet.dat under Berkeley DB, so a ".dat"
180 // default name would put SQLite contents in a misleadingly-named file.
181 const char* pszExt = WalletSQLiteRuntimeActive() ? ".sqlite" : ".dat";
182 std::string path = DefaultBackupDir() + "/wallet-backup-" + BackupTimeSuffix() + pszExt;
179 strncpy(g_backupPath, path.c_str(), sizeof(g_backupPath)-1); 183 strncpy(g_backupPath, path.c_str(), sizeof(g_backupPath)-1);
180 g_backupPath[sizeof(g_backupPath)-1] = '\0'; 184 g_backupPath[sizeof(g_backupPath)-1] = '\0';
181} 185}
@@ -1257,11 +1261,11 @@ static void DrawWalletSafetyDialog()
1257 } 1261 }
1258 ImGui::Text("Phrase-backed spendable balance: %s BTF", 1262 ImGui::Text("Phrase-backed spendable balance: %s BTF",
1259 FmtMoney(g_recoveryAudit.nRecoverableCredit).c_str()); 1263 FmtMoney(g_recoveryAudit.nRecoverableCredit).c_str());
1260 ImGui::Text("Wallet.dat-only spendable balance: %s BTF", 1264 ImGui::Text("Not phrase-backed spendable balance: %s BTF",
1261 FmtMoney(g_recoveryAudit.nLegacyCredit).c_str()); 1265 FmtMoney(g_recoveryAudit.nLegacyCredit).c_str());
1262 ImGui::Text("Phrase-backed immature mining rewards: %s BTF", 1266 ImGui::Text("Phrase-backed immature mining rewards: %s BTF",
1263 FmtMoney(g_recoveryAudit.nRecoverableImmatureCredit).c_str()); 1267 FmtMoney(g_recoveryAudit.nRecoverableImmatureCredit).c_str());
1264 ImGui::Text("Wallet.dat-only immature mining rewards: %s BTF", 1268 ImGui::Text("Not phrase-backed immature mining rewards: %s BTF",
1265 FmtMoney(g_recoveryAudit.nLegacyImmatureCredit).c_str()); 1269 FmtMoney(g_recoveryAudit.nLegacyImmatureCredit).c_str());
1266 if (!g_recoveryAudit.fDeriveComplete) 1270 if (!g_recoveryAudit.fDeriveComplete)
1267 { 1271 {
@@ -1275,8 +1279,8 @@ static void DrawWalletSafetyDialog()
1275 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.75f, 0.25f, 1.0f)); 1279 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.75f, 0.25f, 1.0f));
1276 ImGui::TextWrapped( 1280 ImGui::TextWrapped(
1277 "Some coins are on keys the phrase does not reproduce. " 1281 "Some coins are on keys the phrase does not reproduce. "
1278 "Keep wallet.dat backups until that balance has been moved to a " 1282 "Keep a file backup of this wallet until that balance has been "
1279 "phrase-backed address."); 1283 "moved to a phrase-backed address.");
1280 ImGui::PopStyleColor(); 1284 ImGui::PopStyleColor();
1281 } 1285 }
1282 else if (HaveHDSeed() && 1286 else if (HaveHDSeed() &&
diff --git a/src/walletcmd.cpp b/src/walletcmd.cpp
index 1f1fd27..f59fc0c 100644
--- a/src/walletcmd.cpp
+++ b/src/walletcmd.cpp
@@ -429,13 +429,13 @@ int CmdRecoveryAudit()
429 } 429 }
430 printf(" covered by recovery phrase: %s BTF (%d transaction(s))\n", 430 printf(" covered by recovery phrase: %s BTF (%d transaction(s))\n",
431 FormatMoney(audit.nRecoverableCredit).c_str(), audit.nRecoverableTx); 431 FormatMoney(audit.nRecoverableCredit).c_str(), audit.nRecoverableTx);
432 printf(" wallet.dat-only balance: %s BTF (%d transaction(s))\n", 432 printf(" not phrase-backed balance: %s BTF (%d transaction(s))\n",
433 FormatMoney(audit.nLegacyCredit).c_str(), audit.nLegacyTx); 433 FormatMoney(audit.nLegacyCredit).c_str(), audit.nLegacyTx);
434 printf(" immature mining rewards: %s BTF\n", FormatMoney(nImmatureTotal).c_str()); 434 printf(" immature mining rewards: %s BTF\n", FormatMoney(nImmatureTotal).c_str());
435 printf(" phrase-backed immature: %s BTF (%d transaction(s))\n", 435 printf(" phrase-backed immature: %s BTF (%d transaction(s))\n",
436 FormatMoney(audit.nRecoverableImmatureCredit).c_str(), 436 FormatMoney(audit.nRecoverableImmatureCredit).c_str(),
437 audit.nRecoverableImmatureTx); 437 audit.nRecoverableImmatureTx);
438 printf(" wallet.dat-only immature: %s BTF (%d transaction(s))\n", 438 printf(" not phrase-backed immature: %s BTF (%d transaction(s))\n",
439 FormatMoney(audit.nLegacyImmatureCredit).c_str(), 439 FormatMoney(audit.nLegacyImmatureCredit).c_str(),
440 audit.nLegacyImmatureTx); 440 audit.nLegacyImmatureTx);
441 441
@@ -457,7 +457,7 @@ int CmdRecoveryAudit()
457 { 457 {
458 printf("\n"); 458 printf("\n");
459 printf("Warning: some coins are on keys the phrase does not reproduce.\n"); 459 printf("Warning: some coins are on keys the phrase does not reproduce.\n");
460 printf("Keep wallet.dat backups until that balance has been moved to a phrase-backed address.\n"); 460 printf("Keep a file backup of this wallet until that balance has been moved to a phrase-backed address.\n");
461 fflush(stdout); 461 fflush(stdout);
462 return 2; 462 return 2;
463 } 463 }