Skip to content

Commit

Permalink
feat(RenewalInfo): enhance IRenewalInfo with renewalPrice and currenc…
Browse files Browse the repository at this point in the history
…y fields
  • Loading branch information
M7md-Ebrahim committed Oct 16, 2024
1 parent def5cb7 commit ba289e4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
18 changes: 0 additions & 18 deletions Sources/Flare/Classes/Extensions/LocaleCurrency.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,8 @@ public protocol IRenewalInfo {
}

/// Default implementation of the currency property for backward compatibility.
extension IRenewalInfo {
var currency: String? {
return Locale.current.currencyCodeID

Check failure on line 57 in Sources/Flare/Classes/Models/Internal/Protocols/IRenewalInfo.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Implicit Return Violation: Prefer implicit returns in closures, functions and getters (implicit_return)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,10 @@ protocol IStoreTransaction {
/// - Note: This is only available for StoreKit 2 transactions.
var environment: StoreEnvironment? { get }
}

/// Default implementation of the currency property for backward compatibility.
extension IStoreTransaction {
var currency: String? {
return Locale.current.currencyCodeID

Check failure on line 41 in Sources/Flare/Classes/Models/Internal/Protocols/IStoreTransaction.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Implicit Return Violation: Prefer implicit returns in closures, functions and getters (implicit_return)
}
}

0 comments on commit ba289e4

Please sign in to comment.