Remove mostly-unused final_message

Stephen Paul Weber created

Was only being used for PayPal transitions (which are mostly done) and
only when transitioning to BTC (which they usually don't) and only
provided extra reinforcement of a message they've already seen by now.
Let's not complicate the code for that.

Change summary

forms/registration/bch.rb  |  5 +----
forms/registration/btc.rb  |  5 +----
forms/registration/mail.rb |  3 +--
lib/registration.rb        | 14 +++++---------
sgx_jmp.rb                 |  1 -
5 files changed, 8 insertions(+), 20 deletions(-)

Detailed changes

forms/registration/bch.rb 🔗

@@ -13,7 +13,4 @@ field(
 	value: @addr
 )
 
-instructions(
-	"You will received a notification when your payment is complete." \
-	"#{@final_message}"
-)
+instructions "You will received a notification when your payment is complete."

forms/registration/btc.rb 🔗

@@ -13,7 +13,4 @@ field(
 	value: @addr
 )
 
-instructions(
-	"You will received a notification when your payment is complete." \
-	"#{@final_message}"
-)
+instructions "You will received a notification when your payment is complete."

forms/registration/mail.rb 🔗

@@ -5,8 +5,7 @@ instructions(
 	"Activate your account by sending at least " \
 	"$#{CONFIG[:activation_amount]}\nWe support payment by " \
 	"postal mail or, in Canada, by Interac e-Transfer.\n\n" \
-	"You will receive a notification when your payment is complete." \
-	"#{@final_message}"
+	"You will receive a notification when your payment is complete."
 )
 
 if @customer_id

lib/registration.rb 🔗

@@ -279,10 +279,10 @@ class Registration
 			@kinds ||= {}
 		end
 
-		def self.for(iq, customer, tel, final_message: nil, finish: Finish)
+		def self.for(iq, customer, tel, finish: Finish)
 			kinds.fetch(iq.form.field("activation_method")&.value&.to_s&.to_sym) {
 				raise "Invalid activation method"
-			}.call(customer, tel, final_message: final_message, finish: finish)
+			}.call(customer, tel, finish: finish)
 		end
 
 		class CryptoPaymentMethod
@@ -298,11 +298,10 @@ class Registration
 				raise NotImplementedError, "Subclass must implement"
 			end
 
-			def initialize(customer, tel, final_message: nil, **)
+			def initialize(customer, tel, **)
 				@customer = customer
 				@customer_id = customer.customer_id
 				@tel = tel
-				@final_message = final_message
 			end
 
 			def save
@@ -317,8 +316,7 @@ class Registration
 				FormTemplate.render(
 					reg_form_name,
 					amount: amount,
-					addr: addr,
-					final_message: @final_message
+					addr: addr
 				)
 			end
 
@@ -537,17 +535,15 @@ class Registration
 		class Mail
 			Payment.kinds[:mail] = method(:new)
 
-			def initialize(customer, tel, final_message: nil, **)
+			def initialize(customer, tel, **)
 				@customer = customer
 				@tel = tel
-				@final_message = final_message
 			end
 
 			def form
 				FormTemplate.render(
 					"registration/mail",
 					currency: @customer.currency,
-					final_message: @final_message,
 					**onboarding_extras
 				)
 			end

sgx_jmp.rb 🔗

@@ -621,7 +621,6 @@ Command.new(
 		customer.save_plan!.then {
 			Registration::Payment.for(
 				iq, customer, customer.registered?.phone,
-				final_message: PaypalDone::MESSAGE,
 				finish: PaypalDone
 			)
 		}.then(&:write).catch_only(Command::Execution::FinalStanza) do |s|