mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2025-12-22 08:24:21 +01:00
Swift notification plugin (#436)
* 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
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
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
|
||||
}}
|
||||
Reference in New Issue
Block a user