Skip to content

Commit

Permalink
donation addr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapk00 committed Oct 24, 2018
1 parent 6117026 commit 8bb56d7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
7 changes: 7 additions & 0 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions src/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class Utils

static const QString getTokenName();
static const QString getDevAddr(Tx tx);
static const QString getDonationAddr();

static double getMinerFee();
static double getDevFee();
Expand Down

0 comments on commit 8bb56d7

Please sign in to comment.