Update instructions to be closer to what is in current web signup

Stephen Paul Weber created

Change summary

lib/registration.rb       | 28 ++++++++++++++++++++++++++--
test/test_registration.rb |  2 +-
2 files changed, 27 insertions(+), 3 deletions(-)

Detailed changes

lib/registration.rb 🔗

@@ -67,7 +67,7 @@ class Registration
 					},
 					{
 						value: "credit_card",
-						label: "Credit Card ($#{CONFIG[:activation_amount]})"
+						label: "Credit Card"
 					},
 					{
 						value: "code",
@@ -93,12 +93,36 @@ class Registration
 			}
 		].freeze
 
+		ACTIVATE_INSTRUCTION =
+			"To activate your account, you can either deposit " \
+			"$#{CONFIG[:activation_amount]} to your balance or enter " \
+			"your invite code if you have one."
+
+		CRYPTOCURRENCY_INSTRUCTION =
+			"(If you'd like to pay in a cryptocurrency other than " \
+			"Bitcoin, currently we recommend using a service like " \
+			"simpleswap.io, morphtoken.com, changenow.io, or godex.io. " \
+			"Manual payment via Bitcoin Cash is also available if you " \
+			"contact support.)"
+
+		def add_instructions(form, center)
+			[
+				"You've selected #{tel} (#{center}) as your JMP number",
+				ACTIVATE_INSTRUCTION,
+				CRYPTOCURRENCY_INSTRUCTION
+			].each do |txt|
+				form << Blather::XMPPNode.new(:instructions, form.document).tap do |i|
+					i << txt
+				end
+			end
+		end
+
 		def write
 			rate_center.then do |center|
 				form = reply.form
 				form.type = :form
 				form.title = "Activate JMP"
-				form.instructions = "Going to activate #{tel} (#{center})"
+				add_instructions(form, center)
 				form.fields = FORM_FIELDS
 
 				COMMAND_MANAGER.write(reply).then { |iq|

test/test_registration.rb 🔗

@@ -90,7 +90,7 @@ class RegistrationTest < Minitest::Test
 				[Matching.new do |iq|
 					assert_equal :form, iq.form.type
 					assert_equal(
-						"Going to activate +15555550000 (FA, KE)",
+						"You've selected +15555550000 (FA, KE) as your JMP number",
 						iq.form.instructions
 					)
 				end]