Ensure no floating comma in tx history (wavecrest does not provide merchant location).

This commit is contained in:
Andy Phillipson 2017-05-26 10:15:24 -04:00
parent 4c0da8c77e
commit fca7906f76
No known key found for this signature in database
GPG Key ID: D813A67D567D6C88
2 changed files with 7 additions and 1 deletions

View File

@ -77,6 +77,12 @@ angular.module('copayApp.controllers').controller('bitpayCardController', functi
txs[i].price = _price(txs[i]);
txs[i].runningBalance = runningBalance;
_runningBalance(txs[i]);
if (txs[i].merchant.city && txs[i].merchant.state) {
txs[i].merchant.location = txs[i].merchant.city + ', ' + txs[i].merchant.state;
} else {
txs[i].merchant.location = txs[i].merchant.city || txs[i].merchant.state || '';
}
}
self.bitpayCardTransactionHistory = txs;
self.balance = history.currentCardBalance;

View File

@ -79,7 +79,7 @@
{{tx.merchant.name}}
</div>
<div class="size-12 text-gray">
<span ng-show="tx.merchant.city && tx.merchant.state">{{tx.merchant.city}}, {{tx.merchant.state}}</span>
<span ng-show="tx.merchant.city && tx.merchant.state">{{tx.merchant.location}}</span>
<span ng-class="{'m5l':tx.merchant.city && tx.merchant.state}">
{{tx.timestamp | amDateFormat:'h:mm A'}}
</span>