BlueWallet/ios/Shared/WidgetData.swift
2024-04-14 12:51:09 -04:00

23 lines
634 B
Swift

//
// WidgetData.swift
// BlueWallet
//
// Created by Marcos Rodriguez on 4/14/24.
// Copyright © 2024 BlueWallet. All rights reserved.
//
import Foundation
class WidgetData {
static let WidgetDataStoreKey = "WidgetDataStoreKey"
static let WidgetCachedDataStoreKey = "WidgetCachedDataStoreKey"
static func savePriceRateAndLastUpdate(rate: String, lastUpdate: String) {
guard let userDefaults = UserDefaults(suiteName: UserDefaultsGroupKey.GroupName.rawValue) else { return }
userDefaults.setValue(["rate": rate, "lastUpdate": lastUpdate], forKey: WidgetDataStoreKey)
userDefaults.synchronize()
}
}