UX: just update address balance that received fund.
Changed rootscope for scope to control address page. Fixes: not alert when address change receive fund
This commit is contained in:
parent
3f8612ee0c
commit
9428ea55d5
4 changed files with 80 additions and 26 deletions
|
|
@ -31,7 +31,17 @@ angular.module('copay.header').controller('HeaderController',
|
|||
|
||||
$rootScope.$watch('receivedFund', function(receivedFund) {
|
||||
if (receivedFund) {
|
||||
$notification.funds('Received fund', 'on ' + receivedFund[1], receivedFund);
|
||||
var currentAddr;
|
||||
for(var i=0;i<$rootScope.addrInfos.length;i++) {
|
||||
var addrinfo = $rootScope.addrInfos[i];
|
||||
if (addrinfo.address.toString() == receivedFund[1] && !addrinfo.isChange) {
|
||||
currentAddr = addrinfo.address.toString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (currentAddr) {
|
||||
$notification.funds('Received fund', currentAddr, receivedFund);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue