add client check
This commit is contained in:
parent
2ca6164d85
commit
487e372889
3 changed files with 10 additions and 1 deletions
|
|
@ -3,7 +3,6 @@
|
|||
angular.module('copayApp.controllers').controller('buyCoinbaseController',
|
||||
function($scope, $modal, $log, $ionicModal, $timeout, lodash, profileService, coinbaseService, bwsError, addressService) {
|
||||
var self = this;
|
||||
var fc;
|
||||
|
||||
this.init = function(testnet) {
|
||||
self.allWallets = profileService.getWallets(testnet ? 'testnet' : 'livenet', 1)
|
||||
|
|
|
|||
|
|
@ -142,6 +142,11 @@ angular.module('copayApp.controllers').controller('sellCoinbaseController',
|
|||
this.createTx = function(token, account, amount) {
|
||||
self.error = null;
|
||||
|
||||
if (!client) {
|
||||
self.error = 'No wallet selected';
|
||||
return;
|
||||
}
|
||||
|
||||
var accountId = account.id;
|
||||
var dataSrc = {
|
||||
name: 'Received from Copay: ' + self.selectedWalletName
|
||||
|
|
|
|||
|
|
@ -94,6 +94,11 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
|
|||
var configWallet = config.wallet;
|
||||
var walletSettings = configWallet.settings;
|
||||
|
||||
if (!client) {
|
||||
self.error = 'No wallet selected';
|
||||
return;
|
||||
}
|
||||
|
||||
addressService.getAddress(client.credentials.walletId, null, function(err, refundAddress) {
|
||||
if (!refundAddress) {
|
||||
self.loading = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue