Merge pull request #144 from Permissionless-Software-Foundation/dh-fix-send-max

fix(send-max): Fixed send max button error
This commit is contained in:
Chris Troutner
2021-04-14 15:28:49 -07:00
committed by GitHub
@@ -211,13 +211,11 @@ class Send extends React.Component {
async getMaxAmount () { async getMaxAmount () {
try { try {
const bchWalletLib = _this.props.bchWallet const bchWalletLib = _this.props.bchWallet
// Ensure the wallet UTXOs are up-to-date. // Ensure the wallet UTXOs are up-to-date.
const walletAddr = bchWalletLib.walletInfo.address const walletAddr = bchWalletLib.walletInfo.address
await bchWalletLib.utxos.initUtxoStore(walletAddr) await bchWalletLib.utxos.initUtxoStore(walletAddr)
const utxos = bchWalletLib.utxos.bchUtxos const utxos = bchWalletLib.utxos.utxoStore.bchUtxos
if (!utxos.length) { if (!utxos.length) {
throw new Error('No BCH Utxos to spend!') throw new Error('No BCH Utxos to spend!')
} }