Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Error when calling api "Create store on-chain wallet transaction." #5914

Open
1 task done
warrenbdev opened this issue Apr 9, 2024 · 3 comments
Open
1 task done

Comments

@warrenbdev
Copy link

What is your BTCPay version?

BTCPay Server v1.13.0+5b31d4de2

How did you deploy BTCPay Server?

I deployed on Lunanode

What happened?

Error when calling api "Create store on-chain wallet transaction."

Error: Error during POST to https://btcpay.mydomain.com/api/v1/stores/6hEWBQnuK3chzLpWm2yJ1ha8eDRA2Nm5kLrRMgPrizyu/payment-methods/OnChain/BTC/wallet/transactions. Got response (422): [{"path":"Destinations","message":"You are attempting to send more than is available"},{"path":"SelectedInputs","message":"There are no available utxos based on your request"}]
In my destination I have "subtractFromAmount": true
The amount is the total confirmed balance on the wallet
Post body would be like;
{
"destinations": [
{
"destination": "bc1qczmc5uuyvfrjd68cnfydlrraj0su6f2xr70s2g",
"amount": "0.00023266",
"subtractFromAmount": true
}
],
"feeRate": 3
}

How did you encounter this bug?

Testing the api with PHP, this is the only api call that throws an error for me.
I am trying to send the total confirmed balance, but have also tried smaller amounts with the same problem

Relevant log output

No response

What browser do you use?

chrome, but this is a php api issue

Additional information

No response

Are you sure this is a bug report?

  • I confirm this is a bug report
@pavlenex
Copy link
Contributor

pavlenex commented Apr 9, 2024

@ndeet ^

@ndeet
Copy link
Contributor

ndeet commented Apr 10, 2024

@pavlenex I discussed with @warrenbdev on Telegram and said this should not happen, that said I tried to reproduce the problem on testnet but was not able to.

Wallet balance confirmed: 0.00007454 BTC

Payload:

{
    "destinations": [
        {
            "destination": "tb1qryux32hzm7y7q0su53f7mgrjstlw6cj8wg2m5j",
            "amount": "0.00007454",
            "subtractFromAmount": true
        }
    ],
    "feeRate": 3
}

Result:

{
    "transactionHash": "db74af29e54f1696d96aa65a2627beb7363ff07ac8689dff15ef00df0e5a9037",
    "comment": "",
    "labels": {},
    "amount": "-0.00007454",
    "blockHash": null,
    "blockHeight": null,
    "confirmations": 0,
    "timestamp": 1712738971,
    "status": "Unconfirmed"
}

@warrenbdev are all inputs confirmed in your wallet balance? As you are onchain, your feerate is below the dust limit, so try to use a competitive feerate.

@warrenbdev
Copy link
Author

Thanks @ndeet . All inputs are confirmed yes. I have tried various fee rates from 1 to 50 and I get the same error. Could this be a problem on the mainnet only ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants