Merge pull request #214 from Bitcoin-com/wallet/task/458

Wallet/task/458
This commit is contained in:
Brendon Duncan 2018-07-16 13:53:20 +12:00 committed by GitHub
commit 7dea47eb42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 7041 additions and 21 deletions

View file

@ -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) {

View file

@ -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();

View file

@ -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() {

View file

@ -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');
}

View file

@ -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) {