From d82c2fd49e337b3d2e29293ebd3bc93db6f5c741 Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Tue, 20 Oct 2020 12:01:24 -0700 Subject: [PATCH] fix(price): Replacing older instances of price retrieval --- src/components/admin-lte/send-receive/send.js | 2 +- src/components/admin-lte/wallet/create.js | 2 +- src/components/admin-lte/wallet/import.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/admin-lte/send-receive/send.js b/src/components/admin-lte/send-receive/send.js index c5ef609..bf4c36f 100644 --- a/src/components/admin-lte/send-receive/send.js +++ b/src/components/admin-lte/send-receive/send.js @@ -221,7 +221,7 @@ class Send extends React.Component { setTimeout(async () => { const myBalance = await bchWalletLib.getBalance() const bchjs = bchWalletLib.bchjs - const currentRate = await bchjs.Price.current('usd') + const currentRate = await bchjs.Price.getUsd() * 100 _this.props.updateBalance({ myBalance, currentRate }) }, 1000) diff --git a/src/components/admin-lte/wallet/create.js b/src/components/admin-lte/wallet/create.js index 2fb5286..e271f9e 100644 --- a/src/components/admin-lte/wallet/create.js +++ b/src/components/admin-lte/wallet/create.js @@ -108,7 +108,7 @@ class NewWallet extends React.Component { const myBalance = await bchWalletLib.getBalance() const bchjs = bchWalletLib.bchjs - const currentRate = await bchjs.Price.current('usd') + const currentRate = await bchjs.Price.getUsd() * 100 // console.log("myBalance", myBalance) // Update redux state diff --git a/src/components/admin-lte/wallet/import.js b/src/components/admin-lte/wallet/import.js index 7044289..92c52d7 100644 --- a/src/components/admin-lte/wallet/import.js +++ b/src/components/admin-lte/wallet/import.js @@ -148,7 +148,7 @@ class ImportWallet extends React.Component { const myBalance = await bchWalletLib.getBalance() const bchjs = bchWalletLib.bchjs - const currentRate = await bchjs.Price.current('usd') + const currentRate = await bchjs.Price.getUsd() * 100 // Update redux state _this.props.setWalletInfo(currentWallet)