diff --git a/zetaclient/bitcoin_client.go b/zetaclient/bitcoin_client.go index b4d2af9b4f..9a8aed6340 100644 --- a/zetaclient/bitcoin_client.go +++ b/zetaclient/bitcoin_client.go @@ -384,7 +384,12 @@ func (ob *BitcoinChainClient) IsSendOutTxProcessed(sendHash string, nonce uint64 amount = -res.Amount } - amountInSat, _ := big.NewFloat(amount * 1e8).Int(nil) + sats, err := getSatoshis(amount) + if err != nil { + ob.logger.ObserveOutTx.Warn().Msgf("IsSendOutTxProcessed: getSatoshis error: %s", err) + return false, false, nil + } + amountInSat := big.NewInt(sats) if res.Confirmations < ob.ConfirmationsThreshold(amountInSat) { return true, false, nil }