wallet details refactor
This commit is contained in:
parent
e3076d18ab
commit
8aefbe25b3
9 changed files with 703 additions and 706 deletions
|
|
@ -3,17 +3,6 @@
|
|||
angular.module('copayApp.services').factory('txFormatService', function(bwcService, rateService, configService, lodash) {
|
||||
var root = {};
|
||||
|
||||
|
||||
// // RECEIVE
|
||||
// // Check address
|
||||
// root.isUsed(wallet.walletId, balance.byAddress, function(err, used) {
|
||||
// if (used) {
|
||||
// $log.debug('Address used. Creating new');
|
||||
// $rootScope.$emit('Local/AddressIsUsed');
|
||||
// }
|
||||
// });
|
||||
//
|
||||
|
||||
root.Utils = bwcService.getUtils();
|
||||
|
||||
|
||||
|
|
@ -57,8 +46,8 @@ angular.module('copayApp.services').factory('txFormatService', function(bwcServi
|
|||
};
|
||||
|
||||
root.processTx = function(tx) {
|
||||
if (!tx || tx.action == 'invalid')
|
||||
return tx;
|
||||
if (!tx || tx.action == 'invalid')
|
||||
return tx;
|
||||
|
||||
// New transaction output format
|
||||
if (tx.outputs && tx.outputs.length) {
|
||||
|
|
@ -77,7 +66,7 @@ angular.module('copayApp.services').factory('txFormatService', function(bwcServi
|
|||
}, 0);
|
||||
}
|
||||
tx.toAddress = tx.outputs[0].toAddress;
|
||||
}
|
||||
}
|
||||
|
||||
tx.amountStr = root.formatAmountStr(tx.amount);
|
||||
tx.alternativeAmountStr = root.formatAlternativeStr(tx.amount);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue