lib/handcash/api.rb in handcash-0.1.0 vs lib/handcash/api.rb in handcash-0.2.0
- old
+ new
@@ -7,16 +7,19 @@
# For now this is limited to `receive`.
class API
attr_reader :network, :url
TESTNET_URL = 'https://test-api.handcash.io/api/'.freeze
+ MAINNET_URL = 'https://api.handcash.io/api/'.freeze
def initialize(opts = {})
- # Default to testnet since mainnet is not available.
- @network = opts[:network] || :testnet
+ # Default to mainnet.
+ @network = opts[:network] || :mainnet
case @network
when :testnet
@url = TESTNET_URL
+ when :mainnet
+ @url = MAINNET_URL
else
raise "Unsupported network - #{@network}"
end
end