Merge pull request #1059 from yemel/feature/change-menu
Refactor menu, split transactions tab into send and history
This commit is contained in:
commit
fe53f1b87c
12 changed files with 235 additions and 209 deletions
|
|
@ -58,7 +58,7 @@ angular.module('copayApp.services')
|
|||
});
|
||||
wallet.on('serverError', function(m) {
|
||||
var message = m || 'The PeerJS server is not responding, please try again';
|
||||
$location.path('addresses');
|
||||
$location.path('receive');
|
||||
root.onErrorDigest($scope, message);
|
||||
});
|
||||
wallet.on('ready', function() {
|
||||
|
|
@ -130,7 +130,7 @@ angular.module('copayApp.services')
|
|||
if ($rootScope.pendingPayment) {
|
||||
$location.path('send');
|
||||
} else {
|
||||
$location.path('addresses');
|
||||
$location.path('receive');
|
||||
}
|
||||
if (!config.disableVideo)
|
||||
video.setOwnPeer(myPeerID, w, handlePeerVideo);
|
||||
|
|
@ -143,9 +143,7 @@ angular.module('copayApp.services')
|
|||
}
|
||||
});
|
||||
w.on('txProposalsUpdated', function(dontDigest) {
|
||||
root.updateTxs({
|
||||
onlyPending: true
|
||||
});
|
||||
root.updateTxs();
|
||||
// give sometime to the tx to propagate.
|
||||
$timeout(function() {
|
||||
root.updateBalance(function() {
|
||||
|
|
@ -238,7 +236,7 @@ angular.module('copayApp.services')
|
|||
root.updateTxs = function(opts) {
|
||||
var w = $rootScope.wallet;
|
||||
if (!w) return;
|
||||
opts = opts || {};
|
||||
opts = opts || $rootScope.txsOpts || {};
|
||||
|
||||
var satToUnit = 1 / config.unitToSatoshi;
|
||||
var myCopayerId = w.getMyCopayerId();
|
||||
|
|
@ -259,7 +257,8 @@ angular.module('copayApp.services')
|
|||
if (!i.finallyRejected && !i.sentTs) {
|
||||
i.isPending = 1;
|
||||
}
|
||||
if (!opts.onlyPending || i.isPending) {
|
||||
|
||||
if (!!opts.pending == !!i.isPending) {
|
||||
var tx = i.builder.build();
|
||||
var outs = [];
|
||||
tx.outs.forEach(function(o) {
|
||||
|
|
@ -283,6 +282,7 @@ angular.module('copayApp.services')
|
|||
});
|
||||
|
||||
$rootScope.txs = txs;
|
||||
$rootScope.txsOpts = opts;
|
||||
if ($rootScope.pendingTxCount < pendingForUs) {
|
||||
$rootScope.txAlertCount = pendingForUs;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue