mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 09:50:15 +01:00
FIX: Wrong key was being used for extensions
This commit is contained in:
parent
a2e4157f1c
commit
d9633237ef
@ -56,7 +56,7 @@ class ComplicationController: NSObject, CLKComplicationDataSource {
|
||||
valueLabel = price
|
||||
timeLabel = lastUpdated
|
||||
valueSmallLabel = priceAbbreviated
|
||||
if let preferredFiatCurrency = groupUserDefaults?.string(forKey: "preferredFiatCurrency"), let preferredFiatUnit = fiatUnit(currency: preferredFiatCurrency) {
|
||||
if let preferredFiatCurrency = groupUserDefaults?.string(forKey: "preferredCurrency"), let preferredFiatUnit = fiatUnit(currency: preferredFiatCurrency) {
|
||||
currencySymbol = preferredFiatUnit.symbol
|
||||
} else {
|
||||
currencySymbol = fiatUnit(currency: "USD")!.symbol
|
||||
|
@ -20,7 +20,7 @@ class ExtensionDelegate: NSObject, WKExtensionDelegate {
|
||||
static func preferredFiatCurrencyChanged() {
|
||||
let fiatUnitUserDefaults: FiatUnit
|
||||
let groupUserDefaults = UserDefaults(suiteName: UserDefaultsGroupKey.GroupName.rawValue)
|
||||
if let preferredFiatCurrency = groupUserDefaults?.string(forKey: "preferredFiatCurrency"), let preferredFiatUnit = fiatUnit(currency: preferredFiatCurrency) {
|
||||
if let preferredFiatCurrency = groupUserDefaults?.string(forKey: "preferredCurrency"), let preferredFiatUnit = fiatUnit(currency: preferredFiatCurrency) {
|
||||
fiatUnitUserDefaults = preferredFiatUnit
|
||||
} else {
|
||||
fiatUnitUserDefaults = fiatUnit(currency: "USD")!
|
||||
|
@ -102,7 +102,7 @@ class WatchDataSource: NSObject {
|
||||
func processData(data: [String: Any]) {
|
||||
|
||||
if let preferredFiatCurrency = data["preferredFiatCurrency"] as? String, let preferredFiatCurrencyUnit = fiatUnit(currency: preferredFiatCurrency) {
|
||||
groupUserDefaults?.set(preferredFiatCurrencyUnit.endPointKey, forKey: "preferredFiatCurrency")
|
||||
groupUserDefaults?.set(preferredFiatCurrencyUnit.endPointKey, forKey: "preferredCurrency")
|
||||
groupUserDefaults?.synchronize()
|
||||
ExtensionDelegate.preferredFiatCurrencyChanged()
|
||||
} else if let isWalletsInitialized = data["isWalletsInitialized"] as? Bool {
|
||||
|
Loading…
Reference in New Issue
Block a user