|
@ -147,8 +147,8 @@ class TermsAndConditionViewController: UIViewController { |
|
|
extension TermsAndConditionViewController: OtpDelegate { |
|
|
extension TermsAndConditionViewController: OtpDelegate { |
|
|
func getOtp(otp: String, tappedButton: String) { |
|
|
func getOtp(otp: String, tappedButton: String) { |
|
|
guard let userId = GMEDB.shared.user.string(.userId) else {return} |
|
|
guard let userId = GMEDB.shared.user.string(.userId) else {return} |
|
|
if tappedButton == "ok_text".localized() { |
|
|
|
|
|
self.presenter?.checkOtp(otp: otp, userId: userId, receiverID: self.reciepient?.receiverID ?? "") |
|
|
|
|
|
|
|
|
if tappedButton == "ok_text".localized(), let receiverID = self.paymentModel?.receiverId ?? self.reciepient?.paymentMethod?.receiverId { |
|
|
|
|
|
self.presenter?.checkOtp(otp: otp, userId: userId, receiverID: receiverID) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
@ -164,11 +164,17 @@ extension TermsAndConditionViewController: TermsAndConditionViewInterface { |
|
|
cancelTitle: "no_text".localized(), |
|
|
cancelTitle: "no_text".localized(), |
|
|
okAction: { [weak self] in guard let `self` = self else { return } |
|
|
okAction: { [weak self] in guard let `self` = self else { return } |
|
|
self.dismiss(animated: true) { [weak self] in guard let `self` = self else { return } |
|
|
self.dismiss(animated: true) { [weak self] in guard let `self` = self else { return } |
|
|
self.delegate?.setupRecieientForTermsVC( |
|
|
|
|
|
self, |
|
|
|
|
|
didSelectRecipientID: self.reciepient?.receiverID ?? "" |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
// self.delegate?.setupRecieientForTermsVC( |
|
|
|
|
|
// self, |
|
|
|
|
|
// didSelectRecipientID: self.reciepient?.receiverID ?? "" |
|
|
|
|
|
// ) |
|
|
|
|
|
|
|
|
|
|
|
if let nav = self.navigationController, let recipient = self.reciepient, var paymentMethod = self.reciepient?.paymentMethod { |
|
|
|
|
|
if paymentMethod.receiverId == "" { |
|
|
|
|
|
paymentMethod.receiverId = recipient.receiverID |
|
|
|
|
|
} |
|
|
|
|
|
self.presenter?.gotoSendMoney(recipient, paymentMethod) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|