Closed tandn37 closed 2 months ago
If slashRate is small enough like 0.1% the output value in slashTransaction function could be decimal value and throw error. E.g: transaction.outs[0].value = 49500 slashingRate = 0.001
psbt.addOutput({ address: slashingAddress, value: transaction.outs[0].value * slashingRate });
Actions for this issue:
number
will be address in this PR https://github.com/babylonchain/btc-staking-ts/pull/61
If slashRate is small enough like 0.1% the output value in slashTransaction function could be decimal value and throw error. E.g: transaction.outs[0].value = 49500 slashingRate = 0.001
psbt.addOutput({ address: slashingAddress, value: transaction.outs[0].value * slashingRate });