obey the cop

Phillip Davis created

Change summary

lib/btc_sell_prices.rb | 4 ++--
lib/registration.rb    | 7 ++++---
2 files changed, 6 insertions(+), 5 deletions(-)

Detailed changes

lib/btc_sell_prices.rb 🔗

@@ -33,8 +33,8 @@ class CryptoSellPrices
 		fetch_canadianbitcoins.then do |http|
 			cb = Nokogiri::HTML.parse(http.response)
 
-			row = cb.at(self.ticker_row_selector)
-			unless row.at("td").text == self.crypto_name
+			row = cb.at(ticker_row_selector)
+			unless row.at("td").text == crypto_name
 				raise "#{crypto_name} row has moved"
 			end
 

lib/registration.rb 🔗

@@ -322,7 +322,9 @@ class Registration
 					}.then(&method(:handle_possible_prev))
 				end
 			end
+
 		protected
+
 			def handle_possible_prev(iq)
 				raise "Action not allowed" unless iq.prev?
 
@@ -331,8 +333,8 @@ class Registration
 
 			def addr_and_rate
 				EMPromise.all([
-					self.crypto_addrs.then { |addrs|
-						addrs.first || self.add_crypto_addr
+					crypto_addrs.then { |addrs|
+						addrs.first || add_crypto_addr
 					},
 
 					sell_prices.public_send(@customer.currency.to_s.downcase)
@@ -381,7 +383,6 @@ class Registration
 			end
 		end
 
-
 		class CreditCard
 			Payment.kinds[:credit_card] = ->(*args, **kw) { self.for(*args, **kw) }