Skip to content

Commit

Permalink
show derivation path and created on date for addresses with balance
Browse files Browse the repository at this point in the history
  • Loading branch information
qdrs committed Mar 2, 2018
1 parent f274889 commit 49836bf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/js/controllers/addresses.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ angular.module('copayApp.controllers').controller('addressesController', functio
processPaths(withBalance);

$scope.latestUnused = lodash.slice($scope.noBalance, 0, UNUSED_ADDRESS_LIMIT);

var withBalanceDict = lodash.indexBy(withBalance, 'address');
lodash.each(allAddresses, function(a) {
if(withBalanceDict[a.address]) {
withBalanceDict[a.address].createdOn = a.createdOn;
}
});

$scope.latestWithBalance = lodash.slice(withBalance, 0, BALANCE_ADDRESS_LIMIT);

lodash.each(withBalance, function(a) {
Expand Down
5 changes: 4 additions & 1 deletion www/views/addresses.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ <h5 translate>Unused Addresses Limit</h5>

<div class="item" ng-repeat="w in latestWithBalance track by $index" copy-to-clipboard="wallet.coin == 'bch' ? (addressType.type == 'cashaddr' ? 'bitcoincash:' : '') + w.translatedAddresses[addressType.type] : w.address">
{{wallet.coin == 'bch' ? w.translatedAddresses[addressType.type] : w.address}}
<div class="addr-balance">{{w.balanceStr}}</div>
<div class="addr-path">
{{w.path}} {{w.createdOn * 1000 | amDateFormat:'MMMM Do YYYY, hh:mm a'}}
</div>
<div class="addr-balance">{{w.balanceStr}}</div>
</div>
</div>

Expand Down

0 comments on commit 49836bf

Please sign in to comment.