From 27a42f92572abfdb2e60f3f212e4f0fcc71a6961 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 24 May 2016 17:30:27 +0200 Subject: respond to failed payments --- lib/wallet/wxMessaging.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/wallet/wxMessaging.ts') diff --git a/lib/wallet/wxMessaging.ts b/lib/wallet/wxMessaging.ts index 522a87285..d5c32229d 100644 --- a/lib/wallet/wxMessaging.ts +++ b/lib/wallet/wxMessaging.ts @@ -141,6 +141,13 @@ function makeHandlers(db: IDBDatabase, // TODO: limit history length return wallet.getHistory(); }, + ["payment-failed"]: function(detail, sender) { + // For now we just update exchanges (maybe the exchange did something + // wrong and the keys were messed up). + // FIXME: in the future we should look at what actually went wrong. + wallet.updateExchanges(); + return Promise.resolve(); + }, }; } @@ -155,6 +162,7 @@ class ChromeBadge implements Badge { } startBusy() { + this.setColor("#00F"); this.setText("..."); } -- cgit v1.2.3