diff --git a/www/common/outer/mailbox.js b/www/common/outer/mailbox.js index a876b038d..5e1d23780 100644 --- a/www/common/outer/mailbox.js +++ b/www/common/outer/mailbox.js @@ -339,6 +339,7 @@ proxy.mailboxes = { if (!req) { return; } if (type === 'HISTORY_RANGE') { + if (!Array.isArray(_msg)) { return; } var message; try { var decrypted = box.encryptor.decrypt(_msg[4]); @@ -348,6 +349,7 @@ proxy.mailboxes = { } ctx.emit('HISTORY', { txid: txid, + time: _msg[5], message: message, hash: _msg[4].slice(0,64) }, [req.cId]); @@ -375,7 +377,7 @@ proxy.mailboxes = { var network = ctx.store.network; network.sendto(network.historyKeeper, JSON.stringify(msg)).then(function () { }, function (err) { - throw new Error(err); + console.error(err); }); }; diff --git a/www/common/sframe-common-mailbox.js b/www/common/sframe-common-mailbox.js index 791525c4c..0772d25ab 100644 --- a/www/common/sframe-common-mailbox.js +++ b/www/common/sframe-common-mailbox.js @@ -199,6 +199,7 @@ define([ type: type, content: { msg: data.message, + time: data.time, hash: data.hash } });