mirror of
https://github.com/fullstack-cash/fullstack-gatsby-theme-bch-wallet.git
synced 2026-09-21 16:52:06 -07:00
Merge branch 'master' into feature/refreshTokens_afterSend
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user