diff --git a/public/views/buyGlidera.html b/public/views/buyGlidera.html index ea6e15673..de0b80c2c 100644 --- a/public/views/buyGlidera.html +++ b/public/views/buyGlidera.html @@ -16,7 +16,7 @@
- {{buy.loading|translate}} + {{buy.loading}} @@ -26,11 +26,11 @@+
A SMS containing a confirmation code was sent to your phone.
Please, enter the code below
+
Fiat will be immediately withdrawn from your bank account. The bitcoins will be purchased and deposited to your wallet ({{index.walletName}}) in 2-4 business days.
+
A transfer has been initiated from your bank account. Your bitcoins should arrive to your wallet in 2-4 business days.
diff --git a/public/views/glidera.html b/public/views/glidera.html index e1a507132..326705695 100644 --- a/public/views/glidera.html +++ b/public/views/glidera.html @@ -17,8 +17,8 @@
You can buy and sell Bitcoin with a US bank account directly in Copay.
-Connect your Glidera account to get started
+You can buy and sell Bitcoin with a US bank account directly in Copay.
+Connect your Glidera account to get started
+ ng-click="$root.openExternalLink(glidera.getAuthenticateUrl(), '_system'); showOauthForm = true"> Connect to GlideraYou will need to log back in to buy or sell bitcoin in Copay.
+You will need to log back in to buy or sell bitcoin in Copay.
+
A SMS containing a confirmation code was sent to your phone.
Please, enter the code below
+
Bitcoins will be immediately sent from your wallet to Glidera. Fiat will be deposited in your bank account in 4-6 business days.
+
A transfer has been initiated to your bank account and should arrive in 4-6 business days.
diff --git a/src/js/controllers/buyGlidera.js b/src/js/controllers/buyGlidera.js index c3ffbfbcf..f4c2df44b 100644 --- a/src/js/controllers/buyGlidera.js +++ b/src/js/controllers/buyGlidera.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('buyGlideraController', - function($scope, $timeout, $modal, profileService, addressService, glideraService, gettext, gettextCatalog, bwsError, lodash, isChromeApp) { + function($scope, $timeout, $modal, profileService, addressService, glideraService, bwsError, lodash, isChromeApp) { var self = this; this.show2faCodeInput = null; @@ -36,13 +36,13 @@ angular.module('copayApp.controllers').controller('buyGlideraController', $scope.selectWallet = function(walletId, walletName) { if (!profileService.getClient(walletId).isComplete()) { - self.error = bwsError.msg({'code': 'WALLET_NOT_COMPLETE'}, gettextCatalog.getString('Could not choose the wallet')); + self.error = bwsError.msg({'code': 'WALLET_NOT_COMPLETE'}, 'Could not choose the wallet'); $modalInstance.dismiss('cancel'); return; } addressService.getAddress(walletId, false, function(err, walletAddr) { if (err) { - self.error = bwsError.cb(err, gettext('Could not create address')); + self.error = bwsError.cb(err, 'Could not create address'); $modalInstance.dismiss('cancel'); return; } @@ -87,7 +87,7 @@ angular.module('copayApp.controllers').controller('buyGlideraController', glideraService.buyPrice(token, price, function(err, buyPrice) { self.gettingBuyPrice = false; if (err) { - self.error = gettext('Could not get exchange information. Please, try again.'); + self.error = 'Could not get exchange information. Please, try again.'; } else { self.buyPrice = buyPrice; @@ -97,12 +97,12 @@ angular.module('copayApp.controllers').controller('buyGlideraController', this.get2faCode = function(token) { var self = this; - this.loading = gettext('Sending 2FA code...'); + this.loading = 'Sending 2FA code...'; $timeout(function() { glideraService.get2faCode(token, function(err, sent) { self.loading = null; if (err) { - self.error = gettext('Could not send confirmation code to your phone'); + self.error = 'Could not send confirmation code to your phone'; } else { self.error = null; @@ -115,7 +115,7 @@ angular.module('copayApp.controllers').controller('buyGlideraController', this.sendRequest = function(token, permissions, twoFaCode) { var self = this; self.error = null; - self.loading = gettext('Buying bitcoin...'); + self.loading = 'Buying bitcoin...'; var data = { destinationAddress: self.selectedWalletAddr, qty: self.buyPrice.qty, diff --git a/src/js/controllers/sellGlidera.js b/src/js/controllers/sellGlidera.js index e3f6c7e07..4bac5037f 100644 --- a/src/js/controllers/sellGlidera.js +++ b/src/js/controllers/sellGlidera.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('sellGlideraController', - function($scope, $timeout, $log, $modal, gettext, gettextCatalog, configService, profileService, addressService, feeService, glideraService, bwsError, lodash, isChromeApp) { + function($scope, $timeout, $log, $modal, configService, profileService, addressService, feeService, glideraService, bwsError, lodash, isChromeApp) { var self = this; var config = configService.getSync(); @@ -40,7 +40,7 @@ angular.module('copayApp.controllers').controller('sellGlideraController', $scope.selectWallet = function(walletId, walletName) { if (!profileService.getClient(walletId).isComplete()) { - self.error = bwsError.msg({'code': 'WALLET_NOT_COMPLETE'}, gettextCatalog.getString('Could not choose the wallet')); + self.error = bwsError.msg({'code': 'WALLET_NOT_COMPLETE'}, 'Could not choose the wallet'); $modalInstance.dismiss('cancel'); return; } @@ -83,7 +83,7 @@ angular.module('copayApp.controllers').controller('sellGlideraController', glideraService.sellPrice(token, price, function(err, sellPrice) { self.gettingSellPrice = false; if (err) { - self.error = gettext('Could not get exchange information. Please, try again.'); + self.error = 'Could not get exchange information. Please, try again.'; } else { self.error = null; @@ -94,12 +94,12 @@ angular.module('copayApp.controllers').controller('sellGlideraController', this.get2faCode = function(token) { var self = this; - this.loading = gettext('Sending 2FA code...'); + this.loading = 'Sending 2FA code...'; $timeout(function() { glideraService.get2faCode(token, function(err, sent) { self.loading = null; if (err) { - self.error = gettext('Could not send confirmation code to your phone'); + self.error = 'Could not send confirmation code to your phone'; } else { self.show2faCodeInput = sent; @@ -112,18 +112,18 @@ angular.module('copayApp.controllers').controller('sellGlideraController', var self = this; self.error = null; - this.loading = gettext('Selling Bitcoin...'); + this.loading = 'Selling Bitcoin...'; $timeout(function() { addressService.getAddress(fc.credentials.walletId, null, function(err, refundAddress) { if (!refundAddress) { self.loading = null; - self.error = bwsError.msg(err, gettext('Could not create address')); + self.error = bwsError.msg(err, 'Could not create address'); return; } glideraService.getSellAddress(token, function(error, sellAddress) { if (!sellAddress) { self.loading = null; - self.error = gettext('Could not get the destination bitcoin address'); + self.error = 'Could not get the destination bitcoin address'; return; } var amount = parseInt((self.sellPrice.qty * 100000000).toFixed(0)); @@ -144,7 +144,7 @@ angular.module('copayApp.controllers').controller('sellGlideraController', $log.error(err); $timeout(function() { self.loading = null; - self.error = bwsError.msg(err, gettextCatalog.getString('Error')); + self.error = bwsError.msg(err, 'Error'); }, 1); return; } @@ -201,7 +201,7 @@ angular.module('copayApp.controllers').controller('sellGlideraController', fc.signTxProposal(txp, function(err, signedTx) { profileService.lockFC(); if (err) { - err = bwsError.msg(err, gettextCatalog.getString('Could not accept payment')); + err = bwsError.msg(err, 'Could not accept payment'); return cb(err); } else { @@ -209,7 +209,7 @@ angular.module('copayApp.controllers').controller('sellGlideraController', return cb(null, txp, signedTx.raw); } else { - return cb(gettext('The transaction could not be signed')); + return cb('The transaction could not be signed'); } } });