diff --git a/README.md b/README.md index abc03d9..6877e20 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,18 @@ piWallet ======== -piWallet is a secure opensource online altcoin wallet that works with practically any altcoin. +piWallet is a secure opensource online altcoin wallet that works with practically any altcoin. piWallet uses PHP, mySQL, JavaScript and Bootstrap. Setup: https://github.com/johnathanmartin/piWallet/wiki Bitcoin Talk: https://bitcointalk.org/index.php?topic=911212 +Please be cautious when paying others to install piWallet for you, I'd be willing to install for a negotiable fee. Please send me an email. jmartin@fitbobcat.com + Whats New: + +- Manual User Reserve + - QR Codes use a local generation URL - Multilanguage support for over 90% of text - Currently supported languages include English, Greek, Mandarin, Hindi, Italian, Portuguese, Spanish, and Tagalog. @@ -18,8 +23,6 @@ Whats New: - Google 2 Factor Auth -- [Support Pin](https://github.com/johnathanmartin/piWallet/wiki/Support-Pin) - Planned Features: - Have QR Codes open in lightbox instead of new tab @@ -28,6 +31,6 @@ Planned Features: - Control of Private Keys -Donate: +More Information: -1LXEEZefwFKBC86oLndPuu7fLJre97Xtyu +Created by Johnathan Martin of fitbobcat.com diff --git a/common.php b/common.php index 3d56df7..d4e66ae 100644 --- a/common.php +++ b/common.php @@ -1,4 +1,8 @@ getBalance($user_session) - $fee; - if (!empty($_POST['jsaction'])) { + $noresbal = $client->getBalance($user_session); + $resbalance = $client->getBalance($user_session) - $reserve; + if ($resbalance < 0) { + $balance = $noresbal; //Don't show the user a negitive balance if they have no coins with us + } else { + $balance = $resbalance; + } + if (!empty($_POST['jsaction'])) { $json = array(); switch ($_POST['jsaction']) { case "new_address": $client->getnewaddress($user_session); $json['success'] = true; $json['message'] = "A new address was added to your wallet"; - $json['balance'] = $client->getBalance($user_session) - $fee; + $jsonbal = $client->getBalance($user_session); + $jsonbalreserve = $client->getBalance($user_session) - $reserve; + if ($jsonbalreserve < 0) { + $json['balance'] = $jsonbal; + } else { + $json['balance'] = $jsonbalreserve; } + $json['balance'] = $jsonbal; $json['addressList'] = $client->getAddressList($user_session); $json['transactionList'] = $client->getTransactionList($user_session); echo json_encode($json); exit; @@ -43,7 +55,7 @@ $_SESSION['token'] = sha1('@s%a$l£t#'.rand(0,10000)); $json['newtoken'] = $_SESSION['token']; } elseif ($_POST['amount'] > $balance) { - $json['message'] = "Withdrawal amount exceeds your wallet balance"; + $json['message'] = "Withdrawal amount exceeds your wallet balance. Please note the wallet owner has set a reserve fee of $reserve $short."; } else { $withdraw_message = $client->withdraw($user_session, $_POST['address'], (float)$_POST['amount']); $_SESSION['token'] = sha1('@s%a$l£t#'.rand(0,10000));