Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2023-07-18 18:08:17 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cb2e9d9fe1c787a13a46bf422b50e500e1f8b831
cb2e9d9f
1 parent
cc8b50d5
Fix market discount value at WalletVC
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
cb2e9d9
...
...
@@ -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
?
??
""
...
...
Please
register
or
login
to post a comment