From 0989424d7380f827218273c464732a1cf77a0acb Mon Sep 17 00:00:00 2001 From: Daniel Ternyak Date: Tue, 5 Sep 2017 15:07:28 -0500 Subject: [PATCH] Refactor Bity (#166) * Refactor bity config * fix bug in refactor that would cause destinationKind amount to not load * use function instead of string replace for building blockexplorers per PR comment --- common/api/bity.js | 2 +- .../BalanceSidebar/BalanceSidebar.jsx | 10 +-- .../TransactionSucceeded.js | 4 +- common/config/bity.js | 75 +++++++++++-------- common/config/data.js | 33 +++++--- .../Tabs/Swap/components/CurrencySwap.jsx | 12 +-- .../Tabs/Swap/components/SwapProgress.jsx | 4 +- 7 files changed, 79 insertions(+), 61 deletions(-) diff --git a/common/api/bity.js b/common/api/bity.js index 84f8e8fe..06b49204 100644 --- a/common/api/bity.js +++ b/common/api/bity.js @@ -57,7 +57,7 @@ export function getOrderStatus(orderid: string) { } function _getAllRates() { - return fetch(`${bityConfig.bityAPI}/v1/rate2/`) + return fetch(`${bityConfig.bityURL}/v1/rate2/`) .then(checkHttpStatus) .then(parseJSON); } diff --git a/common/components/BalanceSidebar/BalanceSidebar.jsx b/common/components/BalanceSidebar/BalanceSidebar.jsx index f29bfdd8..131a0894 100644 --- a/common/components/BalanceSidebar/BalanceSidebar.jsx +++ b/common/components/BalanceSidebar/BalanceSidebar.jsx @@ -96,19 +96,13 @@ export class BalanceSidebar extends React.Component {