mirror of
https://github.com/fullstack-cash/fullstack-gatsby-theme-bch-wallet.git
synced 2026-09-21 16:52:06 -07:00
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:
@@ -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!')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user