Skip to content

Commit

Permalink
Merge pull request #16 from classicalliu/fix-dup-lock
Browse files Browse the repository at this point in the history
fix: remove duplicated lock in wallet
  • Loading branch information
classicalliu authored Apr 10, 2019
2 parents e773a24 + e814920 commit 5662a54
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions lib/ckb/wallet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,6 @@ def get_transaction(hash_hex)
api.get_transaction(hash_hex)
end

def lock
{
version: 0,
binary_hash: api.system_script_cell_hash,
args: [
CKB::Utils.bin_to_hex(CKB::Blake2b.digest(CKB::Blake2b.digest(pubkey_bin)))
]
}
end

def block_assembler_config
args = lock[:args].map do |arg|
"[#{arg.bytes.map(&:to_s).join(", ")}]"
Expand Down Expand Up @@ -154,7 +144,7 @@ def lock_hash
end

def lock
@lock ||= generate_lock(pubkey_hash_bin)
generate_lock(pubkey_hash_bin)
end

def generate_lock(target_pubkey_hash_bin)
Expand Down

0 comments on commit 5662a54

Please sign in to comment.