MCPcopy Create free account
hub / github.com/ElementsProject/elements / backupWallet

Method backupWallet

src/qt/walletview.cpp:214–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214void WalletView::backupWallet()
215{
216 QString filename = GUIUtil::getSaveFileName(this,
217 tr("Backup Wallet"), QString(),
218 //: Name of the wallet data file format.
219 tr("Wallet Data") + QLatin1String(" (*.dat)"), nullptr);
220
221 if (filename.isEmpty())
222 return;
223
224 if (!walletModel->wallet().backupWallet(filename.toLocal8Bit().data())) {
225 Q_EMIT message(tr("Backup Failed"), tr("There was an error trying to save the wallet data to %1.").arg(filename),
226 CClientUIInterface::MSG_ERROR);
227 }
228 else {
229 Q_EMIT message(tr("Backup Successful"), tr("The wallet data was successfully saved to %1.").arg(filename),
230 CClientUIInterface::MSG_INFORMATION);
231 }
232}
233
234void WalletView::changePassphrase()
235{

Callers

nothing calls this directly

Calls 3

getSaveFileNameFunction · 0.85
walletMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected