Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

fix/wallet

- Removed address Count
+ Added 1 COIN = XX USD/CAD/ETC
+ Hide bitcoin value column in wallet page
  • Loading branch information...
Stoyvo committed Feb 20, 2015
1 parent 2fce624 commit 787038117a629e73643500274e7299daac887063
Showing with 24 additions and 21 deletions.
  1. +1 −1 includes/classes/wallets.php
  2. +20 −17 js/dashboard/Wallet.js
  3. +3 −3 wallet.php
@@ -88,9 +88,9 @@ public function getUpdate() {
'coin_balance' => str_replace('.00000000', '', number_format($coinBalance, 8, '.', ',')),
'coin_price' => str_replace('.00000000', '', $coinPrice),
'coin_code' => 'BTC',
'coin_value' => number_format($fiatPrice, 4, '.', ','),
'fiat_balance' => number_format($fiatBalance, 2, '.', ','),
'fiat_code' => $wallet['fiat'],
'total_addresses' => count($wallet['addresses']),
'addresses' => $walletAddressData,
);
}
@@ -5,16 +5,17 @@
=======================================================*/

var Wallet = function (walletId) {
this.id = walletId
this.currency = 'CDN'
this.balance = 0
this.btc = 0
this.btc_code = 'BTC'
this.fiat = 0
this.fiat_code = 0
this.currency_code = 0
this.total_addresses = 0
this.label = 'money'
this.id = walletId
this.label = ''
this.currency = 'bitcoin'
this.currency_balance = 0
this.currency_code = 'BTC'
this.coin_balance = 0
this.coin_code = 'BTC'
this.coin_price = 0
this.coin_value = 0
this.fiat_balance = 0
this.fiat_code = 'USD'
}

/*----- End of Wallet Class/Object/Constructor ------*/
@@ -31,10 +32,10 @@
this.currency_code = walletObj.currency_code
this.coin_balance = walletObj.coin_balance
this.coin_code = walletObj.coin_code
this.coin_price = walletObj.coin_price
this.coin_price = walletObj.coin_price
this.coin_value = walletObj.coin_value
this.fiat_balance = walletObj.fiat_balance
this.fiat_code = walletObj.fiat_code
this.total_addresses = walletObj.total_addresses

return this._buildStatusHtml()
}
@@ -53,13 +54,15 @@
'<span class="green">' + this.currency_balance + ' ' + this.currency_code + '</span>';

if (this.currency_code != this.coin_code) {
output += '<span class="address-label">in ' + '<b>' + this.total_addresses + '</b> address(es)</span>' +
'<span class="blue">' + this.fiat_balance + ' ' + this.fiat_code + '</span>' +
output += '<span class="blue">' + this.fiat_balance + ' ' + this.fiat_code + '</span>' +
'<span class="address-label">' + this.coin_balance + ' ' + this.coin_code +' @ (' + this.coin_price + ' ' + this.coin_code +')</span>' +
'<span class="address-label"></span>';
} else {
'<span class="address-label">1 ' + this.currency_code + ' = ' + this.coin_value + ' ' + this.fiat_code + '</span>';
} else if (this.currency_code == this.coin_code) {
output += '<span class="blue">' + this.fiat_balance + ' ' + this.fiat_code + '</span>' +
'<span class="address-label">in ' + '<b>' + this.total_addresses + '</b> address(es)</span>';
'<span class="address-label">1 ' + this.currency_code + ' = ' + this.coin_value + ' ' + this.fiat_code + '</span>' +
'<span class="address-label">&nbsp;</span>';
} else {
output += '<span class="blue">' + this.fiat_balance + ' ' + this.fiat_code + '</span>';
}

output += '</div>' +
@@ -54,7 +54,7 @@
<th>Address Name</th>
<th>Balance</th>
<th>Fiat ( <?php echo $wallet['fiat_code'] ?> )</th>
<th>Coin ( <?php echo $wallet['coin_code'] ?> )</th>
<?php if ($wallet['currency_code'] != $wallet['coin_code']) { ?><th>Coin ( <?php echo $wallet['coin_code'] ?> )</th><?php } ?>
<th>Address / Public Key</th>
<th></th>
</tr>
@@ -68,7 +68,7 @@
</td>
<td><?php echo $addressData['balance']; ?> <img src="images/coin/<?php echo $wallet['currency'] ?>.png" /> <?php echo $wallet['currency_code'] ?></td>
<td><?php echo $addressData['fiat_balance']; ?> <img src="images/coin/fiat.png" /> <?php echo $wallet['fiat_code']; ?></td>
<td><?php echo $addressData['coin_balance']; ?> <img src="images/coin/bitcoin.png" /> <?php echo $wallet['coin_code']; ?></td>
<?php if ($wallet['currency_code'] != $wallet['coin_code']) { ?><td><?php echo $addressData['coin_balance']; ?> <img src="images/coin/bitcoin.png" /> <?php echo $wallet['coin_code']; ?></td><?php } ?>
<td data-type="address">
<span><?php echo $addressKey; ?></span>
<input type="hidden" name="address[<?php echo $addressData['id']; ?>][address]" class="form-control" value="<?php echo $addressKey; ?>" placeholder="Address" />
@@ -79,7 +79,7 @@
<tr>
<td colspan="2" data-type="label"><input type="text" name="label" class="form-control" placeholder="Label"></td>
<td>0.00 <img src="images/coin/fiat.png" /> <?php echo $wallet['fiat_code']; ?></td>
<td>0 <img src="images/coin/bitcoin.png" /> <?php echo $wallet['coin_code']; ?></td>
<?php if ($wallet['currency_code'] != $wallet['coin_code']) { ?><td>0 <img src="images/coin/bitcoin.png" /> <?php echo $wallet['coin_code']; ?></td><?php } ?>
<td data-type="address"><input type="text" name="address" class="form-control" placeholder="Address"></td>
<td><a class="addAddress"><span class="blue"><i class="icon icon-save-floppy"></i></span></a></td>
</tr>

0 comments on commit 7870381

Please sign in to comment.
You can’t perform that action at this time.