Merge pull request #265 from Bitcoin-com/wallet/task/427

Fix formatted amount.
This commit is contained in:
Jean-Baptiste Dominguez 2018-08-13 13:37:28 +09:00 committed by GitHub
commit 803653135f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,11 +90,12 @@
// During watch, may be changed from having a separate currency value,
// to both being in value. Don't want to use previous currency value.
// Try to extract currency from value..
$scope.currency = $scope.currency || '';
var currencySplit = $scope.value.split(" ");
if (currencySplit.length >= 2 && !$scope.currency) {
if (currencySplit.length >= 2 && $scope.currency.length === 0) {
$scope.currency = currencySplit[currencySplit.length - 1];
}
$scope.currency = $scope.currency || '';
// Redo this when we have proper formatting for low fees
if ($scope.value.indexOf("<") === 0) {