custom amount
This commit is contained in:
parent
d85456b1e6
commit
edeb9f26b5
12 changed files with 187 additions and 15 deletions
19
src/js/controllers/customAmount.js
Normal file
19
src/js/controllers/customAmount.js
Normal 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);
|
||||
};
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue