Cleaning controllers. Also call connect socket-ii in all pages. Everything work!
This commit is contained in:
parent
5d83d180da
commit
8ab479691d
6 changed files with 68 additions and 46 deletions
|
|
@ -1,13 +1,17 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copay.send').controller('SendController',
|
||||
function($scope, $rootScope, $location) {
|
||||
function($scope, $rootScope, $location, Socket, controllerUtils) {
|
||||
$scope.title = 'Send';
|
||||
|
||||
if (!$rootScope.wallet.id) {
|
||||
if (!$rootScope.wallet || !$rootScope.wallet.id) {
|
||||
$location.path('signin');
|
||||
}
|
||||
|
||||
else {
|
||||
var socket = Socket($scope);
|
||||
socket.on('connect', controllerUtils.handleTransactionByAddress($scope));
|
||||
|
||||
}
|
||||
|
||||
$scope.sendTest = function() {
|
||||
var w = $rootScope.wallet;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue