diff options
Diffstat (limited to 'src/gui.cpp')
| -rw-r--r-- | src/gui.cpp | 14 |
1 files changed, 9 insertions, 5 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 | ||
| 176 | static void SetDefaultBackupPath() | 176 | static 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() && |