mirror of
https://github.com/fullstack-cash/fullstack-gatsby-theme-bch-wallet.git
synced 2026-09-21 16:52:06 -07:00
fix(price): Replacing older instances of price retrieval
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user