diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 1c7c6d4..a73eb7c 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -190,7 +190,7 @@ void MainWindow::setupSettingsModal() { void MainWindow::donate() { // Set up a donation to me :) - ui->Address1->setText("zcEgrceTwvoiFdEvPWcsJHAMrpLsprMF6aRJiQa3fan5ZphyXLPuHghnEPrEPRoEVzUy65GnMVyCTRdkT6BYBepnXh6NBYs"); + ui->Address1->setText(Utils::getDonationAddr()); ui->Address1->setCursorPosition(0); ui->Amount1->setText("0.01"); diff --git a/src/utils.cpp b/src/utils.cpp index 2823a31..45ec617 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -12,6 +12,13 @@ const QString Utils::getTokenName() { } } +const QString Utils::getDonationAddr() { + if (Settings::getInstance()->isTestnet()) + return "tmP1JL19JyJh3jPMUbfovk4W67jB7VJWybu"; + else + return "t1KfJJrSuVYmnNLrw7EZHRv1kZY3zdGGLyb"; +} + // Get the dev fee address based on the transaction const QString Utils::getDevAddr(Tx tx) { auto testnetAddrLookup = [=] (const QString& addr) -> QString { diff --git a/src/utils.h b/src/utils.h index c13b3e0..5964e75 100644 --- a/src/utils.h +++ b/src/utils.h @@ -13,6 +13,7 @@ public: static const QString getTokenName(); static const QString getDevAddr(Tx tx); + static const QString getDonationAddr(); static double getMinerFee(); static double getDevFee();