custom amount

This commit is contained in:
Gabriel Bazán 2016-11-24 11:42:25 -03:00
commit edeb9f26b5
12 changed files with 187 additions and 15 deletions

View file

@ -0,0 +1,19 @@
'use strict';
angular.module('copayApp.controllers').controller('customAmountController', function($rootScope, $scope, $stateParams, txFormatService, platformInfo) {
$scope.$on("$ionicView.beforeEnter", function(event, data) {
var satToBtc = 1 / 100000000;
$scope.isCordova = platformInfo.isCordova;
$scope.address = data.stateParams.toAddress;
$scope.amount = parseInt(data.stateParams.toAmount);
$scope.amountBtc = ($scope.amount * satToBtc).toFixed(8);
$scope.amountStr = txFormatService.formatAmountStr($scope.amount);
$scope.altAmountStr = txFormatService.formatAlternativeStr($scope.amount);
});
$scope.shareAddress = function(uri) {
window.plugins.socialsharing.share(uri, null, null, null);
};
});