From ac2b658cada45dcbec0b041ea2347e0b072f43d1 Mon Sep 17 00:00:00 2001 From: classicalliu Date: Sun, 17 Nov 2019 16:43:00 +0800 Subject: [PATCH] fix: add options to wallet.from_hex --- lib/ckb/wallet.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ckb/wallet.rb b/lib/ckb/wallet.rb index 19b4ef05..647f2b2e 100644 --- a/lib/ckb/wallet.rb +++ b/lib/ckb/wallet.rb @@ -29,8 +29,8 @@ def initialize(api, key, skip_data_and_type: true, hash_type: "type", mode: MODE @skip_data_and_type = skip_data_and_type end - def self.from_hex(api, privkey, hash_type: "type") - new(api, Key.new(privkey), hash_type: hash_type) + def self.from_hex(api, privkey, hash_type: "type", skip_data_and_type: true, mode: MODE::TESTNET) + new(api, Key.new(privkey), hash_type: hash_type, skip_data_and_type: skip_data_and_type, mode: mode) end def hash_type=(hash_type)