Browse Source

- edited BlanaceModel for init

pull/1/head
InKwon James Kim 5 years ago
parent
commit
2c02a6d36d
  1. 4
      GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/Application Logic/Model/BalanceModel.swift
  2. 3
      GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/User Interface/View/ViewModel/DomesticRemitViewModel.swift

4
GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/Application Logic/Model/BalanceModel.swift

@ -29,6 +29,10 @@ struct BalanceModel: Mappable {
var accountType: String?
var productName: String?
init(balance: String?) {
self.balance = balance
}
init?(map: Map) {
}

3
GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/User Interface/View/ViewModel/DomesticRemitViewModel.swift

@ -228,6 +228,9 @@ extension DomesticRemitViewModel: DomesticRemitViewModelInterface {
if model?.type == "wallet" {
let serviceFee = (try? getInitialDataLinker.value())?.serviceFeeWallet
selectedServiceFeeLinker.onNext(serviceFee)
setBalance(with: BalanceModel(
balance: GMEDB.shared.user.string(.availableBalance)?.currencyToDecimal())
)
} else {
let serviceFee = (try? getInitialDataLinker.value())?.serviceFee
selectedServiceFeeLinker.onNext(serviceFee)

Loading…
Cancel
Save