|
|
@ -41,7 +41,14 @@ class SendMoneyExchangeRateViewController: UIViewController { |
|
|
|
var currencyInfoViewModel: [SendMoneyExchangeRateCurrencyViewModel]? |
|
|
|
|
|
|
|
var reciepient: Recipient? |
|
|
|
|
|
|
|
var exchangeRateModel: SendMoneyExchangeRateModel? { |
|
|
|
didSet { |
|
|
|
self.reciepientTextField.text = self.exchangeRateModel?.recipientAmount |
|
|
|
self.senderTextField.text = self.exchangeRateModel?.senderAmount |
|
|
|
self.transferFeeInfoLabel.text = self.exchangeRateModel?.transferFee |
|
|
|
self.transferFeeInfoLabel.isHidden = false |
|
|
|
} |
|
|
|
} |
|
|
|
var requestModel: SendMoneyRequestModel? |
|
|
|
|
|
|
|
var calcBy = "" |
|
|
@ -144,6 +151,7 @@ class SendMoneyExchangeRateViewController: UIViewController { |
|
|
|
} |
|
|
|
|
|
|
|
private func configureViews() { |
|
|
|
self.transferFeeInfoLabel.isHidden = true |
|
|
|
let dropDownImage = #imageLiteral(resourceName: "dropdown_white").withRenderingMode(UIImageRenderingMode.alwaysTemplate) |
|
|
|
let image = dropDownImage |
|
|
|
self.dropDownImageView.image = image |
|
|
@ -158,9 +166,6 @@ class SendMoneyExchangeRateViewController: UIViewController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func calculate(senderAmt: String?, senderCurrency: String? = "KRW", recieverAmt: String?, recieverCurrency: String?, recieverCountryName: String?, recieverCountryId: String?, paymentMethod: String?, paymentMethodId: String? ,calcBy: String?, senderCountryId: String? = "118", payoutPartner: String?, userId: String?, bankId: String?) { |
|
|
|
self.presenter?.calculate(senderAmt: senderAmt, senderCurrency: senderCurrency, recieverAmt: recieverAmt, recieverCurrency: recieverCurrency, recieverCountryName: recieverCountryName, recieverCountryId: recieverCountryId, paymentMethod: paymentMethod, paymentMethodId: paymentMethodId, calcBy: calcBy, senderCountryId: senderCountryId, payoutPartner: payoutPartner, userId: userId, bankId: bankId) |
|
|
|
} |
|
|
@ -181,6 +186,11 @@ class SendMoneyExchangeRateViewController: UIViewController { |
|
|
|
|
|
|
|
// MARK: SendMoneyExchangeRateViewInterface |
|
|
|
extension SendMoneyExchangeRateViewController: SendMoneyExchangeRateViewInterface { |
|
|
|
|
|
|
|
func show(model: SendMoneyExchangeRateModel) { |
|
|
|
self.exchangeRateModel = model |
|
|
|
} |
|
|
|
|
|
|
|
func show(error: String) { |
|
|
|
self.alert(message: error) |
|
|
|
} |
|
|
|