lib/cosgrove/utils.rb in cosgrove-0.0.1rc15 vs lib/cosgrove/utils.rb in cosgrove-0.0.1rc16

- old
+ new

@@ -1,8 +1,8 @@ module Cosgrove module Utils - include Cosgrove::Config + include Config def reset_api @steem_api = @golos_api = @test_api = nil @steem_folow_api = @golos_follow_api = @test_folow_api = nil @cycle_api_at = nil @@ -23,17 +23,17 @@ case chain when :steem { chain: :steem, url: steem_api_url, - failover_urls: steem_api_failover_urls + failover_urls: steem_api_failover_urls.any? ? steem_api_failover_urls : nil } when :golos { chain: :golos, url: golos_api_url, - failover_urls: golos_api_failover_urls + failover_urls: golos_api_failover_urls.any? ? golos_api_failover_urls : nil } when :test { chain: :test, url: test_api_url, @@ -196,8 +196,24 @@ ap e end end comment + end + + def core_asset(chain = :steem) + case chain + when :steem then 'STEEM' + when :golos then 'GOLOS' + else; 'TESTS' + end + end + + def debt_asset(chain = :steem) + case chain + when :steem then 'SBD' + when :golos then 'GBG' + else; 'TBD' + end end end end