                 xhrFields :
                   withCredentials: yes
               }
-      
+
       getKiteUri =(kiteName)-> KD.apiUri+"/1.0/kite/#{kiteName}"
-      
+
       sendCommand =(channelId, kiteName, args, callbackId)->
         scrubber = new Scrubber localStore
         scrubber.scrub args, =>
           scrubbed = scrubber.toDnodeProtocol()
           scrubbed.method or= callbackId
           sendScrubbedCommand channelId, getKiteUri(kiteName), scrubbed
-      
+
       request = (secretChannelId, callbackId, args)->
         kiteName = secretChannelId.split('-')[1]
         sendCommand secretChannelId, kiteName, [{

        else
          nonces = nonces.concat moreNonces
        callback nonces
    
    fetchNonce = (callback)->
      nonce = nonces.shift()
      if nonce? then callback nonce
      else fetchNonces -> fetchNonce callback
    
    JAccount::fetchNonce = fetchNonce
    
    JAccount::fetchKiteChannelName = (kiteId, callback)->
      @_kiteChannels or= {}
      kiteChannelId = @_kiteChannels[kiteId]

                channel.bind 'error', myMessageHandler
                channel.bind 'changeTransport', changeTransport.bind null, secretChannelId
                callback channel

      (options, callback)->
        account = @
        @fetchKiteChannelName options.kiteName, (err, secretChannelId)->
