dashed-slug.net › Forums › General discussion › Witdrawal Issue Invalid Amount Status 500 › Reply To: Witdrawal Issue Invalid Amount Status 500
February 5, 2019 at 8:09 am
#5782
Keymaster
I am somewhat surprised that there are so many decimals in the amount, but it is possible that there is a rounding error that’s causing this.
The relevant code is here: https://github.com/dashed-slug/wallets/blob/4.0.2/includes/coin-adapter-rpc.php#L441-L448
Could you try without the floatval()
function? i.e. edit the code to be:
$amount = number_format( (float) $amount, 8, '.', '' );
$result = $this->rpc->sendtoaddress(
"$address",
$amount,
"$comment",
"$comment_to"
);
Then retry your withdrawal.
If this works I’ll have to patch that line in the next release.
thanks!