Browse Source

network not called if all field is empty

pull/1/head
gme_2 6 years ago
parent
commit
8496f5e86d
  1. 3
      GMERemittance/Module/SendMoneyExchangeRate/User Interface/Presenter/SendMoneyExchangeRatePresenter.swift
  2. 4
      GMERemittance/Module/SendMoneyExchangeRate/User Interface/View/SendMoneyExchangeRate.storyboard
  3. 2
      GMERemittance/Module/SendMoneyExchangeRate/User Interface/View/SendMoneyExchangeRateViewController.swift

3
GMERemittance/Module/SendMoneyExchangeRate/User Interface/Presenter/SendMoneyExchangeRatePresenter.swift

@ -38,6 +38,9 @@ class SendMoneyExchangeRatePresenter {
extension SendMoneyExchangeRatePresenter: SendMoneyExchangeRateModuleInterface { extension SendMoneyExchangeRatePresenter: SendMoneyExchangeRateModuleInterface {
func calculate(senderAmt: String?, senderCurrency: String?, recieverAmt: String?, recieverCurrency: String?, recieverCountryName: String?, recieverCountryId: String?, paymentMethod: String?, paymentMethodId: String?, calcBy: String?, senderCountryId: String?, payoutPartner: String?, userId: String?, bankId: String?) { func calculate(senderAmt: String?, senderCurrency: String?, recieverAmt: String?, recieverCurrency: String?, recieverCountryName: String?, recieverCountryId: String?, paymentMethod: String?, paymentMethodId: String?, calcBy: String?, senderCountryId: String?, payoutPartner: String?, userId: String?, bankId: String?) {
let _senderAmt = senderAmt ?? ""
let _recieverAmt = recieverAmt ?? ""
guard !_senderAmt.isEmpty && !_recieverAmt.isEmpty else {return}
self.view?.showLoading() self.view?.showLoading()
let param: [String: String] = let param: [String: String] =
[ [

4
GMERemittance/Module/SendMoneyExchangeRate/User Interface/View/SendMoneyExchangeRate.storyboard

@ -267,6 +267,9 @@
<integer key="value" value="25"/> <integer key="value" value="25"/>
</userDefinedRuntimeAttribute> </userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
<connections>
<action selector="continueButton:" destination="SBO-Ku-vj1" eventType="touchUpInside" id="1Du-oy-LR1"/>
</connections>
</button> </button>
</subviews> </subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@ -303,7 +306,6 @@
<connections> <connections>
<outlet property="backgroundViewCountryLabel1" destination="K75-46-fqN" id="WuC-I1-HAt"/> <outlet property="backgroundViewCountryLabel1" destination="K75-46-fqN" id="WuC-I1-HAt"/>
<outlet property="backgroundViewCountryLabel2" destination="uw9-Za-23R" id="vB5-8I-PvT"/> <outlet property="backgroundViewCountryLabel2" destination="uw9-Za-23R" id="vB5-8I-PvT"/>
<outlet property="continueButton" destination="mLq-cC-0T4" id="adL-tz-MjR"/>
<outlet property="countryCodeLabel" destination="MCZ-I5-c8K" id="Lf6-aG-UUl"/> <outlet property="countryCodeLabel" destination="MCZ-I5-c8K" id="Lf6-aG-UUl"/>
<outlet property="countryFlagImage" destination="PqL-FQ-Cs6" id="LvX-6S-o7D"/> <outlet property="countryFlagImage" destination="PqL-FQ-Cs6" id="LvX-6S-o7D"/>
<outlet property="countryListStackView" destination="u3H-in-pKR" id="kMd-lB-6PM"/> <outlet property="countryListStackView" destination="u3H-in-pKR" id="kMd-lB-6PM"/>

2
GMERemittance/Module/SendMoneyExchangeRate/User Interface/View/SendMoneyExchangeRateViewController.swift

@ -101,7 +101,7 @@ class SendMoneyExchangeRateViewController: UIViewController {
let reciepientCountryName = self.reciepient?.country let reciepientCountryName = self.reciepient?.country
self.calculate(senderAmt: senderAmount, recieverAmt: reciepientAmount, recieverCurrency: recipientCurrency, recieverCountryName: reciepientCountryName, recieverCountryId: reciepientCountryId, paymentMethod: paymentMethod, paymentMethodId: paymentMethodId, calcBy: calcBy, payoutPartner: payoutPartner, userId: myUsername, bankId: bankId) self.calculate(senderAmt: senderAmount, recieverAmt: reciepientAmount, recieverCurrency: recipientCurrency, recieverCountryName: reciepientCountryName, recieverCountryId: reciepientCountryId, paymentMethod: paymentMethod, paymentMethodId: paymentMethodId, calcBy: calcBy, payoutPartner: payoutPartner, userId: myUsername, bankId: bankId)
self.actionDelegate?.continueToVerificationAction()
// self.actionDelegate?.continueToVerificationAction()
} }

Loading…
Cancel
Save