Async store part 1

This commit is contained in:
yflory
2017-11-30 10:33:09 +01:00
parent 96cf83af34
commit 0840570fbf
20 changed files with 1394 additions and 805 deletions

View File

@@ -2,7 +2,7 @@ define([
'/common/common-util.js',
'/bower_components/tweetnacl/nacl-fast.min.js',
], function (Util) {
var Nacl = window.nacl;
var Nacl = self.nacl;
var uid = Util.uid;
var signMsg = function (data, signKey) {
@@ -140,7 +140,7 @@ types of messages:
var send = ctx.send = function (type, msg, cb) {
if (!ctx.connected && type !== 'COOKIE') {
return void window.setTimeout(function () {
return void self.setTimeout(function () {
cb('DISCONNECTED');
});
}
@@ -185,7 +185,7 @@ types of messages:
send.unauthenticated = function (type, msg, cb) {
if (!ctx.connected) {
return void window.setTimeout(function () {
return void self.setTimeout(function () {
cb('DISCONNECTED');
});
}
@@ -276,7 +276,7 @@ types of messages:
var send = ctx.send = function (type, msg, cb) {
if (!ctx.connected) {
return void window.setTimeout(function () {
return void self.setTimeout(function () {
cb('DISCONNECTED');
});
}