Skip to content

Commit

Permalink
fix: usd sdk's ckb address parser (#2270)
Browse files Browse the repository at this point in the history
Signed-off-by: Miles Zhang <[email protected]>
  • Loading branch information
zmcNotafraid authored Oct 30, 2024
1 parent c03734e commit 3d127f5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 135 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/zmcNotafraid/ckb-sdk-ruby
revision: 5eb4c049ea3f6974b3edf3af75a24b9b71683ef4
revision: 164a506ee6d8107d6acab10b988df98f10ea9a7f
branch: data2-index
specs:
ckb-sdk-ruby (0.103.0)
Expand Down
132 changes: 0 additions & 132 deletions app/utils/ckb_address_parser.rb

This file was deleted.

2 changes: 1 addition & 1 deletion app/utils/ckb_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def self.generate_address(lock_script, version = CKB::Address::Version::CKB2021)
end

def self.parse_address(address_hash)
CkbAddressParser.new(address_hash).parse
CKB::AddressParser.new(address_hash).parse
end

def self.block_reward(block_number, block_economic_state)
Expand Down
2 changes: 1 addition & 1 deletion test/utils/ckb_utils_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class CkbUtilsTest < ActiveSupport::TestCase
end

test ".parse_address raise error when address is mainnet address and mode is testnet" do
assert_raises CkbAddressParser::InvalidPrefixError do
assert_raises CKB::AddressParser::InvalidPrefixError do
CkbUtils.parse_address("haha1qygndsefa43s6m882pcj53m4gdnj4k440axqsm2hnz")
end
end
Expand Down

0 comments on commit 3d127f5

Please sign in to comment.