Closed gideonokyere closed 5 years ago
You have to make sure incoming transactions have 6+ confirmations before trying to send them out. This can take tens of minutes sometimes. If this is still failing then set a breakpoint on line 200 and check why availableSat
is less than amtSatoshi
. Which of these numbers isn't lining up?
when i console log the availableSat i get 0
For whatever reason the from address is not reading in the UTXOs properly. Make sure from
is set on sendTransaction(options)
in the options object and that is set to the correct address. The blockexplorer default UTXO endpoint seems to be working fine from what I can see.
ok i will check it
Am still getting the same error
this is what i get when i console log utxos [ { txid: '388406b5eab4738f05267c75555607480bd8e815f7d54962c87525dc65823f2f', vout: 0, satoshis: 13164888, confirmations: -4024 } ]
The issue is with the confirmations being -4024. They need to be 6 or more. Not even sure how a number like -4024 gets returned. Are you on mainnet? If so, try switching to a different provider: bitcoinTransaction.providers.utxo.mainnet.default = bitcoinTransaction.providers.utxo.mainnet.blockchain;
There is only one provider on testnet unfortunately, so it may be the case that mainnet is working fine, but the testnet provider is just broken.
i always get "You do not have enough in your wallet to send that much" when i try to send btc to a different address. i have try all the fee type . my balance is 0.10545915 and am sending 0.001343365.