mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2025-12-21 16:04:27 +01:00
* Add Swift notification plugin * Hash the metadata * Validate min sendable amount * Remove initializer as base class, UNNotificationServiceExtension, has no default initializer * Set the PaymentMethod * Handle PaymentDetails in SwapUpdated * Improve payment text
20 lines
651 B
Swift
20 lines
651 B
Swift
import Foundation
|
|
|
|
public class ResourceHelper {
|
|
public static let shared = ResourceHelper()
|
|
|
|
private init() {/* must use shared instance */}
|
|
|
|
public func getString(key: String, fallback: String) -> String {
|
|
return getString(key: key, validateContains: nil, fallback: fallback)
|
|
}
|
|
|
|
public func getString(key: String, validateContains: String?, fallback: String) -> String {
|
|
if let str = Bundle.main.object(forInfoDictionaryKey: key) as? String {
|
|
if validateContains == nil || str.contains(validateContains!) {
|
|
return str
|
|
}
|
|
}
|
|
return fallback
|
|
}}
|