diff --git a/lib/ckb/types/tx_status.rb b/lib/ckb/types/tx_status.rb index 888716d..64233f6 100644 --- a/lib/ckb/types/tx_status.rb +++ b/lib/ckb/types/tx_status.rb @@ -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 @@ -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