Manos Chorianopoulos

Fix market discount value at WalletVC

......@@ -620,12 +620,23 @@ public class swiftApi {
self.name = dictionary["name"] as? String? ?? ""
self.image = dictionary["image"] as? String? ?? ""
self.description = dictionary["description"] as? String? ?? ""
self.discount = dictionary["discount"] as? String? ?? ""
// self.discount = dictionary["discount"] as? String? ?? ""
self.coupon = dictionary["coupon"] as? String? ?? ""
self.category = dictionary["category"] as? String? ?? ""
self.barcode = dictionary["barcode"] as? String? ?? ""
self.status = dictionary["status"] as? Int? ?? nil
if let tempDiscount = dictionary["discount"] as? String? ?? "" {
if tempDiscount.contains(",") {
let formattedDiscount = tempDiscount.replacingOccurrences(of: ",", with: ".")
self.discount = formattedDiscount
} else {
self.discount = dictionary["discount"] as? String? ?? ""
}
} else {
self.discount = ""
}
// Market Coupon
self.inner_text = dictionary["inner_text"] as? String? ?? ""
self.merchant_uuid = dictionary["merchant_uuid"] as? String? ?? ""
......