Merge pull request #4558 from gabrielbazan7/fix/EncryptedWalletHandler
fix wallet encrypted handler and rename BwsError service to BwcError
This commit is contained in:
commit
eb014927a4
14 changed files with 81 additions and 81 deletions
|
|
@ -163,7 +163,7 @@ msgstr ""
|
|||
msgid "Amount"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Amount below minimum allowed"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -373,7 +373,7 @@ msgstr ""
|
|||
msgid "Connecting to Glidera..."
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Connection reset by peer"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -381,15 +381,15 @@ msgstr ""
|
|||
msgid "Continue"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Copayer already in this wallet"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Copayer already voted on this spend proposal"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Copayer data mismatch"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -427,7 +427,7 @@ msgstr ""
|
|||
msgid "Could not broadcast payment"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Could not build transaction"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -639,7 +639,7 @@ msgstr ""
|
|||
msgid "Email Notifications"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Empty addresses limit reached. New addresses cannot be generated."
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -760,7 +760,7 @@ msgstr ""
|
|||
msgid "From the destination device, go to Add wallet > Import wallet and scan this QR code"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Funds are locked by pending spend proposals"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -847,7 +847,7 @@ msgstr ""
|
|||
msgid "In order to verify your wallet backup, please type your password:"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Incorrect address network"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -856,11 +856,11 @@ msgstr ""
|
|||
msgid "Incorrect code format"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Insufficient funds"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Insufficient funds for fee"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -875,7 +875,7 @@ msgstr ""
|
|||
msgid "Invalid account number"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Invalid address"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -918,7 +918,7 @@ msgstr ""
|
|||
msgid "Joining Wallet..."
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Key already associated with an existing wallet"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -946,11 +946,11 @@ msgstr ""
|
|||
msgid "locked by pending payments"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Locktime in effect. Please wait to create a new spend proposal"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Locktime in effect. Please wait to remove this spend proposal"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -985,11 +985,11 @@ msgstr ""
|
|||
msgid "Message"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Missing parameter"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Missing private keys to sign"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1024,7 +1024,7 @@ msgstr ""
|
|||
msgid "Network"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Network connection error"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1049,7 +1049,7 @@ msgstr ""
|
|||
msgid "Normal"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Not authorized"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1253,7 +1253,7 @@ msgstr ""
|
|||
msgid "Please tap the words in order to confirm your backup phrase is correctly written."
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Please upgrade Copay to perform this action"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1289,7 +1289,7 @@ msgstr ""
|
|||
msgid "Priority"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Private key is encrypted, cannot sign"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1487,7 +1487,7 @@ msgstr ""
|
|||
msgid "Sent"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Server response could not be verified"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1552,7 +1552,7 @@ msgstr ""
|
|||
msgid "Show advanced options"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Signatures rejected by server"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1573,15 +1573,15 @@ msgstr ""
|
|||
msgid "Specify Recovery Phrase..."
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Spend proposal is not accepted"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Spend proposal not found"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Spending Password needed"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1654,7 +1654,7 @@ msgstr ""
|
|||
msgid "The recovery phrase could require a password to be imported"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "The request could not be understood by the server"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1666,7 +1666,7 @@ msgstr ""
|
|||
msgid "The software you are about to use functions as a free, open source, and multi-signature digital wallet."
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "The spend proposal is not pending"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1746,7 +1746,7 @@ msgstr ""
|
|||
msgid "Transaction"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Transaction already broadcasted"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1828,7 +1828,7 @@ msgstr ""
|
|||
msgid "Waiting..."
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Wallet already exists"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1865,15 +1865,15 @@ msgstr ""
|
|||
msgid "Wallet Invitation is not valid!"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Wallet is full"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Wallet is locked"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Wallet is not complete"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1885,7 +1885,7 @@ msgstr ""
|
|||
msgid "Wallet Name (at creation)"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Wallet needs backup"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1893,11 +1893,11 @@ msgstr ""
|
|||
msgid "Wallet Network"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Wallet not found"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Wallet not registered at the wallet service. Recreate it from \"Create Wallet\" using \"Advanced Options\" to set your recovery phrase"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1911,7 +1911,7 @@ msgstr ""
|
|||
msgid "Wallet Recovery Phrase"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Wallet Recovery Phrase is invalid"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1920,7 +1920,7 @@ msgstr ""
|
|||
msgid "Wallet recovery phrase not available. You can still export it from Advanced > Export."
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Wallet service not found"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1978,7 +1978,7 @@ msgstr ""
|
|||
msgid "Wrong number of recovery words:"
|
||||
msgstr ""
|
||||
|
||||
#: src/js/services/bwsError.js
|
||||
#: src/js/services/bwcError.js
|
||||
msgid "Wrong spending password"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('backupController',
|
||||
function($rootScope, $scope, $timeout, $log, go, lodash, fingerprintService, platformInfo, configService, profileService, gettext, bwcService, bwsError, walletService, ongoingProcess) {
|
||||
function($rootScope, $scope, $timeout, $log, go, lodash, fingerprintService, platformInfo, configService, profileService, gettext, bwcService, walletService, ongoingProcess) {
|
||||
|
||||
var fc = profileService.focusedClient;
|
||||
var prevState;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('buyCoinbaseController',
|
||||
function($scope, $log, $ionicModal, $timeout, lodash, profileService, coinbaseService, bwsError, addressService, ongoingProcess) {
|
||||
function($scope, $log, $ionicModal, $timeout, lodash, profileService, coinbaseService, addressService, ongoingProcess) {
|
||||
var self = this;
|
||||
|
||||
this.init = function(testnet) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('buyGlideraController',
|
||||
function($scope, $timeout, $ionicModal, profileService, addressService, glideraService, bwsError, lodash, ongoingProcess) {
|
||||
function($scope, $timeout, $ionicModal, profileService, addressService, glideraService, bwcError, lodash, ongoingProcess) {
|
||||
|
||||
var self = this;
|
||||
this.show2faCodeInput = null;
|
||||
|
|
@ -90,7 +90,7 @@ angular.module('copayApp.controllers').controller('buyGlideraController',
|
|||
addressService.getAddress(self.selectedWalletId, false, function(err, walletAddr) {
|
||||
if (err) {
|
||||
ongoingProcess.set('Buying Bitcoin...', false);
|
||||
self.error = bwsError.cb(err, 'Could not create address');
|
||||
self.error = bwcError.cb(err, 'Could not create address');
|
||||
return;
|
||||
}
|
||||
var data = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('indexController', function($rootScope, $scope, $log, $filter, $timeout, $ionicScrollDelegate, $ionicPopup, $ionicSideMenuDelegate, latestReleaseService, feeService, bwcService, pushNotificationsService, lodash, go, profileService, configService, rateService, storageService, addressService, gettext, gettextCatalog, amMoment, addonManager, bwsError, txFormatService, uxLanguage, glideraService, coinbaseService, platformInfo, addressbookService, openURLService, ongoingProcess) {
|
||||
angular.module('copayApp.controllers').controller('indexController', function($rootScope, $scope, $log, $filter, $timeout, $ionicScrollDelegate, $ionicPopup, $ionicSideMenuDelegate, latestReleaseService, feeService, bwcService, pushNotificationsService, lodash, go, profileService, configService, rateService, storageService, addressService, gettext, gettextCatalog, amMoment, addonManager, bwcError, txFormatService, uxLanguage, glideraService, coinbaseService, platformInfo, addressbookService, openURLService, ongoingProcess) {
|
||||
var self = this;
|
||||
var SOFT_CONFIRMATION_LIMIT = 12;
|
||||
var errors = bwcService.getErrors();
|
||||
|
|
@ -295,7 +295,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
twoStep: true
|
||||
}, function(err, ret) {
|
||||
if (err) {
|
||||
self.updateError = bwsError.msg(err, gettext('Could not update Wallet'));
|
||||
self.updateError = bwcError.msg(err, gettext('Could not update Wallet'));
|
||||
} else {
|
||||
self.isSingleAddress = !!ret.wallet.singleAddress;
|
||||
if (!opts.quiet)
|
||||
|
|
@ -428,7 +428,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
} else {
|
||||
var msg = ""
|
||||
$scope.$emit('Local/ClientError', (err.error ? err.error : err));
|
||||
var msg = bwsError.msg(err, gettext('Error at Wallet Service'));
|
||||
var msg = bwcError.msg(err, gettext('Error at Wallet Service'));
|
||||
self.showErrorPopup(msg);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('addressbookController', function($rootScope, $scope, $timeout, lodash, profileService, addressService, addressbookService, bwsError) {
|
||||
angular.module('copayApp.controllers').controller('addressbookController', function($rootScope, $scope, $timeout, lodash, profileService, addressService, addressbookService, bwcError) {
|
||||
var self = $scope.self;
|
||||
|
||||
var fc = profileService.focusedClient;
|
||||
|
|
@ -128,7 +128,7 @@ angular.module('copayApp.controllers').controller('addressbookController', funct
|
|||
$scope.errorSelectedWallet = {};
|
||||
|
||||
profileService.isReady(client, function(err) {
|
||||
if (err) $scope.errorSelectedWallet[walletId] = bwsError.msg(err);
|
||||
if (err) $scope.errorSelectedWallet[walletId] = bwcError.msg(err);
|
||||
else {
|
||||
$scope.gettingAddress = true;
|
||||
$scope.selectedWalletName = walletName;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('txpDetailsController', function($scope, $rootScope, $timeout, $interval, $ionicModal, platformInfo, txStatus, $ionicScrollDelegate, txFormatService, fingerprintService, bwsError, gettextCatalog, lodash, profileService, walletService) {
|
||||
angular.module('copayApp.controllers').controller('txpDetailsController', function($scope, $rootScope, $timeout, $interval, $ionicModal, platformInfo, txStatus, $ionicScrollDelegate, txFormatService, fingerprintService, bwcError, gettextCatalog, lodash, profileService, walletService) {
|
||||
var self = $scope.self;
|
||||
var tx = $scope.tx;
|
||||
var copayers = $scope.copayers;
|
||||
|
|
@ -29,14 +29,14 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
|
|||
|
||||
fingerprintService.check(fc, function(err) {
|
||||
if (err) {
|
||||
$scope.error = err;
|
||||
$scope.error = bwcError.msg(err);
|
||||
$scope.loading = null;
|
||||
return;
|
||||
}
|
||||
|
||||
handleEncryptedWallet(function(err) {
|
||||
if (err) {
|
||||
$scope.error = err;
|
||||
$scope.error = bwcError.msg(err);
|
||||
$scope.loading = null;
|
||||
return;
|
||||
}
|
||||
|
|
@ -44,7 +44,7 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
|
|||
walletService.signTx(fc, txp, function(err, signedTxp) {
|
||||
walletService.lock(fc);
|
||||
if (err) {
|
||||
$scope.error = err;
|
||||
$scope.error = bwcError.msg(err);
|
||||
$scope.loading = null;
|
||||
return;
|
||||
}
|
||||
|
|
@ -79,7 +79,7 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
|
|||
|
||||
if (err) {
|
||||
$scope.$emit('UpdateTx');
|
||||
$scope.error = bwsError.msg(err, gettextCatalog.getString('Could not reject payment'));
|
||||
$scope.error = bwcError.msg(err, gettextCatalog.getString('Could not reject payment'));
|
||||
$scope.$digest();
|
||||
} else {
|
||||
$scope.close(txpr);
|
||||
|
|
@ -99,7 +99,7 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
|
|||
// Hacky: request tries to parse an empty response
|
||||
if (err && !(err.message && err.message.match(/Unexpected/))) {
|
||||
$scope.$emit('UpdateTx');
|
||||
$scope.error = bwsError.msg(err, gettextCatalog.getString('Could not delete payment proposal'));
|
||||
$scope.error = bwcError.msg(err, gettextCatalog.getString('Could not delete payment proposal'));
|
||||
$scope.$digest();
|
||||
return;
|
||||
}
|
||||
|
|
@ -117,7 +117,7 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
|
|||
$scope.loading = null;
|
||||
|
||||
if (err) {
|
||||
$scope.error = bwsError.msg(err, gettextCatalog.getString('Could not broadcast payment'));
|
||||
$scope.error = bwcError.msg(err, gettextCatalog.getString('Could not broadcast payment'));
|
||||
$scope.$digest();
|
||||
return;
|
||||
}
|
||||
|
|
@ -211,7 +211,7 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
|
|||
if (!walletService.isEncrypted(fc)) return cb();
|
||||
$rootScope.$emit('Local/NeedsPassword', false, function(err, password) {
|
||||
if (err) return cb(err);
|
||||
return cb(null, walletService.unlock(fc, password));
|
||||
return cb(walletService.unlock(fc, password));
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('walletsController', function($scope, bwsError, profileService) {
|
||||
angular.module('copayApp.controllers').controller('walletsController', function($scope, bwcError, profileService) {
|
||||
|
||||
$scope.selectWallet = function(walletId) {
|
||||
|
||||
|
|
@ -8,8 +8,8 @@ angular.module('copayApp.controllers').controller('walletsController', function(
|
|||
$scope.errorSelectedWallet = {};
|
||||
|
||||
profileService.isReady(client, function(err) {
|
||||
if (err) {
|
||||
$scope.errorSelectedWallet[walletId] = bwsError.msg(err);
|
||||
if (err) {
|
||||
$scope.errorSelectedWallet[walletId] = bwcError.msg(err);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('sellCoinbaseController',
|
||||
function($rootScope, $scope, $log, $timeout, $ionicModal, lodash, profileService, coinbaseService, bwsError, configService, walletService, fingerprintService, ongoingProcess, go) {
|
||||
function($rootScope, $scope, $log, $timeout, $ionicModal, lodash, profileService, coinbaseService, configService, walletService, fingerprintService, ongoingProcess, go) {
|
||||
|
||||
var self = this;
|
||||
var client;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('sellGlideraController',
|
||||
function($rootScope, $scope, $timeout, $ionicModal, $log, configService, profileService, addressService, feeService, glideraService, bwsError, lodash, walletService, fingerprintService, ongoingProcess, go) {
|
||||
function($rootScope, $scope, $timeout, $ionicModal, $log, configService, profileService, addressService, feeService, glideraService, bwcError, lodash, walletService, fingerprintService, ongoingProcess, go) {
|
||||
|
||||
var self = this;
|
||||
var config = configService.getSync();
|
||||
|
|
@ -111,7 +111,7 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
|
|||
if (!refundAddress) {
|
||||
|
||||
ongoingProcess.clear();
|
||||
self.error = bwsError.msg(err, 'Could not create address');
|
||||
self.error = bwcError.msg(err, 'Could not create address');
|
||||
return;
|
||||
}
|
||||
glideraService.getSellAddress(token, function(error, sellAddress) {
|
||||
|
|
@ -145,20 +145,20 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
|
|||
walletService.createTx(client, txp, function(err, createdTxp) {
|
||||
ongoingProcess.clear();
|
||||
if (err) {
|
||||
self.error = err.message || bwsError.msg(err);
|
||||
self.error = err.message || bwcError.msg(err);
|
||||
return;
|
||||
}
|
||||
$scope.$emit('Local/NeedsConfirmation', createdTxp, function(accept) {
|
||||
if (accept) {
|
||||
fingerprintService.check(client, function(err) {
|
||||
if (err) {
|
||||
self.error = err.message || bwsError.msg(err);
|
||||
self.error = err.message || bwcError.msg(err);
|
||||
return;
|
||||
}
|
||||
|
||||
handleEncryptedWallet(client, function(err) {
|
||||
if (err) {
|
||||
self.error = err.message || bwsError.msg(err);
|
||||
self.error = err.message || bwcError.msg(err);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
|
|||
walletService.publishTx(client, createdTxp, function(err, publishedTxp) {
|
||||
if (err) {
|
||||
ongoingProcess.clear();
|
||||
self.error = err.message || bwsError.msg(err);
|
||||
self.error = err.message || bwcError.msg(err);
|
||||
}
|
||||
|
||||
walletService.signTx(client, publishedTxp, function(err, signedTxp) {
|
||||
|
|
@ -176,7 +176,7 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
|
|||
});
|
||||
ongoingProcess.clear();
|
||||
if (err) {
|
||||
self.error = err.message || bwsError.msg(err);
|
||||
self.error = err.message || bwcError.msg(err);
|
||||
return;
|
||||
}
|
||||
var rawTx = signedTxp.raw;
|
||||
|
|
@ -191,7 +191,7 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
|
|||
glideraService.sell(token, twoFaCode, data, function(err, data) {
|
||||
ongoingProcess.clear();
|
||||
if (err) {
|
||||
self.error = err.message || bwsError.msg(err);
|
||||
self.error = err.message || bwcError.msg(err);
|
||||
$timeout(function() {
|
||||
$scope.$emit('Local/GlideraError');
|
||||
}, 100);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, notification, txStatus, profileService, lodash, configService, rateService, storageService, bitcore, gettext, gettextCatalog, platformInfo, addressService, ledger, bwsError, confirmDialog, txFormatService, addressbookService, go, feeService, walletService, fingerprintService, nodeWebkit, ongoingProcess) {
|
||||
angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, notification, txStatus, profileService, lodash, configService, rateService, storageService, bitcore, gettext, gettextCatalog, platformInfo, addressService, ledger, bwcError, confirmDialog, txFormatService, addressbookService, go, feeService, walletService, fingerprintService, nodeWebkit, ongoingProcess) {
|
||||
|
||||
var isCordova = platformInfo.isCordova;
|
||||
var isWP = platformInfo.isWP;
|
||||
|
|
@ -365,7 +365,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
var prefix =
|
||||
fc.credentials.m > 1 ? gettextCatalog.getString('Could not create payment proposal') : gettextCatalog.getString('Could not send payment');
|
||||
|
||||
this.error = bwsError.msg(err, prefix);
|
||||
this.error = bwcError.msg(err, prefix);
|
||||
|
||||
$timeout(function() {
|
||||
$scope.$digest();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
'use strict';
|
||||
angular.module('copayApp.services')
|
||||
.factory('addressService', function(storageService, profileService, $log, $timeout, lodash, bwsError, gettextCatalog) {
|
||||
.factory('addressService', function(storageService, profileService, $log, $timeout, lodash, bwcError, gettextCatalog) {
|
||||
var root = {};
|
||||
|
||||
root.expireAddress = function(walletId, cb) {
|
||||
|
|
@ -44,7 +44,7 @@ angular.module('copayApp.services')
|
|||
return cb(null, addr[0].address);
|
||||
});
|
||||
}
|
||||
return bwsError.cb(err, prefix, cb);
|
||||
return bwcError.cb(err, prefix, cb);
|
||||
}
|
||||
return cb(null, addr.address);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
angular.module('copayApp.services')
|
||||
.factory('bwsError', function bwcErrorService($log, gettextCatalog) {
|
||||
.factory('bwcError', function bwcErrorService($log, gettextCatalog) {
|
||||
var root = {};
|
||||
|
||||
root.msg = function(err, prefix) {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
angular.module('copayApp.services')
|
||||
.factory('profileService', function profileServiceFactory($rootScope, $timeout, $filter, $log, sjcl, lodash, storageService, bwcService, configService, notificationService, pushNotificationsService, gettext, gettextCatalog, bwsError, uxLanguage, bitcore, platformInfo, walletService) {
|
||||
.factory('profileService', function profileServiceFactory($rootScope, $timeout, $filter, $log, sjcl, lodash, storageService, bwcService, configService, notificationService, pushNotificationsService, gettext, gettextCatalog, bwcError, uxLanguage, bitcore, platformInfo, walletService) {
|
||||
|
||||
|
||||
var isChromeApp = platformInfo.isChromeApp;
|
||||
|
|
@ -357,7 +357,7 @@ angular.module('copayApp.services')
|
|||
singleAddress: opts.singleAddress,
|
||||
walletPrivKey: opts.walletPrivKey,
|
||||
}, function(err, secret) {
|
||||
if (err) return bwsError.cb(err, gettext('Error creating wallet'), cb);
|
||||
if (err) return bwcError.cb(err, gettext('Error creating wallet'), cb);
|
||||
return cb(null, walletClient, secret);
|
||||
});
|
||||
});
|
||||
|
|
@ -405,8 +405,8 @@ angular.module('copayApp.services')
|
|||
|
||||
// check if exist
|
||||
if (lodash.find(root.profile.credentials, {
|
||||
'walletId': walletData.walletId
|
||||
})) {
|
||||
'walletId': walletData.walletId
|
||||
})) {
|
||||
return cb(gettext('Cannot join the same wallet more that once'));
|
||||
}
|
||||
} catch (ex) {
|
||||
|
|
@ -420,7 +420,7 @@ angular.module('copayApp.services')
|
|||
if (err) return cb(err);
|
||||
|
||||
walletClient.joinWallet(opts.secret, opts.myName || 'me', {}, function(err) {
|
||||
if (err) return bwsError.cb(err, gettext('Could not join wallet'), cb);
|
||||
if (err) return bwcError.cb(err, gettext('Could not join wallet'), cb);
|
||||
root.addAndBindWalletClient(walletClient, {
|
||||
bwsurl: opts.bwsurl
|
||||
}, cb);
|
||||
|
|
@ -583,7 +583,7 @@ angular.module('copayApp.services')
|
|||
if (err instanceof errors.NOT_AUTHORIZED)
|
||||
return cb(err);
|
||||
|
||||
return bwsError.cb(err, gettext('Could not import'), cb);
|
||||
return bwcError.cb(err, gettext('Could not import'), cb);
|
||||
}
|
||||
|
||||
root.addAndBindWalletClient(walletClient, {
|
||||
|
|
@ -614,7 +614,7 @@ angular.module('copayApp.services')
|
|||
if (err instanceof errors.NOT_AUTHORIZED)
|
||||
return cb(err);
|
||||
|
||||
return bwsError.cb(err, gettext('Could not import'), cb);
|
||||
return bwcError.cb(err, gettext('Could not import'), cb);
|
||||
}
|
||||
|
||||
root.addAndBindWalletClient(walletClient, {
|
||||
|
|
@ -637,7 +637,7 @@ angular.module('copayApp.services')
|
|||
if (err instanceof errors.NOT_AUTHORIZED)
|
||||
err.name = 'WALLET_DOES_NOT_EXIST';
|
||||
|
||||
return bwsError.cb(err, gettext('Could not import'), cb);
|
||||
return bwcError.cb(err, gettext('Could not import'), cb);
|
||||
}
|
||||
|
||||
root.addAndBindWalletClient(walletClient, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue