Skip to content

Commit

Permalink
chore: update bitcoin chanin_params (#1703)
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbitz authored Mar 26, 2024
1 parent 9580a9d commit 8106fef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/utils/bitcoin_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8106fef

Please sign in to comment.