diff --git a/lib/btc_sell_prices.rb b/lib/btc_sell_prices.rb
index f26fb99371f405be0776ebedefae5bd681ce3d46..f1783db28f2d7b52375a4e30de5b4d31b8fd03c6 100644
--- a/lib/btc_sell_prices.rb
+++ b/lib/btc_sell_prices.rb
@@ -27,7 +27,7 @@ class BTCSellPrices
end
BigDecimal(
- bitcoin_row.at("td:nth-of-type(3)").text.match(/^\$(\d+\.\d+)/)[1]
+ bitcoin_row.at("td:nth-of-type(4)").text.match(/^\$(\d+\.\d+)/)[1]
)
end
end
diff --git a/test/test_btc_sell_prices.rb b/test/test_btc_sell_prices.rb
index 5ba66e6813f240d489bc83f32766ee67959d9a6f..584a5737c101d63065568790dae0cf236f321900 100644
--- a/test/test_btc_sell_prices.rb
+++ b/test/test_btc_sell_prices.rb
@@ -13,7 +13,7 @@ class BTCSellPricesTest < Minitest::Test
def test_cad
stub_request(:get, "https://www.canadianbitcoins.com").to_return(
body: "
" \
- "| Bitcoin | | $123.00 | "
+ "Bitcoin | | | $123.00 | "
)
assert_equal BigDecimal(123), @subject.cad.sync
end
@@ -22,7 +22,7 @@ class BTCSellPricesTest < Minitest::Test
def test_usd
stub_request(:get, "https://www.canadianbitcoins.com").to_return(
body: "" \
- "| Bitcoin | | $123.00 | "
+ "Bitcoin | | | $123.00 | "
)
@redis.expect(:get, EMPromise.resolve("0.5"), ["cad_to_usd"])
assert_equal BigDecimal(123) / 2, @subject.usd.sync