Merge branch 'master' into feature/refreshTokens_afterSend

This commit is contained in:
Chris Troutner
2020-10-09 10:24:41 -07:00
3 changed files with 10 additions and 5 deletions
@@ -177,11 +177,14 @@ class Send extends React.Component {
amountSat = (amountSat / (_this.props.currentRate / 100)).toFixed(8)
}
const amountToSend = Math.floor(Number(amountSat) * 100000000)
console.log(`Sending ${amountToSend} satoshis to ${address}`)
const receivers = [
{
address,
// amount in satoshis, 1 satoshi = 0.00000001 Bitcoin
amountSat: Math.floor(Number(amountSat) * 100000000)
amountSat: amountToSend
}
]
// console.log("receivers", receivers)
+2 -2
View File
@@ -9,8 +9,8 @@ const AdminLTE =
// Maps the props that are going to be sended
// to the component connected with Redux
const mapStateToProps = ({ walletInfo, bchBalance, bchWallet, tokensInfo }) => {
return { walletInfo, bchBalance, bchWallet, tokensInfo }
const mapStateToProps = ({ walletInfo, bchBalance, bchWallet, tokensInfo, currentRate }) => {
return { walletInfo, bchBalance, bchWallet, tokensInfo, currentRate }
}
// Send each action of the reducer as props
+4 -2
View File
@@ -37,7 +37,8 @@ const reducer = (state, action) => {
const usdBalance = Number(_usdBalance.toFixed(2)) // usd balance
return Object.assign({}, state, {
bchBalance: { bchBalance, usdBalance }
bchBalance: { bchBalance, usdBalance },
currentRate
})
}
// Adds the minimal-slp-wallet instance to the Redux state
@@ -93,7 +94,8 @@ const initialState = {
walletInfo: localStorageInfo, // Object wallet info
bchBalance: { bchBalance: 0, usdBalance: 0 }, // Wallet Balance
bchWallet: instanceWallet(), // minimal-slp-wallet instance
tokensInfo: []
tokensInfo: [],
currentRate: 0
}
const createStore = () => reduxCreateStore(reducer, initialState)