diff --git a/config-schema.dhall b/config-schema.dhall index a4d62cd4811069bdab93d50e84ecb1e5aa78ab22..8ec135811a394fa90ef24fa8233c2a746cf30012 100644 --- a/config-schema.dhall +++ b/config-schema.dhall @@ -17,7 +17,18 @@ , creds : { account : Text, password : Text, username : Text } , direct_sources : List { mapKey : Text, mapValue : Text } , direct_targets : List { mapKey : Text, mapValue : Text } -, electrum : { rpc_password : Text, rpc_uri : Text, rpc_username : Text } +, electrum : + { currency : Text + , rpc_password : Text + , rpc_uri : Text + , rpc_username : Text + } +, electrum_bch : + { currency : Text + , rpc_password : Text + , rpc_uri : Text + , rpc_username : Text + } , electrum_notify_url : forall (address : Text) -> forall (customer_id : Text) -> Text , interac : Text diff --git a/config.dhall.sample b/config.dhall.sample index 44589b166a011900af290003c1bd20e7ebb44c81..7d44a31fdf6fa0fbf14bf9c7fea5df1f5847e9c2 100644 --- a/config.dhall.sample +++ b/config.dhall.sample @@ -72,7 +72,14 @@ in electrum = { rpc_uri = "", rpc_username = "", - rpc_password = "" + rpc_password = "", + currency = "" + }, + electrum_bch = { + rpc_uri = "", + rpc_username = "", + rpc_password = "", + currency = "" }, oxr_app_id = "", activation_amount = 15, diff --git a/lib/electrum.rb b/lib/electrum.rb index 4b1660ac95f65b6deeabc3d2607b2fccc20f3d19..337fd7303cec297f99f10ec0e95460395fc2e877 100644 --- a/lib/electrum.rb +++ b/lib/electrum.rb @@ -8,10 +8,11 @@ require "json" require "securerandom" class Electrum - def initialize(rpc_uri:, rpc_username:, rpc_password:) + def initialize(rpc_uri:, rpc_username:, rpc_password:, currency:) @rpc_uri = URI(rpc_uri) @rpc_username = rpc_username @rpc_password = rpc_password + @currency = currency end def createnewaddress