-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NT-164] Consume Rewards converted minimum from v1 #830
Conversation
@@ -5,6 +5,7 @@ import Runes | |||
|
|||
public struct Reward { | |||
public let backersCount: Int? | |||
public let convertedMinimum: Double |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is convertedMinimum
guaranteed to always be returned? If no conversion is required (ie. project's currency is the same as the user's currency) is the convertedMinimum
just the same as the minimum
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly
@@ -24,6 +25,7 @@ extension Reward { | |||
|
|||
public static let noReward = Reward( | |||
backersCount: nil, | |||
convertedMinimum: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is just a template, but I think a convertedMinimum
would never be 0 🤔 Maybe make this 1
so it's more realistic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I set convertedMinimum
to 0
so it matches the minimum
. For this template, all properties are either nil
or 0
.
📲 What
convertedMinimum
returned by the API.🤔 Why
🛠 How
convertedMinimum
to our Reward model.✅ Acceptance criteria