Secure share modal

This commit is contained in:
yflory
2019-05-29 19:00:20 +02:00
parent bfba5ff33b
commit fb0827107b
19 changed files with 405 additions and 77 deletions

View File

@@ -50,7 +50,8 @@ define([
var postMsg = function (data) {
iframe.postMessage(data, '*');
};
var whenReady = waitFor(function (msg) {
var w = waitFor();
var whenReady = function (msg) {
if (msg.source !== iframe) { return; }
var data = JSON.parse(msg.data);
if (!data.txid) { return; }
@@ -67,7 +68,8 @@ define([
config.modules.SFrameChannel.create(msgEv, postMsg, waitFor(function (sfc) {
sframeChan = sfc;
}));
});
w();
};
window.addEventListener('message', whenReady);
}).nThen(function () {
var updateMeta = function () {