remove duplicated addresses information
This commit is contained in:
parent
5980248f03
commit
439300743d
2 changed files with 4 additions and 58 deletions
|
|
@ -1,11 +1,10 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('preferencesInformation',
|
angular.module('copayApp.controllers').controller('preferencesInformation',
|
||||||
function($scope, $log, $timeout, $ionicHistory, $ionicScrollDelegate, platformInfo, gettextCatalog, lodash, profileService, configService, $stateParams, walletService, $state) {
|
function($scope, $log, $timeout, $ionicHistory, platformInfo, lodash, profileService, configService, $stateParams, walletService, $state) {
|
||||||
var base = 'xpub';
|
var base = 'xpub';
|
||||||
var wallet = profileService.getWallet($stateParams.walletId);
|
var wallet = profileService.getWallet($stateParams.walletId);
|
||||||
var walletId = wallet.id;
|
var walletId = wallet.id;
|
||||||
|
|
||||||
var config = configService.getSync();
|
var config = configService.getSync();
|
||||||
var b = 1;
|
var b = 1;
|
||||||
$scope.isCordova = platformInfo.isCordova;
|
$scope.isCordova = platformInfo.isCordova;
|
||||||
|
|
@ -25,9 +24,7 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
|
||||||
};
|
};
|
||||||
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
wallet.getMainAddresses({
|
walletService.getMainAddresses(wallet, {}, function(err, addrs) {
|
||||||
doNotVerify: true
|
|
||||||
}, function(err, addrs) {
|
|
||||||
if (err) {
|
if (err) {
|
||||||
$log.warn(err);
|
$log.warn(err);
|
||||||
return;
|
return;
|
||||||
|
|
@ -52,9 +49,9 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
|
||||||
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
}, 1000);
|
});
|
||||||
});
|
});
|
||||||
}, 100);
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.saveBlack = function() {
|
$scope.saveBlack = function() {
|
||||||
|
|
@ -95,29 +92,5 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
|
||||||
$scope.M = c.m;
|
$scope.M = c.m;
|
||||||
$scope.N = c.n;
|
$scope.N = c.n;
|
||||||
$scope.pubKeys = lodash.pluck(c.publicKeyRing, 'xPubKey');
|
$scope.pubKeys = lodash.pluck(c.publicKeyRing, 'xPubKey');
|
||||||
$scope.addrs = null;
|
|
||||||
|
|
||||||
wallet.getMainAddresses({
|
|
||||||
doNotVerify: true
|
|
||||||
}, function(err, addrs) {
|
|
||||||
if (err) {
|
|
||||||
$log.warn(err);
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
var last10 = [],
|
|
||||||
i = 0,
|
|
||||||
e = addrs.pop();
|
|
||||||
while (i++ < 10 && e) {
|
|
||||||
e.path = base + e.path.substring(1);
|
|
||||||
last10.push(e);
|
|
||||||
e = addrs.pop();
|
|
||||||
}
|
|
||||||
$scope.addrs = last10;
|
|
||||||
$timeout(function() {
|
|
||||||
$ionicScrollDelegate.resize();
|
|
||||||
$scope.$apply();
|
|
||||||
}, 10);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -80,38 +80,11 @@
|
||||||
<div class="item" ng-repeat="pk in pubKeys" copy-to-clipboard="pk">
|
<div class="item" ng-repeat="pk in pubKeys" copy-to-clipboard="pk">
|
||||||
<span translate>Copayer {{$index}}</span>
|
<span translate>Copayer {{$index}}</span>
|
||||||
<span class="item-note">
|
<span class="item-note">
|
||||||
<span>Copayer {{$index}}</span>
|
|
||||||
<span>{{pk}}</span>
|
<span>{{pk}}</span>
|
||||||
<span ng-if="$index == 0">({{basePath}})</span>
|
<span ng-if="$index == 0">({{basePath}})</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-show="addrs">
|
|
||||||
<div class="item item-divider" translate>
|
|
||||||
Latest Wallet Addresses
|
|
||||||
</div>
|
|
||||||
<div class="settings-explanation">
|
|
||||||
<div class="settings-description" translate>
|
|
||||||
Only “main” addresses are shown below. This excludes “change” address.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="item" ng-repeat="a in addrs" class="oh" copy-to-clipboard="a.address">
|
|
||||||
<span>{{a.address}}</span>
|
|
||||||
<span class="item-note">{{a.path}} · {{a.createdOn *1000 | amDateFormat:'MMMM Do YYYY, h:mm a' }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="settings-explanation">
|
|
||||||
<div class="settings-description" translate>
|
|
||||||
Please note: due to resource constraints, this list of addresses is not verified locally. A compromised BWS node could return addresses which are not controlled by this wallet.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<button class="button button-standard button-primary" ng-click="scan()" translate>
|
|
||||||
Scan addresses for funds
|
|
||||||
</button>
|
|
||||||
<button class="button button-standard button-primary" ng-show="isCordova" ng-click="sendAddrs()" translate>
|
|
||||||
Send addresses by email
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div ng-show="wallet.balanceByAddress[0]">
|
<div ng-show="wallet.balanceByAddress[0]">
|
||||||
<div class="item item-divider" translate>
|
<div class="item item-divider" translate>
|
||||||
Balance By Address
|
Balance By Address
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue