diff --git a/public/views/modals/receive-tips.html b/public/views/modals/receive-tips.html
new file mode 100644
index 000000000..b148acd35
--- /dev/null
+++ b/public/views/modals/receive-tips.html
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
diff --git a/public/views/modals/scan-tips.html b/public/views/modals/scan-tips.html
new file mode 100644
index 000000000..07ef9e5c7
--- /dev/null
+++ b/public/views/modals/scan-tips.html
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
diff --git a/src/js/controllers/modals/receiveTips.js b/src/js/controllers/modals/receiveTips.js
new file mode 100644
index 000000000..5412a614b
--- /dev/null
+++ b/src/js/controllers/modals/receiveTips.js
@@ -0,0 +1,11 @@
+'use strict';
+
+angular.module('copayApp.controllers').controller('receiveTipsController', function($scope, $log, storageService) {
+ $scope.close = function() {
+ $log.debug('Receive tips accepted');
+ storageService.setReceiveTipsAccepted(true, function(err) {
+ $scope.receiveTipsModal.hide();
+ $scope.receiveTipsModal.remove();
+ });
+ }
+});
diff --git a/src/js/controllers/tab-receive.js b/src/js/controllers/tab-receive.js
index 3a03d090a..25ceb5964 100644
--- a/src/js/controllers/tab-receive.js
+++ b/src/js/controllers/tab-receive.js
@@ -1,6 +1,6 @@
'use strict';
-angular.module('copayApp.controllers').controller('tabReceiveController', function($scope, $timeout, $log, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService) {
+angular.module('copayApp.controllers').controller('tabReceiveController', function($scope, $timeout, $log, $ionicModal, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService) {
$scope.isCordova = platformInfo.isCordova;
@@ -10,6 +10,19 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
});
$scope.isCordova = platformInfo.isCordova;
$scope.isNW = platformInfo.isNW;
+
+ storageService.getReceiveTipsAccepted(function(err, accepted) {
+ if (err || accepted) return;
+
+ $timeout(function() {
+ $ionicModal.fromTemplateUrl('views/modals/receive-tips.html', {
+ scope: $scope
+ }).then(function(modal) {
+ $scope.receiveTipsModal = modal;
+ $scope.receiveTipsModal.show();
+ });
+ }, 1000);
+ });
}
$scope.$on('Wallet/Changed', function(event, wallet) {
diff --git a/src/js/services/storageService.js b/src/js/services/storageService.js
index a498dfb89..b41b63834 100644
--- a/src/js/services/storageService.js
+++ b/src/js/services/storageService.js
@@ -342,6 +342,14 @@ angular.module('copayApp.services')
});
};
+ root.setReceiveTipsAccepted = function(val, cb) {
+ storage.set('receiveTips', val, cb);
+ };
+
+ root.getReceiveTipsAccepted = function(cb) {
+ storage.get('receiveTips', cb);
+ };
+
root.setAmazonGiftCards = function(network, gcs, cb) {
storage.set('amazonGiftCards-' + network, gcs, cb);
};