diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-03-04 18:07:10 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-03-04 18:07:10 +0100 |
commit | 26695aa3513b2eb7c37d978b8c1534f6bc484a07 (patch) | |
tree | 1780d58be7e632cb79ecbc03b9eef0167903f447 /content_scripts/notify.ts | |
parent | 14b04451768fdd29e7d0ddcb406fdd2889b34e0d (diff) |
remove legacy message
Diffstat (limited to 'content_scripts/notify.ts')
-rw-r--r-- | content_scripts/notify.ts | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/content_scripts/notify.ts b/content_scripts/notify.ts index f400b4279..e53a11c93 100644 --- a/content_scripts/notify.ts +++ b/content_scripts/notify.ts @@ -128,47 +128,6 @@ namespace TalerNotify { }); - // XXX: remove in a bit, just here for compatibility ... - addHandler("taler-contract", function(e: CustomEvent) { - // XXX: the merchant should just give us the parsed data ... - let offer = JSON.parse(e.detail); - - if (!offer.contract) { - console.error("contract field missing"); - return; - } - - let msg = { - type: "check-repurchase", - detail: { - contract: offer.contract - }, - }; - - chrome.runtime.sendMessage(msg, (resp) => { - if (resp.error) { - console.error("wallet backend error", resp); - return; - } - if (resp.isRepurchase) { - console.log("doing repurchase"); - console.assert(resp.existingFulfillmentUrl); - console.assert(resp.existingContractHash); - window.location.href = subst(resp.existingFulfillmentUrl, - resp.existingContractHash); - - } else { - let uri = URI(chrome.extension.getURL("pages/confirm-contract.html")); - let params = { - offer: JSON.stringify(offer), - merchantPageUrl: document.location.href, - }; - document.location.href = uri.query(params).href(); - } - }); - }); - - addHandler("taler-confirm-contract", function(e: CustomEvent) { if (!e.detail.contract_wrapper) { console.error("contract wrapper missing"); |