cleanup unused method for alt currency conversion

This commit is contained in:
Ivan Socolsky 2014-11-04 16:01:45 -03:00
commit 8517dcd2d6
2 changed files with 7 additions and 26 deletions

View file

@ -82,14 +82,6 @@ angular.module('copayApp.controllers').controller('HistoryController',
var w = $rootScope.wallet;
return w.getNetworkName().substring(0, 4);
};
$scope.amountAlternative = function(amount, txIndex, cb) {
var w = $rootScope.wallet;
rateService.whenAvailable(function() {
var valueSat = amount * w.settings.unitToSatoshi;
$scope.alternativeCurrency[txIndex] = rateService.toFiat(valueSat, w.settings.alternativeIsoCode);
return cb ? cb() : null;
});
};
// Autoload transactions
$scope.getTransactions();

View file

@ -172,17 +172,6 @@ describe("Unit: Controllers", function() {
scope.getTransactions();
expect(scope.blockchain_txs).to.be.empty;
});
it('should call amountAlternative and return a value', function() {
var cb = sinon.spy();
var s1 = sinon.stub(scope, 'amountAlternative');
s1.onCall(0).returns(1000);
s1.onCall(1).returns(2000);
expect(s1(100, 0, cb)).equal(1000);
expect(s1(200, 1, cb)).equal(2000);
sinon.assert.callCount(scope.amountAlternative, 2);
s1.restore();
});
});
describe('Send Controller', function() {