Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

Add testnet blockchain adapters again #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/straight/gateway.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ def blockchain_adapters
@blockchain_adapters
end

def test_blockchain_adapters
@blockchain_adapters.map{ |el| el.class.testnet_adapter rescue next }.compact
end

# Creates a new order for the address derived from the pubkey and the keychain_id argument provided.
# See explanation of this keychain_id argument is in the description for the AddressProvider::Base#new_address method.
def new_order(args)
Expand Down
1 change: 1 addition & 0 deletions spec/lib/gateway_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
it "is using testnet" do
@gateway.test_mode = true
allow(@mock_adapter).to receive(:testnet_adapters).and_return(true)
expect(@gateway.blockchain_adapters).to_not be nil
expect(@gateway.blockchain_adapters).to eq(@gateway.test_blockchain_adapters)
end

Expand Down