From 65a3ea6717a5ab8af9084be68dc22109b0393a9c Mon Sep 17 00:00:00 2001 From: Alva Swanson Date: Wed, 11 Sep 2024 19:49:20 +0000 Subject: [PATCH] wallets: Remove dependency to Bisq 2 Hex Class We can't depend on Bisq 2's Hex class to be able to reuse the wallets library in Bisq 1. --- .../bisq/wallets/bitcoind/zmq/BitcoindRawTxProcessor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wallets/bitcoind/bitcoind/src/main/java/bisq/wallets/bitcoind/zmq/BitcoindRawTxProcessor.java b/wallets/bitcoind/bitcoind/src/main/java/bisq/wallets/bitcoind/zmq/BitcoindRawTxProcessor.java index 9f2d868818..2bd4c177a4 100644 --- a/wallets/bitcoind/bitcoind/src/main/java/bisq/wallets/bitcoind/zmq/BitcoindRawTxProcessor.java +++ b/wallets/bitcoind/bitcoind/src/main/java/bisq/wallets/bitcoind/zmq/BitcoindRawTxProcessor.java @@ -17,9 +17,9 @@ package bisq.wallets.bitcoind.zmq; -import bisq.common.encoding.Hex; import bisq.wallets.bitcoind.rpc.BitcoindDaemon; import bisq.wallets.bitcoind.rpc.responses.BitcoindDecodeRawTransactionResponse; +import com.google.common.io.BaseEncoding; public class BitcoindRawTxProcessor implements ZmqRawTxProcessor { @@ -33,7 +33,7 @@ public BitcoindRawTxProcessor(BitcoindDaemon daemon, ZmqListeners listeners) { @Override public void processRawTx(byte[] serializedTx, byte[] sequenceNumber) { - String txInHex = Hex.encode(serializedTx); + String txInHex = BaseEncoding.base16().lowerCase().encode(serializedTx); BitcoindDecodeRawTransactionResponse.Result rawTransaction = daemon.decodeRawTransaction(txInHex).getResult(); listeners.fireTxOutputAddressesListeners(rawTransaction); listeners.fireTxIdInputListeners(rawTransaction);