2
According to https://github.com/blockchain/api-v1-client-node/tree/master/MyWallet#send-bitcoin wallet.send doesn't require a from field. When I run wallet.getBalance() it states that I have BTC in my wallet (received days ago). However if I do:
const balanceResponse = await wallet.getBalance();
console.log(balanceResponse);
// { balance: 100000000 }
wallet.send("<receiving address>", 510000, {
fee: 10000
})
{"error":"Insufficient funds","available":0,"needed":0.0051,"sweep_amount_satoshi":0,"sweep_fee_satoshi":0}
I've only ever received BTC once in my wallet. If I use that address in the from field:
wallet.send("<receiving address>", 510000, {
from: "<sending address>",
fee: 10000
})
I now get
{"error":"Error signing and pushing transaction"}
What am I doing wrong?
wallet.getBalance()shows my balance the send call happens right after, I only have 1 wallet which is the default one. If I haven't correctly authenticated I would assume thatwallet.getBalance()would fail right? – Kit Sunde – 2017-05-20T17:31:01.490@KitSunde: Could you perhaps add the response of "getBalance" to your question? Is your incoming transaction confirmed or are you tracking an unconfirmed balance? – Murch – 2017-05-20T17:32:17.443
I've added it, but it doesn't really say anything beside that I have value in my wallet. My incoming transaction was on May 18th, it has > 400 confirmations, the transaction shows up as confirmed on blockchain.info and in my wallet. – Kit Sunde – 2017-05-20T17:39:12.320
@KitSunde: Okay, sorry, then I'm out of ideas and I'm not familiar enough with the API of blockchain.info to give further suggestions. I'll leave this answer, because it provides additional information for would-be future answerers. (Or perhaps you can incorporate the relevant bits to your question, and then I can delete it.) – Murch – 2017-05-20T17:42:26.920