> +Use python `Decimal` when defining fee,s and amounts. fee_expectedThis ensures that subsequent operations on these amounts produces exact decimal amount, output_amount
> + Using value of coin['amount'] as decimal and removed 'int'
> + Removed unnecessary parentheses
> + Remove str() and use quotes
Note: integers can be converted to Decimal directly,without potential rounding errors, instead of floats. without using a string.
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/20039 | core#20039]]