|
|
@ -1285,7 +1285,7 @@ define([
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
teamName = roster.getState().metadata.name;
|
|
|
|
teamName = roster.getState().metadata.name;
|
|
|
|
} catch (err) {
|
|
|
|
} catch (err) {
|
|
|
|
return void cb("TEAM_NAME_ERR");
|
|
|
|
return void cb({ error: "TEAM_NAME_ERR" });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var message = data.message;
|
|
|
|
var message = data.message;
|
|
|
@ -1342,7 +1342,7 @@ define([
|
|
|
|
if (err) {
|
|
|
|
if (err) {
|
|
|
|
console.error("CRYPTPUT_ERR", err);
|
|
|
|
console.error("CRYPTPUT_ERR", err);
|
|
|
|
w.abort();
|
|
|
|
w.abort();
|
|
|
|
return void cb("SET_PREVIEW_CONTENT");
|
|
|
|
return void cb({ error: "SET_PREVIEW_CONTENT" });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}), putOpts);
|
|
|
|
}), putOpts);
|
|
|
|
}());
|
|
|
|
}());
|
|
|
@ -1378,7 +1378,7 @@ define([
|
|
|
|
if (err) {
|
|
|
|
if (err) {
|
|
|
|
console.error("CRYPTPUT_ERR", err);
|
|
|
|
console.error("CRYPTPUT_ERR", err);
|
|
|
|
w.abort();
|
|
|
|
w.abort();
|
|
|
|
return void cb("SET_PREVIEW_CONTENT");
|
|
|
|
return void cb({ error: "SET_PREVIEW_CONTENT" });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}), putOpts);
|
|
|
|
}), putOpts);
|
|
|
|
}());
|
|
|
|
}());
|
|
|
@ -1419,7 +1419,7 @@ define([
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
previewKeys = Invite.derivePreviewKeys(seeds.preview);
|
|
|
|
previewKeys = Invite.derivePreviewKeys(seeds.preview);
|
|
|
|
} catch (err) {
|
|
|
|
} catch (err) {
|
|
|
|
return void cb("INVALID_SEEDS");
|
|
|
|
return void cb({ error: "INVALID_SEEDS" });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Crypt.get({ // secrets
|
|
|
|
Crypt.get({ // secrets
|
|
|
|
channel: previewKeys.channel,
|
|
|
|
channel: previewKeys.channel,
|
|
|
@ -1429,13 +1429,13 @@ define([
|
|
|
|
cryptKey: previewKeys.cryptKey,
|
|
|
|
cryptKey: previewKeys.cryptKey,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}, function (err, val) {
|
|
|
|
}, function (err, val) {
|
|
|
|
if (err) { return void cb(err); }
|
|
|
|
if (err) { return void cb({ error: err }); }
|
|
|
|
if (!val) { return void cb('DELETED'); }
|
|
|
|
if (!val) { return void cb({ error: 'DELETED' }); }
|
|
|
|
|
|
|
|
|
|
|
|
var json = Util.tryParse(val);
|
|
|
|
var json = Util.tryParse(val);
|
|
|
|
if (!json) { return void cb("parseError"); }
|
|
|
|
if (!json) { return void cb({ error: "parseError" }); }
|
|
|
|
console.error("JSON", json);
|
|
|
|
console.error("JSON", json);
|
|
|
|
cb(void 0, json);
|
|
|
|
cb(json);
|
|
|
|
}, { // cryptget opts
|
|
|
|
}, { // cryptget opts
|
|
|
|
network: ctx.store.network,
|
|
|
|
network: ctx.store.network,
|
|
|
|
initialState: '{}',
|
|
|
|
initialState: '{}',
|
|
|
@ -1448,7 +1448,7 @@ define([
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
previewKeys = Invite.deriveInviteKeys(bytes64);
|
|
|
|
previewKeys = Invite.deriveInviteKeys(bytes64);
|
|
|
|
} catch (err) {
|
|
|
|
} catch (err) {
|
|
|
|
return void cb("INVALID_SEEDS");
|
|
|
|
return void cb({ error: "INVALID_SEEDS" });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Crypt.get({ // secrets
|
|
|
|
Crypt.get({ // secrets
|
|
|
|
channel: previewKeys.channel,
|
|
|
|
channel: previewKeys.channel,
|
|
|
@ -1458,12 +1458,12 @@ define([
|
|
|
|
cryptKey: previewKeys.cryptKey,
|
|
|
|
cryptKey: previewKeys.cryptKey,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}, function (err, val) {
|
|
|
|
}, function (err, val) {
|
|
|
|
if (err) { return void cb(err); }
|
|
|
|
if (err) { return void cb({error: err}); }
|
|
|
|
if (!val) { return void cb('DELETED'); }
|
|
|
|
if (!val) { return void cb({error: 'DELETED'}); }
|
|
|
|
|
|
|
|
|
|
|
|
var json = Util.tryParse(val);
|
|
|
|
var json = Util.tryParse(val);
|
|
|
|
if (!json) { return void cb("parseError"); }
|
|
|
|
if (!json) { return void cb({error: "parseError"}); }
|
|
|
|
cb(void 0, json);
|
|
|
|
cb(json);
|
|
|
|
}, { // cryptget opts
|
|
|
|
}, { // cryptget opts
|
|
|
|
network: ctx.store.network,
|
|
|
|
network: ctx.store.network,
|
|
|
|
initialState: '{}',
|
|
|
|
initialState: '{}',
|
|
|
|