Don't send malformed to JID when customer has no tel yet

Stephen Paul Weber created

Change summary

bin/process_pending_btc_transactions | 2 ++
1 file changed, 2 insertions(+)

Detailed changes

bin/process_pending_btc_transactions 🔗

@@ -172,7 +172,9 @@ class Customer
 
 	def notify(body)
 		jid = REDIS.get("jmp_customer_jid-#{@customer_id}")
+		raise "No JID for #{customer_id}" unless jid
 		tel = REDIS.lindex("catapult_cred-#{jid}", 3)
+		return unless tel
 		BlatherNotify.say(
 			CONFIG[:notify_using][:target].call(tel.to_s),
 			body