From 04aad590fb9e6141982a3d0a5aec7c29356e9c76 Mon Sep 17 00:00:00 2001
From: Florian Dold <florian.dold@gmail.com>
Date: Sun, 12 Feb 2017 04:40:28 +0100
Subject: accept exchange URL suggestion from bank

---
 src/pages/confirm-create-reserve.tsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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

diff --git a/src/pages/confirm-create-reserve.tsx b/src/pages/confirm-create-reserve.tsx
index da86729d3..44dd60d95 100644
--- a/src/pages/confirm-create-reserve.tsx
+++ b/src/pages/confirm-create-reserve.tsx
@@ -396,7 +396,11 @@ export async function main() {
       throw Error(i18n.str`Can't parse wire_types: ${e.message}`);
     }
 
-    const suggestedExchangeUrl = await getSuggestedExchange(amount.currency);
+    let suggestedExchangeUrl = await getSuggestedExchange(amount.currency);
+    if (!suggestedExchangeUrl && query.suggested_exchange_url) {
+      suggestedExchangeUrl = query.suggested_exchange_url;
+    }
+
     let args = {
       wt_types,
       suggestedExchangeUrl,
-- 
cgit v1.2.3

