Skip to content

Commit

Permalink
Merge pull request MPOS#1741 from iAmShorty/check-wallet-accounts
Browse files Browse the repository at this point in the history
Check wallet accounts
  • Loading branch information
TheSerapher committed Feb 12, 2014
2 parents ce89286 + 3b53a3b commit 8fd0af6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions public/include/admin_checks.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,21 @@
if (!$bitcoin->validateaddress($config['coldwallet']['address']))
$error[] = "Your cold wallet address is <u>SET and INVALID</u>";
}

// check if there is more than one account set on wallet
$accounts = $bitcoin->listaccounts();
if (count($accounts) > 1) {
$error[] = "There are " . count($accounts) . " Accounts set in local Wallet. Please ensure that there is enough Balance on the Default Account to avoid issues with payouts done with sendtoaddress or sendmany!!!";
}
foreach ($accounts as $account => $balance) {
if ($account == "") { $account = "Default"; }
if ($balance <= 0) {
$error[] = "Account: <u>" . $account . "</u> has liquid funds to pay your miners but it will not be used!";
} else {
$enotice[] = "Account: <u>" . $account . "</u> has liquid funds to pay your miners! - " . $balance . " " . $config['currency'];
}
}

}
} catch (Exception $e) {
}
Expand Down

0 comments on commit 8fd0af6

Please sign in to comment.