Uses appConfigService
This commit is contained in:
parent
cb1ff562bc
commit
46d123a755
3 changed files with 7 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('amountController', function($scope, $filter, $timeout, $ionicScrollDelegate, $ionicHistory, gettextCatalog, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, txFormatService, ongoingProcess, bitpayCardService, popupService, bwcError, payproService, profileService, bitcore, amazonService, glideraService, coinbaseService) {
|
angular.module('copayApp.controllers').controller('amountController', function($scope, $filter, $timeout, $ionicScrollDelegate, $ionicHistory, gettextCatalog, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, txFormatService, ongoingProcess, bitpayCardService, popupService, bwcError, payproService, profileService, bitcore, amazonService, glideraService, coinbaseService, appConfigService) {
|
||||||
var unitToSatoshi;
|
var unitToSatoshi;
|
||||||
var satToUnit;
|
var satToUnit;
|
||||||
var unitDecimals;
|
var unitDecimals;
|
||||||
|
|
@ -64,7 +64,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
||||||
});
|
});
|
||||||
|
|
||||||
var dataSrc = {
|
var dataSrc = {
|
||||||
name: 'Received from ' + $window.appConfig.nameCase
|
name: 'Received from ' + appConfigService.nameCase
|
||||||
};
|
};
|
||||||
coinbaseService.createAddress(data.accessToken, data.accountId, dataSrc, function(err, data) {
|
coinbaseService.createAddress(data.accessToken, data.accountId, dataSrc, function(err, data) {
|
||||||
$scope.toAddress = data.data.address;
|
$scope.toAddress = data.data.address;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $interval, $filter, $timeout, $ionicScrollDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, txFormatService, ongoingProcess, $ionicModal, popupService, $ionicHistory, $ionicConfig, payproService, feeService, amazonService, glideraService, bwcError, coinbaseService, bitpayCardService) {
|
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $interval, $filter, $timeout, $ionicScrollDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, txFormatService, ongoingProcess, $ionicModal, popupService, $ionicHistory, $ionicConfig, payproService, feeService, amazonService, glideraService, bwcError, coinbaseService, bitpayCardService, appConfigService) {
|
||||||
var cachedTxp = {};
|
var cachedTxp = {};
|
||||||
var toAmount;
|
var toAmount;
|
||||||
var isChromeApp = platformInfo.isChromeApp;
|
var isChromeApp = platformInfo.isChromeApp;
|
||||||
|
|
@ -1017,7 +1017,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
ctx['price_sensitivity'] = $scope.selectedPriceSensitivity.data;
|
ctx['price_sensitivity'] = $scope.selectedPriceSensitivity.data;
|
||||||
ctx['sell_price_amount'] = $scope.coinbaseSellPrice ? $scope.coinbaseSellPrice.amount : '';
|
ctx['sell_price_amount'] = $scope.coinbaseSellPrice ? $scope.coinbaseSellPrice.amount : '';
|
||||||
ctx['sell_price_currency'] = $scope.coinbaseSellPrice ? $scope.coinbaseSellPrice.currency : 'USD';
|
ctx['sell_price_currency'] = $scope.coinbaseSellPrice ? $scope.coinbaseSellPrice.currency : 'USD';
|
||||||
ctx['description'] = $window.appConfig.nameCase + ' Wallet: ' + $scope.wallet.name;
|
ctx['description'] = appConfigService.nameCase + ' Wallet: ' + $scope.wallet.name;
|
||||||
coinbaseService.savePendingTransaction(ctx, null, function(err) {
|
coinbaseService.savePendingTransaction(ctx, null, function(err) {
|
||||||
ongoingProcess.set('sellingBitcoin', false, onSendStatusChange);
|
ongoingProcess.set('sellingBitcoin', false, onSendStatusChange);
|
||||||
if (err) $log.debug(err);
|
if (err) $log.debug(err);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.services').factory('coinbaseService', function($http, $log, $window, platformInfo, lodash, storageService, configService) {
|
angular.module('copayApp.services').factory('coinbaseService', function($http, $log, $window, platformInfo, lodash, storageService, configService, appConfigService) {
|
||||||
var root = {};
|
var root = {};
|
||||||
var credentials = {};
|
var credentials = {};
|
||||||
var isCordova = platformInfo.isCordova;
|
var isCordova = platformInfo.isCordova;
|
||||||
|
|
@ -608,11 +608,12 @@ angular.module('copayApp.services').factory('coinbaseService', function($http, $
|
||||||
|
|
||||||
var _sendToWallet = function(tx, accessToken, accountId, coinbasePendingTransactions) {
|
var _sendToWallet = function(tx, accessToken, accountId, coinbasePendingTransactions) {
|
||||||
if (!tx) return;
|
if (!tx) return;
|
||||||
|
var desc = 'To ' + appConfigService.nameCase + ' Wallet';
|
||||||
var data = {
|
var data = {
|
||||||
to: tx.toAddr,
|
to: tx.toAddr,
|
||||||
amount: tx.amount.amount,
|
amount: tx.amount.amount,
|
||||||
currency: tx.amount.currency,
|
currency: tx.amount.currency,
|
||||||
description: 'To Wallet'
|
description: desc
|
||||||
};
|
};
|
||||||
root.sendTo(accessToken, accountId, data, function(err, res) {
|
root.sendTo(accessToken, accountId, data, function(err, res) {
|
||||||
console.log('[coinbaseService.js:591] SEND TO COPAY',err, res); //TODO
|
console.log('[coinbaseService.js:591] SEND TO COPAY',err, res); //TODO
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue