From 29dfafaa1282d6b1e03bd7211ce598a09c22bae7 Mon Sep 17 00:00:00 2001
From: Florian Dold <florian.dold@gmail.com>
Date: Fri, 19 Feb 2016 04:23:00 +0100
Subject: error handling

---
 extension/pages/confirm-create-reserve.tsx | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

(limited to 'extension/pages/confirm-create-reserve.tsx')

diff --git a/extension/pages/confirm-create-reserve.tsx b/extension/pages/confirm-create-reserve.tsx
index 386fa24e3..9ae2938f3 100644
--- a/extension/pages/confirm-create-reserve.tsx
+++ b/extension/pages/confirm-create-reserve.tsx
@@ -23,6 +23,7 @@ import {IMintInfo} from "../lib/wallet/types";
 import {ReserveCreationInfo} from "../lib/wallet/types";
 import MithrilComponent = _mithril.MithrilComponent;
 import {Denomination} from "../lib/wallet/types";
+import {getReserveCreationInfo} from "../lib/wallet/wxApi";
 
 "use strict";
 
@@ -273,24 +274,6 @@ function getSuggestedMint(currency: string): Promise<string> {
 }
 
 
-function getReserveCreationInfo(baseUrl: string,
-                                amount: AmountJson): Promise<ReserveCreationInfo> {
-  let m = {type: "reserve-creation-info", detail: {baseUrl, amount}};
-  return new Promise((resolve, reject) => {
-    chrome.runtime.sendMessage(m, (resp) => {
-      if (resp.error) {
-        console.error("error response", resp);
-        let e = Error("call to reserve-creation-info failed");
-        (e as any).errorResponse = resp;
-        reject(e);
-        return;
-      }
-      resolve(resp);
-    });
-  });
-}
-
-
 export function main() {
   const url = URI(document.location.href);
   const query: any = URI.parseQuery(url.query());
-- 
cgit v1.2.3

