@@ -142,7 +142,7 @@ public func getUpdatedMemberBalanceFor(expense: Expense, group: Groups, updateTy
142
142
// Check if the member already has an entry in the member balance array
143
143
if let index = memberBalance. firstIndex ( where: { $0. id == member } ) {
144
144
if memberBalance [ index] . balanceByCurrency [ currency] == nil {
145
- memberBalance [ index] . balanceByCurrency [ currency] = GroupCurrencyBalance ( balance: 0.0 , totalSummary: [ ] )
145
+ memberBalance [ index] . balanceByCurrency [ currency] = GroupCurrencyBalance ( balance: 0 , totalSummary: [ ] )
146
146
}
147
147
148
148
switch updateType {
@@ -241,7 +241,7 @@ func getInitialGroupSummaryFor(member: String, expense: Expense) -> GroupTotalSu
241
241
let memberSummary = GroupMemberSummary ( groupTotalSpending: expense. amount,
242
242
totalPaidAmount: expense. paidBy [ member] ?? 0 ,
243
243
totalShare: splitAmount, paidAmount: 0 , receivedAmount: 0 ,
244
- changeInBalance: ( expense. paidBy [ member] ?? 0.0 ) - splitAmount)
244
+ changeInBalance: ( expense. paidBy [ member] ?? 0 ) - splitAmount)
245
245
246
246
let totalSummary = GroupTotalSummary ( year: expenseYear, month: expenseMonth, summary: memberSummary)
247
247
return totalSummary
@@ -265,7 +265,7 @@ public func getUpdatedMemberBalanceFor(transaction: Transactions, group: Groups,
265
265
// For payer
266
266
if let payerIndex = memberBalance. firstIndex ( where: { $0. id == payerId } ) {
267
267
if memberBalance [ payerIndex] . balanceByCurrency [ currency] == nil {
268
- memberBalance [ payerIndex] . balanceByCurrency [ currency] = GroupCurrencyBalance ( balance: 0.0 , totalSummary: [ ] )
268
+ memberBalance [ payerIndex] . balanceByCurrency [ currency] = GroupCurrencyBalance ( balance: 0 , totalSummary: [ ] )
269
269
}
270
270
271
271
switch updateType {
@@ -351,7 +351,7 @@ public func getUpdatedMemberBalanceFor(transaction: Transactions, group: Groups,
351
351
// For receiver
352
352
if let receiverIndex = memberBalance. firstIndex ( where: { $0. id == receiverId } ) {
353
353
if memberBalance [ receiverIndex] . balanceByCurrency [ currency] == nil {
354
- memberBalance [ receiverIndex] . balanceByCurrency [ currency] = GroupCurrencyBalance ( balance: 0.0 , totalSummary: [ ] )
354
+ memberBalance [ receiverIndex] . balanceByCurrency [ currency] = GroupCurrencyBalance ( balance: 0 , totalSummary: [ ] )
355
355
}
356
356
357
357
switch updateType {
0 commit comments