Raise NoTranscation if tx not found
1 files changed, 4 insertions(+), 0 deletions(-) M lib/electrum.rb
M lib/electrum.rb => lib/electrum.rb +4 -0
@@ 6,6 6,8 @@ require "net/http" require "securerandom" class Electrum class NoTransaction < StandardError; end def initialize(rpc_uri:, rpc_username:, rpc_password:) @rpc_uri = URI(rpc_uri) @@ @rpc_username = rpc_username 37,6 39,8 @@ class Electrum class Transaction def initialize(electrum, tx_hash, tx) raise NoTransaction, "No tx found for #{tx_hash}" unless tx @electrum = electrum @tx_hash = tx_hash @tx = tx