taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit ef5bc2c353de02568a907bb8fe3d4da33758360f
parent 11a400d533bae431966288bc856e5f263ce20b72
Author: Florian Dold <florian.dold@gmail.com>
Date:   Tue, 11 Oct 2016 20:26:37 +0200

make ping side-effect free

Diffstat:
Mcontent_scripts/notify.ts | 2+-
Mlib/wallet/wxMessaging.ts | 8+++++---
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/content_scripts/notify.ts b/content_scripts/notify.ts @@ -96,7 +96,7 @@ namespace TalerNotify { } function init() { - chrome.runtime.sendMessage({type: "ping"}, (resp) => { + chrome.runtime.sendMessage({type: "get-tab-cookie"}, (resp) => { if (chrome.runtime.lastError) { console.log("extension not yet ready"); window.setTimeout(init, 200); diff --git a/lib/wallet/wxMessaging.ts b/lib/wallet/wxMessaging.ts @@ -54,7 +54,7 @@ function makeHandlers(db: IDBDatabase, ["dump-db"]: function(detail, sender) { return exportDb(db); }, - ["ping"]: function(detail, sender) { + ["get-tab-cookie"]: function(detail, sender) { if (!sender || !sender.tab || !sender.tab.id) { return Promise.resolve(); } @@ -63,6 +63,9 @@ function makeHandlers(db: IDBDatabase, delete paymentRequestCookies[id]; return Promise.resolve(info); }, + ["ping"]: function(detail, sender) { + return Promise.resolve(); + }, ["reset"]: function(detail, sender) { if (db) { let tx = db.transaction(Array.from(db.objectStoreNames), 'readwrite'); @@ -389,4 +392,4 @@ export function wxMain() { console.error("could not initialize wallet messaging"); console.error(e); }); -} -\ No newline at end of file +}