Restore Buy bitcoin page and add buy.bitcoin.com as a service there

This commit is contained in:
magmahindenburg 2017-06-22 17:50:59 +09:00
commit a761b58ab0
8 changed files with 114 additions and 16 deletions

View file

@ -0,0 +1,16 @@
'use strict';
angular.module('copayApp.controllers').controller('buyBitcoindotcomController',
function($scope, $timeout, $ionicModal, $log, $state, $ionicHistory, lodash, bitcoincomService, externalLinkService, popupService) {
$scope.openExternalLink = function(url) {
externalLinkService.open(url);
};
var buyBitcoindotcom = function() {
};
$scope.$on("$ionicView.beforeEnter", function(event, data) {
buyBitcoindotcom();
});
});

View file

@ -1026,6 +1026,17 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
})
/* buy.Bitcoin.com */
.state('tabs.buyandsell.bitcoindotcom', {
url: '/buyBitcoindotcom',
views: {
'tab-home@tabs': {
controller: 'buyBitcoindotcomController',
templateUrl: 'views/buyBitcoindotcom.html'
}
}
})
/*
*
* Amazon.com Gift Card
@ -1135,7 +1146,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
});
})
.run(function($rootScope, $state, $location, $log, $timeout, startupService, fingerprintService, $ionicHistory, $ionicPlatform, $window, appConfigService, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService, storageService, scannerService, configService, emailService, /* plugins START HERE => */ coinbaseService, glideraService, amazonService, bitpayCardService, applicationService) {
.run(function($rootScope, $state, $location, $log, $timeout, startupService, fingerprintService, $ionicHistory, $ionicPlatform, $window, appConfigService, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService, storageService, scannerService, configService, emailService, /* plugins START HERE => */ glideraService, buydotbitcoindotcomService, amazonService, bitpayCardService, applicationService) {
uxLanguage.init();

View file

@ -0,0 +1,24 @@
'use strict';
angular.module('copayApp.services').factory('buydotbitcoindotcomService', function($http, $log, $window, $filter, platformInfo, storageService, buyAndSellService, lodash, configService, txFormatService) {
var root = {};
var credentials = {};
var isCordova = platformInfo.isCordova;
root.init = function(cb) {
};
var register = function() {
buyAndSellService.register({
name: 'buydotbitcoindotcom',
logo: 'img/bitcoin-com-logo.png',
location: 'Buy Bitcoin With Credit Card',
sref: 'tabs.buyandsell.bitcoindotcom'
});
};
register();
return root;
});