Skip to content

Commit

Permalink
Merge pull request #306 from iamyates/develop
Browse files Browse the repository at this point in the history
fixed issue#305: Please add more field that returned from raw RPC for get_transaction
  • Loading branch information
shaojunda authored Nov 1, 2022
2 parents 69cecd0 + d11e8dd commit 4e437aa
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/ckb/types/tx_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ class TxStatus

# @param status [String] "proposed", "pending", "committed"
# @param block_hash [String | nil] "0x..."
def initialize(status:, block_hash:)
# @param reason [String | nil] '{"type":"Resolveg","description":"Resolve failed Dead(OutPoint(0x...))"}'
def initialize(status:, block_hash:, reason:)
@status = status
@block_hash = block_hash
@reason = reason
end

def to_h
{
status: @status,
block_hash: @block_hash
block_hash: @block_hash,
reason: @reason
}
end

Expand All @@ -24,7 +27,8 @@ def self.from_h(hash)

new(
status: hash[:status],
block_hash: hash[:block_hash]
block_hash: hash[:block_hash],
reason: hash[:reason]
)
end
end
Expand Down

0 comments on commit 4e437aa

Please sign in to comment.