add merchant data in tx proposals

This commit is contained in:
Matias Alejo Garcia 2014-11-20 03:10:43 -03:00
commit 088a616736
6 changed files with 77 additions and 82 deletions

View file

@ -362,6 +362,11 @@ angular.module('copayApp.services')
var res = w.getPendingTxProposals();
_.each(res.txs, function(tx) {
root.computeAlternativeAmount(w, tx);
if (tx.merchant) {
var url = tx.merchant.request_url;
var domain = /^(?:https?)?:\/\/([^\/:]+).*$/.exec(url)[1];
tx.merchant.domain = domain;
}
});
$rootScope.txps = res.txs;
if ($rootScope.pendingTxCount < res.pendingForUs) {