diff --git a/app/utils/bitcoin_utils.rb b/app/utils/bitcoin_utils.rb index 5edc328d3..43fc27861 100644 --- a/app/utils/bitcoin_utils.rb +++ b/app/utils/bitcoin_utils.rb @@ -7,6 +7,8 @@ def self.valid_address?(addr) end def self.parse_from_addr(addr) + Bitcoin.chain_params = ENV["CKB_NET_MODE"] + segwit_addr = Bitcoin::SegwitAddr.new(addr) raise ArgumentError, "Invalid address." unless Bitcoin.chain_params.bech32_hrp == segwit_addr.hrp