Merge pull request #214 from Bitcoin-com/wallet/task/458
Wallet/task/458
This commit is contained in:
commit
7dea47eb42
18 changed files with 7041 additions and 21 deletions
|
|
@ -161,6 +161,12 @@ module.exports = function(grunt) {
|
|||
],
|
||||
dest: 'www/lib/bitcoin-cash-js.js'
|
||||
},
|
||||
bitanalytics: {
|
||||
src: [
|
||||
'bitanalytics/bitanalytics-0.1.0.js'
|
||||
],
|
||||
dest: 'www/lib/bitanalytics.js'
|
||||
},
|
||||
js: {
|
||||
src: [
|
||||
'src/js/app.js',
|
||||
|
|
@ -202,7 +208,8 @@ module.exports = function(grunt) {
|
|||
files: {
|
||||
'www/js/app.js': ['www/js/app.js'],
|
||||
'www/lib/angular-components.js': ['www/lib/angular-components.js'],
|
||||
'www/lib/bitcoin-cash-js.js': ['www/lib/bitcoin-cash-js.js']
|
||||
'www/lib/bitcoin-cash-js.js': ['www/lib/bitcoin-cash-js.js'],
|
||||
'www/lib/bitanalytics.js': ['www/lib/bitanalytics.js']
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="css/chartist.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/bitcoin.com.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/icomoon.css">
|
||||
<title>*USERVISIBLENAME* - *PURPOSELINE*</title>
|
||||
<title>*USERVISIBLENAME*</title>
|
||||
<link rel="shortcut icon" href="img/app/favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -31,6 +31,7 @@
|
|||
<script src="lib/ionic.bundle.min.js"></script>
|
||||
<script src="lib/angular-components.js"></script>
|
||||
<script src="lib/bitcoin-cash-js.js"></script>
|
||||
<script src="lib/bitanalytics.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
|
||||
<script src="js/moment.min.js"></script>
|
||||
|
|
|
|||
6885
bitanalytics/bitanalytics-0.1.0.js
Normal file
6885
bitanalytics/bitanalytics-0.1.0.js
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -35,6 +35,16 @@ angular.module('copayApp.controllers').controller('addressbookAddController', fu
|
|||
var translated = bitcoinCashJsService.readAddress(addressbook.address);
|
||||
addressbook.address = translated.legacy;
|
||||
}
|
||||
|
||||
var channel = "firebase";
|
||||
if (platformInfo.isNW) {
|
||||
channel = "ga";
|
||||
}
|
||||
var log = new window.BitAnalytics.LogEvent("contact_created", [{
|
||||
"coin": $scope.addressbookEntry.coin
|
||||
}], [channel]);
|
||||
window.BitAnalytics.LogEventHandlers.postEvent(log);
|
||||
|
||||
$timeout(function() {
|
||||
addressbookService.add(addressbook, function(err, ab) {
|
||||
if (err) {
|
||||
|
|
|
|||
|
|
@ -643,6 +643,19 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
soundService.play('misc/payment_sent.mp3');
|
||||
}
|
||||
|
||||
var channel = "firebase";
|
||||
if (platformInfo.isNW) {
|
||||
channel = "ga";
|
||||
}
|
||||
var log = new window.BitAnalytics.LogEvent("transfer_success", [{
|
||||
"coin": $scope.wallet.coin,
|
||||
"type": "outgoing",
|
||||
"amount": $scope.amount,
|
||||
"fees": $scope.fee
|
||||
}], [channel, "adjust"]);
|
||||
window.BitAnalytics.LogEventHandlers.postEvent(log);
|
||||
|
||||
// Should be removed
|
||||
firebaseEventsService.logEvent('sent_bitcoin', { coin: $scope.wallet.coin });
|
||||
$timeout(function() {
|
||||
$scope.$digest();
|
||||
|
|
|
|||
|
|
@ -75,6 +75,15 @@ angular.module('copayApp.controllers').controller('preferencesNotificationsContr
|
|||
};
|
||||
|
||||
emailService.updateEmail(opts);
|
||||
|
||||
var channel = "firebase";
|
||||
if (platformInfo.isNW) {
|
||||
channel = "ga";
|
||||
}
|
||||
var log = new window.BitAnalytics.LogEvent("settings_email_notification_toggle", [{
|
||||
"toggle": $scope.emailNotifications.value
|
||||
}], [channel]);
|
||||
window.BitAnalytics.LogEventHandlers.postEvent(log);
|
||||
};
|
||||
|
||||
$scope.soundNotificationsChange = function() {
|
||||
|
|
|
|||
|
|
@ -145,6 +145,16 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
|||
}
|
||||
$scope.paymentReceivedCoin = $scope.wallet.coin;
|
||||
|
||||
var channel = "firebase";
|
||||
if (platformInfo.isNW) {
|
||||
channel = "ga";
|
||||
}
|
||||
var log = new window.BitAnalytics.LogEvent("transfer_success", [{
|
||||
"coin": $scope.wallet.coin,
|
||||
"type": "incoming"
|
||||
}], [channel, "adjust"]);
|
||||
window.BitAnalytics.LogEventHandlers.postEvent(log);
|
||||
|
||||
if ($state.current.name === "tabs.receive") {
|
||||
soundService.play('misc/payment_received.mp3');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,13 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
$scope.isAndroid = platformInfo.isAndroid;
|
||||
$scope.isIOS = platformInfo.isIOS;
|
||||
|
||||
var channel = "firebase";
|
||||
if (platformInfo.isNW) {
|
||||
channel = "ga";
|
||||
}
|
||||
var log = new window.BitAnalytics.LogEvent("wallet_details_open", [], [channel]);
|
||||
window.BitAnalytics.LogEventHandlers.postEvent(log);
|
||||
|
||||
$scope.amountIsCollapsible = !$scope.isAndroid;
|
||||
|
||||
$scope.openExternalLink = function(url, target) {
|
||||
|
|
|
|||
|
|
@ -1211,7 +1211,68 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
.run(function($rootScope, $state, $location, $log, $timeout, startupService, ionicToast, fingerprintService, $ionicHistory, $ionicPlatform, $window, appConfigService, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService, storageService, scannerService, configService, emailService, /* plugins START HERE => */ buydotbitcoindotcomService, glideraService, amazonService, bitpayCardService, applicationService, mercadoLibreService, rateService) {
|
||||
|
||||
$ionicPlatform.ready(function() {
|
||||
|
||||
// Init BitAnalytics
|
||||
var os = platformInfo.isAndroid ? 'android' : platformInfo.isIOS ? 'ios' : 'desktop';
|
||||
window.BitAnalytics.initialize(os, $window.fullVersion, {"firebase": {},
|
||||
"ga": {
|
||||
"trackingId": "UA-59964190-23",
|
||||
"eventLabels": ["id", "icon-off"]
|
||||
},
|
||||
"adjust": {
|
||||
"token": "au1onbhgg5q8",
|
||||
"environment" : "production",
|
||||
"eventTypes": {
|
||||
"banner_click": "sc5i8u",
|
||||
"buy_bitcoin_click": "t1vcdz",
|
||||
"transfer_success": "f68evo",
|
||||
"wallet_created": "nd3dg5",
|
||||
"wallet_opened": "4n39l7"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var channel = "firebase";
|
||||
if (platformInfo.isNW) {
|
||||
channel = "ga";
|
||||
}
|
||||
|
||||
// Send a log to test
|
||||
var log = new window.BitAnalytics.LogEvent("wallet_opened", [], [channel, "adjust"]);
|
||||
window.BitAnalytics.LogEventHandlers.postEvent(log);
|
||||
|
||||
var actionBanner = new window.BitAnalytics.ActionFactory.createAction('click', {
|
||||
name: 'banner_click',
|
||||
class: 'track_banner_click',
|
||||
params: ['href-banner', 'id'],
|
||||
channels: [channel, 'adjust']
|
||||
});
|
||||
window.BitAnalytics.ActionHandlers.trackAction(actionBanner);
|
||||
|
||||
var actionBuyBitcoin = new window.BitAnalytics.ActionFactory.createAction('click', {
|
||||
name: 'buy_bitcoin_click',
|
||||
class: 'track_buy_bitcoin_click',
|
||||
params: ['href', 'id'],
|
||||
channels: [channel, 'adjust']
|
||||
});
|
||||
window.BitAnalytics.ActionHandlers.trackAction(actionBuyBitcoin);
|
||||
|
||||
var actionLinkClickOut = new window.BitAnalytics.ActionFactory.createAction('click', {
|
||||
name: 'link_click_out',
|
||||
class: 'track_link_click_out',
|
||||
params: ['href', 'id'],
|
||||
channels: [channel]
|
||||
});
|
||||
window.BitAnalytics.ActionHandlers.trackAction(actionLinkClickOut);
|
||||
|
||||
var actionTabOpen = new window.BitAnalytics.ActionFactory.createAction('click', {
|
||||
name: 'tab_open',
|
||||
class: 'track_tab_open',
|
||||
params: ['href', 'title', 'icon-off'],
|
||||
channels: [channel]
|
||||
});
|
||||
window.BitAnalytics.ActionHandlers.trackAction(actionTabOpen);
|
||||
|
||||
// Init language
|
||||
uxLanguage.init(function (lang) {
|
||||
|
||||
|
|
@ -1381,7 +1442,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
}
|
||||
win.menu = nativeMenuBar;
|
||||
}
|
||||
|
||||
|
||||
$rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) {
|
||||
if (document.body.classList.contains('keyboard-open')) {
|
||||
document.body.classList.remove('keyboard-open');
|
||||
|
|
|
|||
|
|
@ -427,6 +427,15 @@ angular.module('copayApp.services')
|
|||
}, function(err, secret) {
|
||||
if (err) return bwcError.cb(err, gettextCatalog.getString('Error creating wallet'), cb);
|
||||
|
||||
var channel = "firebase";
|
||||
if (platformInfo.isNW) {
|
||||
channel = "ga";
|
||||
}
|
||||
var log = new window.BitAnalytics.LogEvent("wallet_created", [{
|
||||
"coin": opts.coin
|
||||
}], [channel]);
|
||||
window.BitAnalytics.LogEventHandlers.postEvent(log);
|
||||
|
||||
return cb(null, walletClient, secret);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -11,8 +11,9 @@
|
|||
<link rel="stylesheet" type="text/css" href="css/chartist.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/bitcoin.com.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/icomoon.css">
|
||||
<title>Bitcoin.com Wallet</title>
|
||||
<link rel="shortcut icon" href="img/app/favicon.ico">
|
||||
<title>Bitcoin.com Wallet - Bitcoin.com Wallet</title>
|
||||
<link rel="shortcut icon" href="img/app/favicon.ico">
|
||||
<script src="https://www.googletagmanager.com/gtag/js?id=UA-59964190-23"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
@ -30,7 +31,8 @@
|
|||
|
||||
<script src="lib/ionic.bundle.min.js"></script>
|
||||
<script src="lib/angular-components.js"></script>
|
||||
<script src="lib/bitcoin-cash-js.js"></script>
|
||||
<script src="lib/bitcoin-cash-js.js"></script>
|
||||
<script src="lib/bitanalytics.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
|
||||
<script src="js/moment.min.js"></script>
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@
|
|||
</div>
|
||||
<div ng-show="!hide">
|
||||
<div ng-repeat="service in services track by $index">
|
||||
<a ng-if="service.sref" ui-sref="{{service.sref}}" class="item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
|
||||
<a ng-if="service.sref" ui-sref="{{service.sref}}" id="home_{{service.name}}" title="{{service.title || service.name}}" class="track_link_click_out item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
|
||||
<i class="icon big-icon-svg theme-circle theme-circle-community">
|
||||
<div class="bg {{service.icon}}"></div>
|
||||
</i>
|
||||
<span>{{service.title || service.name}}</span>
|
||||
<i class="icon bp-arrow-right"></i>
|
||||
</a>
|
||||
<a ng-if="!service.sref" ng-click="open('{{service.href}}')" class="item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
|
||||
<a ng-if="!service.sref" ng-click="open('{{service.href}}')" id="home_{{service.name}}" title="{{service.title || service.name}}" class="track_link_click_out item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
|
||||
<i class="icon big-icon-svg theme-circle theme-circle-community">
|
||||
<div class="bg {{service.icon}}"></div>
|
||||
</i>
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a ng-if="isCordova" ng-click="share()" class="item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
|
||||
<a ng-if="isCordova" ng-click="share()" title="Share the Wallet App" id="home_{{service.name}}" class="track_link_click_out item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
|
||||
<i class="icon big-icon-svg theme-circle theme-circle-community">
|
||||
<div class="bg icon-share"></div>
|
||||
</i>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,14 @@
|
|||
</div>
|
||||
<div ng-show="!hide">
|
||||
<div ng-repeat="service in services track by $index">
|
||||
<a ui-sref="{{service.sref}}" class="item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
|
||||
<a ng-if="service.name=='buyandsell'" ui-sref="{{service.sref}}" id="home_{{service.name}}" title="{{service.title || service.name}}" class="buy_bitcoin_click item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
|
||||
<i class="icon big-icon-svg theme-circle">
|
||||
<div class="bg {{service.icon}}"></div>
|
||||
</i>
|
||||
<span>{{service.title || service.name}}</span>
|
||||
<i class="icon bp-arrow-right"></i>
|
||||
</a>
|
||||
<a ng-if="service.name!='buyandsell'" ui-sref="{{service.sref}}" id="home_{{service.name}}" title="{{service.title || service.name}}" class="track_link_click_out item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
|
||||
<i class="icon big-icon-svg theme-circle">
|
||||
<div class="bg {{service.icon}}"></div>
|
||||
</i>
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@
|
|||
</div>
|
||||
<div ng-show="!hide">
|
||||
<div ng-repeat="service in services track by $index">
|
||||
<a ng-if="service.sref" ui-sref="{{service.sref}}" class="item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
|
||||
<a ng-if="service.sref" ui-sref="{{service.sref}}" id="home_{{service.name}}" title="{{service.title || service.name}}" class="track_link_click_out item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
|
||||
<i class="icon big-icon-svg theme-circle">
|
||||
<div class="bg {{service.icon}}"></div>
|
||||
</i>
|
||||
<span>{{service.title || service.name}}</span>
|
||||
<i class="icon bp-arrow-right"></i>
|
||||
</a>
|
||||
<a ng-if="!service.sref" ng-click="open('{{service.href}}')" class="item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
|
||||
<a ng-if="!service.sref" ng-click="open('{{service.href}}')" id="home_{{service.name}}" title="{{service.title || service.name}}" class="track_link_click_out item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
|
||||
<i class="icon big-icon-svg theme-circle">
|
||||
<div class="bg {{service.icon}}"></div>
|
||||
</i>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
</div>
|
||||
<div ng-show="!hide">
|
||||
<div ng-repeat="service in services track by $index">
|
||||
<a ui-sref="{{service.sref}}" class="item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
|
||||
<a ui-sref="{{service.sref}}" id="home_{{service.name}}" title="{{service.title || service.name}}" class="track_link_click_out item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
|
||||
<i class="icon big-icon-svg theme-circle theme-circle-services">
|
||||
<div class="bg {{service.icon}}"></div>
|
||||
</i>
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@
|
|||
|
||||
<div class="list card card-banner">
|
||||
<ion-spinner ng-if="bannerIsLoading"></ion-spinner>
|
||||
<a ng-if="!bannerIsLoading" ng-click="openBannerUrl()">
|
||||
<a id="home_banner" href-banner="{{bannerImageUrl}}" class="track_banner_click" ng-if="!bannerIsLoading" ng-click="openBannerUrl()">
|
||||
<img class="card-banner__img" ng-src="{{bannerImageUrl}}"/>
|
||||
</a>
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<span ng-show="hasWallets" translate>To get started, buy bitcoin or share your address. You can receive bitcoin from any wallet or service.</span>
|
||||
<span ng-show="!hasWallets" translate>To get started, you'll need to create a bitcoin wallet and get some bitcoin.</span>
|
||||
<div class="padding">
|
||||
<button class="button button-standard button-primary" ng-click="buyBitcoin()" ng-show="hasWallets" translate>Buy Bitcoin</button>
|
||||
<button class="button button-standard button-primary track_buy_bitcoin_click" id="tab_send_buy_bitcoin" ng-click="buyBitcoin()" ng-show="hasWallets" translate>Buy Bitcoin</button>
|
||||
<button class="button button-standard button-primary" ng-click="createWallet()" ng-show="!hasWallets" translate>Create bitcoin wallet</button>
|
||||
<button class="button button-standard button-secondary" ui-sref="tabs.receive" ng-show="hasWallets" translate>Show bitcoin address</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,22 +1,21 @@
|
|||
<ion-tabs class="tabs-icon-top tabs-color-active-positive ion-tabs-transparent {{$root.hideTabs}}">
|
||||
|
||||
<ion-tab title="{{'Home'|translate}}" icon-off="ico-home" icon-on="ico-home-selected" ui-sref="tabs.home">
|
||||
<ion-tab class="track_tab_open" id="tab_open_home" title="{{'Home'|translate}}" icon-off="ico-home" icon-on="ico-home-selected" ui-sref="tabs.home">
|
||||
<ion-nav-view name="tab-home"></ion-nav-view>
|
||||
</ion-tab>
|
||||
|
||||
<ion-tab title="{{'Receive'|translate}}" icon-off="ico-receive" icon-on="ico-receive-selected" ui-sref="tabs.receive">
|
||||
<ion-tab class="track_tab_open" id="tab_open_receive" title="{{'Receive'|translate}}" icon-off="ico-receive" icon-on="ico-receive-selected" ui-sref="tabs.receive">
|
||||
<ion-nav-view name="tab-receive"></ion-nav-view>
|
||||
</ion-tab>
|
||||
|
||||
<ion-tab title="{{'Scan'|translate}}" icon-off="ico-scan" icon-on="ico-scan-selected" ng-click="chooseScanner()">
|
||||
<ion-tab class="track_tab_open" id="tab_open_scan" title="{{'Scan'|translate}}" icon-off="ico-scan" icon-on="ico-scan-selected" ng-click="chooseScanner()">
|
||||
<ion-nav-view name="tab-scan"></ion-nav-view>
|
||||
</ion-tab>
|
||||
|
||||
<ion-tab title="{{'Send'|translate}}" icon-off="ico-send" icon-on="ico-send-selected" ui-sref="tabs.send">
|
||||
<ion-tab class="track_tab_open" id="tab_open_send" title="{{'Send'|translate}}" icon-off="ico-send" icon-on="ico-send-selected" ui-sref="tabs.send">
|
||||
<ion-nav-view name="tab-send"></ion-nav-view>
|
||||
</ion-tab>
|
||||
|
||||
<ion-tab title="{{'Settings'|translate}}" icon-off="ico-settings" icon-on="ico-settings-selected" ui-sref="tabs.settings">
|
||||
<ion-tab class="track_tab_open" id="tab_open_settings" title="{{'Settings'|translate}}" icon-off="ico-settings" icon-on="ico-settings-selected" ui-sref="tabs.settings">
|
||||
<ion-nav-view name="tab-settings"></ion-nav-view>
|
||||
</ion-tab>
|
||||
</ion-tabs>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue