mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-23 07:15:35 +01:00
REF: Use a single currency JSON for app and widgets
This commit is contained in:
parent
fc11da2aae
commit
7ab48fece9
5 changed files with 301 additions and 508 deletions
|
@ -21,10 +21,6 @@
|
||||||
590C62D2ED8BF487C33945B0 /* libPods-WalletInformationAndMarketWidgetExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 98455D960744E4E5DD50BA87 /* libPods-WalletInformationAndMarketWidgetExtension.a */; platformFilter = ios; };
|
590C62D2ED8BF487C33945B0 /* libPods-WalletInformationAndMarketWidgetExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 98455D960744E4E5DD50BA87 /* libPods-WalletInformationAndMarketWidgetExtension.a */; platformFilter = ios; };
|
||||||
6D2A6464258BA92D0092292B /* Stickers.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6D2A6463258BA92D0092292B /* Stickers.xcassets */; };
|
6D2A6464258BA92D0092292B /* Stickers.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6D2A6463258BA92D0092292B /* Stickers.xcassets */; };
|
||||||
6D2A6468258BA92D0092292B /* Stickers.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 6D2A6461258BA92C0092292B /* Stickers.appex */; platformFilter = ios; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
6D2A6468258BA92D0092292B /* Stickers.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 6D2A6461258BA92C0092292B /* Stickers.appex */; platformFilter = ios; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||||
6D2AA7FA2568B8750090B089 /* FiatUnits.plist in Resources */ = {isa = PBXBuildFile; fileRef = 6D2AA7F92568B8750090B089 /* FiatUnits.plist */; };
|
|
||||||
6D2AA7FB2568B8750090B089 /* FiatUnits.plist in Resources */ = {isa = PBXBuildFile; fileRef = 6D2AA7F92568B8750090B089 /* FiatUnits.plist */; };
|
|
||||||
6D2AA7FC2568B8750090B089 /* FiatUnits.plist in Resources */ = {isa = PBXBuildFile; fileRef = 6D2AA7F92568B8750090B089 /* FiatUnits.plist */; };
|
|
||||||
6D2AA7FD2568B8750090B089 /* FiatUnits.plist in Resources */ = {isa = PBXBuildFile; fileRef = 6D2AA7F92568B8750090B089 /* FiatUnits.plist */; };
|
|
||||||
6D2AA8082568B8F40090B089 /* FiatUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D2AA8072568B8F40090B089 /* FiatUnit.swift */; };
|
6D2AA8082568B8F40090B089 /* FiatUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D2AA8072568B8F40090B089 /* FiatUnit.swift */; };
|
||||||
6D2AA8092568B8F40090B089 /* FiatUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D2AA8072568B8F40090B089 /* FiatUnit.swift */; };
|
6D2AA8092568B8F40090B089 /* FiatUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D2AA8072568B8F40090B089 /* FiatUnit.swift */; };
|
||||||
6D2AA80A2568B8F40090B089 /* FiatUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D2AA8072568B8F40090B089 /* FiatUnit.swift */; };
|
6D2AA80A2568B8F40090B089 /* FiatUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D2AA8072568B8F40090B089 /* FiatUnit.swift */; };
|
||||||
|
@ -33,7 +29,6 @@
|
||||||
6D4AF15925D21172009DD853 /* WidgetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D9A2E6A254BAB1B007B5B82 /* WidgetAPI.swift */; };
|
6D4AF15925D21172009DD853 /* WidgetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D9A2E6A254BAB1B007B5B82 /* WidgetAPI.swift */; };
|
||||||
6D4AF16325D21185009DD853 /* WidgetDataStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D9A2E6B254BAB1B007B5B82 /* WidgetDataStore.swift */; };
|
6D4AF16325D21185009DD853 /* WidgetDataStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D9A2E6B254BAB1B007B5B82 /* WidgetDataStore.swift */; };
|
||||||
6D4AF16D25D21192009DD853 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DEB4BFA254FBA0E00E9F9AA /* Models.swift */; };
|
6D4AF16D25D21192009DD853 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DEB4BFA254FBA0E00E9F9AA /* Models.swift */; };
|
||||||
6D4AF17725D211A3009DD853 /* FiatUnits.plist in Resources */ = {isa = PBXBuildFile; fileRef = 6D2AA7F92568B8750090B089 /* FiatUnits.plist */; };
|
|
||||||
6D4AF17825D211A3009DD853 /* FiatUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D2AA8072568B8F40090B089 /* FiatUnit.swift */; };
|
6D4AF17825D211A3009DD853 /* FiatUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D2AA8072568B8F40090B089 /* FiatUnit.swift */; };
|
||||||
6D4AF18425D215D1009DD853 /* UserDefaultsExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4AF18325D215D1009DD853 /* UserDefaultsExtension.swift */; };
|
6D4AF18425D215D1009DD853 /* UserDefaultsExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4AF18325D215D1009DD853 /* UserDefaultsExtension.swift */; };
|
||||||
6D4AF18525D215D1009DD853 /* UserDefaultsExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4AF18325D215D1009DD853 /* UserDefaultsExtension.swift */; };
|
6D4AF18525D215D1009DD853 /* UserDefaultsExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4AF18325D215D1009DD853 /* UserDefaultsExtension.swift */; };
|
||||||
|
@ -82,6 +77,11 @@
|
||||||
6D9A2E6D254BAB1B007B5B82 /* WidgetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D9A2E6A254BAB1B007B5B82 /* WidgetAPI.swift */; };
|
6D9A2E6D254BAB1B007B5B82 /* WidgetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D9A2E6A254BAB1B007B5B82 /* WidgetAPI.swift */; };
|
||||||
6D9A2E6F254BAB1B007B5B82 /* WidgetDataStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D9A2E6B254BAB1B007B5B82 /* WidgetDataStore.swift */; };
|
6D9A2E6F254BAB1B007B5B82 /* WidgetDataStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D9A2E6B254BAB1B007B5B82 /* WidgetDataStore.swift */; };
|
||||||
6DA7047E254E24D5005FE5E2 /* UserDefaultsGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DA7047D254E24D5005FE5E2 /* UserDefaultsGroup.swift */; };
|
6DA7047E254E24D5005FE5E2 /* UserDefaultsGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DA7047D254E24D5005FE5E2 /* UserDefaultsGroup.swift */; };
|
||||||
|
6DE38F062657765900EA6C22 /* fiatUnit.json in Resources */ = {isa = PBXBuildFile; fileRef = 6DE38F052657765900EA6C22 /* fiatUnit.json */; };
|
||||||
|
6DE38F072657765900EA6C22 /* fiatUnit.json in Resources */ = {isa = PBXBuildFile; fileRef = 6DE38F052657765900EA6C22 /* fiatUnit.json */; };
|
||||||
|
6DE38F082657765900EA6C22 /* fiatUnit.json in Resources */ = {isa = PBXBuildFile; fileRef = 6DE38F052657765900EA6C22 /* fiatUnit.json */; };
|
||||||
|
6DE38F092657765900EA6C22 /* fiatUnit.json in Resources */ = {isa = PBXBuildFile; fileRef = 6DE38F052657765900EA6C22 /* fiatUnit.json */; };
|
||||||
|
6DE38F0A2657765900EA6C22 /* fiatUnit.json in Resources */ = {isa = PBXBuildFile; fileRef = 6DE38F052657765900EA6C22 /* fiatUnit.json */; };
|
||||||
6DEB4AAE254FB59C00E9F9AA /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D333B3A252FE1A3004D72DF /* WidgetKit.framework */; platformFilter = ios; };
|
6DEB4AAE254FB59C00E9F9AA /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D333B3A252FE1A3004D72DF /* WidgetKit.framework */; platformFilter = ios; };
|
||||||
6DEB4AAF254FB59C00E9F9AA /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D333B3C252FE1A3004D72DF /* SwiftUI.framework */; platformFilter = ios; };
|
6DEB4AAF254FB59C00E9F9AA /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D333B3C252FE1A3004D72DF /* SwiftUI.framework */; platformFilter = ios; };
|
||||||
6DEB4AB2254FB59C00E9F9AA /* WalletInformationWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DEB4AB1254FB59C00E9F9AA /* WalletInformationWidget.swift */; };
|
6DEB4AB2254FB59C00E9F9AA /* WalletInformationWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DEB4AB1254FB59C00E9F9AA /* WalletInformationWidget.swift */; };
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
6DEB4C3B254FBF4800E9F9AA /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DEB4C3A254FBF4800E9F9AA /* Colors.swift */; };
|
6DEB4C3B254FBF4800E9F9AA /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DEB4C3A254FBF4800E9F9AA /* Colors.swift */; };
|
||||||
6DEB4C3C254FBF4800E9F9AA /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DEB4C3A254FBF4800E9F9AA /* Colors.swift */; };
|
6DEB4C3C254FBF4800E9F9AA /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DEB4C3A254FBF4800E9F9AA /* Colors.swift */; };
|
||||||
6DF25A9F249DB97E001D06F5 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6DF25A9E249DB97E001D06F5 /* LaunchScreen.storyboard */; };
|
6DF25A9F249DB97E001D06F5 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6DF25A9E249DB97E001D06F5 /* LaunchScreen.storyboard */; };
|
||||||
6DFC807024EA0B6C007B8700 /* BuildFile in Frameworks */ = {isa = PBXBuildFile; productRef = 6DFC806F24EA0B6C007B8700 /* SwiftPackageProductDependency */; };
|
6DFC807024EA0B6C007B8700 /* EFQRCode in Frameworks */ = {isa = PBXBuildFile; productRef = 6DFC806F24EA0B6C007B8700 /* EFQRCode */; };
|
||||||
6DFC807224EA2FA9007B8700 /* ViewQRCodefaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DFC807124EA2FA9007B8700 /* ViewQRCodefaceController.swift */; };
|
6DFC807224EA2FA9007B8700 /* ViewQRCodefaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DFC807124EA2FA9007B8700 /* ViewQRCodefaceController.swift */; };
|
||||||
764B49B1420D4AEB8109BF62 /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B468CC34D5B41F3950078EF /* libsqlite3.0.tbd */; };
|
764B49B1420D4AEB8109BF62 /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B468CC34D5B41F3950078EF /* libsqlite3.0.tbd */; };
|
||||||
782F075B5DD048449E2DECE9 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = B9D9B3A7B2CB4255876B67AF /* libz.tbd */; };
|
782F075B5DD048449E2DECE9 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = B9D9B3A7B2CB4255876B67AF /* libz.tbd */; };
|
||||||
|
@ -319,7 +319,6 @@
|
||||||
6D2A6461258BA92C0092292B /* Stickers.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = Stickers.appex; sourceTree = BUILT_PRODUCTS_DIR; };
|
6D2A6461258BA92C0092292B /* Stickers.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = Stickers.appex; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
6D2A6463258BA92D0092292B /* Stickers.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Stickers.xcassets; sourceTree = "<group>"; };
|
6D2A6463258BA92D0092292B /* Stickers.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Stickers.xcassets; sourceTree = "<group>"; };
|
||||||
6D2A6465258BA92D0092292B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
6D2A6465258BA92D0092292B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
6D2AA7F92568B8750090B089 /* FiatUnits.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = FiatUnits.plist; sourceTree = "<group>"; };
|
|
||||||
6D2AA8072568B8F40090B089 /* FiatUnit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FiatUnit.swift; sourceTree = "<group>"; };
|
6D2AA8072568B8F40090B089 /* FiatUnit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FiatUnit.swift; sourceTree = "<group>"; };
|
||||||
6D32C5C42596CE2F008C077C /* EventEmitter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EventEmitter.h; sourceTree = "<group>"; };
|
6D32C5C42596CE2F008C077C /* EventEmitter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EventEmitter.h; sourceTree = "<group>"; };
|
||||||
6D32C5C52596CE3A008C077C /* EventEmitter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EventEmitter.m; sourceTree = "<group>"; };
|
6D32C5C52596CE3A008C077C /* EventEmitter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EventEmitter.m; sourceTree = "<group>"; };
|
||||||
|
@ -347,6 +346,7 @@
|
||||||
6D9A2E6A254BAB1B007B5B82 /* WidgetAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WidgetAPI.swift; sourceTree = "<group>"; };
|
6D9A2E6A254BAB1B007B5B82 /* WidgetAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WidgetAPI.swift; sourceTree = "<group>"; };
|
||||||
6D9A2E6B254BAB1B007B5B82 /* WidgetDataStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WidgetDataStore.swift; sourceTree = "<group>"; };
|
6D9A2E6B254BAB1B007B5B82 /* WidgetDataStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WidgetDataStore.swift; sourceTree = "<group>"; };
|
||||||
6DA7047D254E24D5005FE5E2 /* UserDefaultsGroup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefaultsGroup.swift; sourceTree = "<group>"; };
|
6DA7047D254E24D5005FE5E2 /* UserDefaultsGroup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefaultsGroup.swift; sourceTree = "<group>"; };
|
||||||
|
6DE38F052657765900EA6C22 /* fiatUnit.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = fiatUnit.json; path = ../../../../../models/fiatUnit.json; sourceTree = "<group>"; };
|
||||||
6DEB496F254E38DE00E9F9AA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/MainInterface.strings; sourceTree = "<group>"; };
|
6DEB496F254E38DE00E9F9AA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/MainInterface.strings; sourceTree = "<group>"; };
|
||||||
6DEB4AAD254FB59B00E9F9AA /* WalletInformationWidgetExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = WalletInformationWidgetExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; };
|
6DEB4AAD254FB59B00E9F9AA /* WalletInformationWidgetExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = WalletInformationWidgetExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
6DEB4AB1254FB59C00E9F9AA /* WalletInformationWidget.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WalletInformationWidget.swift; sourceTree = "<group>"; };
|
6DEB4AB1254FB59C00E9F9AA /* WalletInformationWidget.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WalletInformationWidget.swift; sourceTree = "<group>"; };
|
||||||
|
@ -496,7 +496,7 @@
|
||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
6DFC807024EA0B6C007B8700 /* BuildFile in Frameworks */,
|
6DFC807024EA0B6C007B8700 /* EFQRCode in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -610,7 +610,7 @@
|
||||||
6D2AA8062568B8E50090B089 /* Fiat */ = {
|
6D2AA8062568B8E50090B089 /* Fiat */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
6D2AA7F92568B8750090B089 /* FiatUnits.plist */,
|
6DE38F052657765900EA6C22 /* fiatUnit.json */,
|
||||||
6D2AA8072568B8F40090B089 /* FiatUnit.swift */,
|
6D2AA8072568B8F40090B089 /* FiatUnit.swift */,
|
||||||
);
|
);
|
||||||
path = Fiat;
|
path = Fiat;
|
||||||
|
@ -996,7 +996,7 @@
|
||||||
);
|
);
|
||||||
name = "BlueWalletWatch Extension";
|
name = "BlueWalletWatch Extension";
|
||||||
packageProductDependencies = (
|
packageProductDependencies = (
|
||||||
6DFC806F24EA0B6C007B8700 /* SwiftPackageProductDependency */,
|
6DFC806F24EA0B6C007B8700 /* EFQRCode */,
|
||||||
);
|
);
|
||||||
productName = "BlueWalletWatch Extension";
|
productName = "BlueWalletWatch Extension";
|
||||||
productReference = B40D4E3C225841ED00428FCC /* BlueWalletWatch Extension.appex */;
|
productReference = B40D4E3C225841ED00428FCC /* BlueWalletWatch Extension.appex */;
|
||||||
|
@ -1089,7 +1089,7 @@
|
||||||
);
|
);
|
||||||
mainGroup = 83CBB9F61A601CBA00E9B192;
|
mainGroup = 83CBB9F61A601CBA00E9B192;
|
||||||
packageReferences = (
|
packageReferences = (
|
||||||
6DFC806E24EA0B6C007B8700 /* RemoteSwiftPackageReference */,
|
6DFC806E24EA0B6C007B8700 /* XCRemoteSwiftPackageReference "EFQRCode" */,
|
||||||
);
|
);
|
||||||
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
|
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
|
||||||
projectDirPath = "";
|
projectDirPath = "";
|
||||||
|
@ -1138,8 +1138,8 @@
|
||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
6D2AA7FD2568B8750090B089 /* FiatUnits.plist in Resources */,
|
|
||||||
6D6CA4D725587397009312A5 /* Assets.xcassets in Resources */,
|
6D6CA4D725587397009312A5 /* Assets.xcassets in Resources */,
|
||||||
|
6DE38F0A2657765900EA6C22 /* fiatUnit.json in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -1147,8 +1147,8 @@
|
||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
6D2AA7FA2568B8750090B089 /* FiatUnits.plist in Resources */,
|
|
||||||
6D9946832555A695000E52E8 /* Assets.xcassets in Resources */,
|
6D9946832555A695000E52E8 /* Assets.xcassets in Resources */,
|
||||||
|
6DE38F072657765900EA6C22 /* fiatUnit.json in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -1156,8 +1156,8 @@
|
||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
6D2AA7FC2568B8750090B089 /* FiatUnits.plist in Resources */,
|
|
||||||
6D9A2E09254BA348007B5B82 /* Assets.xcassets in Resources */,
|
6D9A2E09254BA348007B5B82 /* Assets.xcassets in Resources */,
|
||||||
|
6DE38F092657765900EA6C22 /* fiatUnit.json in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -1165,8 +1165,8 @@
|
||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
6D2AA7FB2568B8750090B089 /* FiatUnits.plist in Resources */,
|
|
||||||
6DEB4B05254FB79100E9F9AA /* Assets.xcassets in Resources */,
|
6DEB4B05254FB79100E9F9AA /* Assets.xcassets in Resources */,
|
||||||
|
6DE38F082657765900EA6C22 /* fiatUnit.json in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -1183,8 +1183,8 @@
|
||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
6D4AF17725D211A3009DD853 /* FiatUnits.plist in Resources */,
|
|
||||||
B4EE583C226703320003363C /* Assets.xcassets in Resources */,
|
B4EE583C226703320003363C /* Assets.xcassets in Resources */,
|
||||||
|
6DE38F062657765900EA6C22 /* fiatUnit.json in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -1205,24 +1205,6 @@
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "export SENTRY_PROPERTIES=sentry.properties\nexport NODE_BINARY=node\n../node_modules/@sentry/cli/bin/sentry-cli react-native xcode ../node_modules/react-native/scripts/react-native-xcode.sh\n";
|
shellScript = "export SENTRY_PROPERTIES=sentry.properties\nexport NODE_BINARY=node\n../node_modules/@sentry/cli/bin/sentry-cli react-native xcode ../node_modules/react-native/scripts/react-native-xcode.sh\n";
|
||||||
};
|
};
|
||||||
1D2D05C5A2622FFEA3FB0BEB /* [CP] Embed Pods Frameworks */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputPaths = (
|
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-BlueWallet/Pods-BlueWallet-frameworks.sh",
|
|
||||||
"${PODS_ROOT}/../../node_modules/react-native-tor/ios/Libsifir_ios.framework",
|
|
||||||
);
|
|
||||||
name = "[CP] Embed Pods Frameworks";
|
|
||||||
outputPaths = (
|
|
||||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Libsifir_ios.framework",
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-BlueWallet/Pods-BlueWallet-frameworks.sh\"\n";
|
|
||||||
showEnvVarsInLog = 0;
|
|
||||||
};
|
|
||||||
2130DE983D1D45AC8FC45F7E /* Upload Debug Symbols to Sentry */ = {
|
2130DE983D1D45AC8FC45F7E /* Upload Debug Symbols to Sentry */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
|
@ -2533,7 +2515,7 @@
|
||||||
/* End XCConfigurationList section */
|
/* End XCConfigurationList section */
|
||||||
|
|
||||||
/* Begin XCRemoteSwiftPackageReference section */
|
/* Begin XCRemoteSwiftPackageReference section */
|
||||||
6DFC806E24EA0B6C007B8700 /* RemoteSwiftPackageReference */ = {
|
6DFC806E24EA0B6C007B8700 /* XCRemoteSwiftPackageReference "EFQRCode" */ = {
|
||||||
isa = XCRemoteSwiftPackageReference;
|
isa = XCRemoteSwiftPackageReference;
|
||||||
repositoryURL = "https://github.com/EFPrefix/EFQRCode.git";
|
repositoryURL = "https://github.com/EFPrefix/EFQRCode.git";
|
||||||
requirement = {
|
requirement = {
|
||||||
|
@ -2544,9 +2526,9 @@
|
||||||
/* End XCRemoteSwiftPackageReference section */
|
/* End XCRemoteSwiftPackageReference section */
|
||||||
|
|
||||||
/* Begin XCSwiftPackageProductDependency section */
|
/* Begin XCSwiftPackageProductDependency section */
|
||||||
6DFC806F24EA0B6C007B8700 /* SwiftPackageProductDependency */ = {
|
6DFC806F24EA0B6C007B8700 /* EFQRCode */ = {
|
||||||
isa = XCSwiftPackageProductDependency;
|
isa = XCSwiftPackageProductDependency;
|
||||||
package = 6DFC806E24EA0B6C007B8700 /* RemoteSwiftPackageReference */;
|
package = 6DFC806E24EA0B6C007B8700 /* XCRemoteSwiftPackageReference "EFQRCode" */;
|
||||||
productName = EFQRCode;
|
productName = EFQRCode;
|
||||||
};
|
};
|
||||||
/* End XCSwiftPackageProductDependency section */
|
/* End XCSwiftPackageProductDependency section */
|
||||||
|
|
|
@ -7,24 +7,45 @@
|
||||||
//
|
//
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
typealias FiatUnits = [FiatUnit]
|
|
||||||
struct FiatUnit: Codable {
|
struct FiatUnit: Codable {
|
||||||
let endPointKey: String
|
let endPointKey: String
|
||||||
let symbol: String
|
let symbol: String
|
||||||
let locale: String
|
let locale: String
|
||||||
let source: String
|
let source: String
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func fiatUnit(currency: String) -> FiatUnit? {
|
func fiatUnit(currency: String) -> FiatUnit? {
|
||||||
guard let file = Bundle.main.path(forResource: "FiatUnits", ofType: "plist") else {
|
return Bundle.main.decode([String: FiatUnit].self, from: "fiatUnit.json").first(where: {$1.endPointKey == currency})?.value
|
||||||
return nil
|
}
|
||||||
}
|
|
||||||
let fileURL: URL = URL(fileURLWithPath: file)
|
extension Bundle {
|
||||||
var fiatUnits: FiatUnits?
|
func decode<T: Decodable>(_ type: T.Type, from file: String, dateDecodingStrategy: JSONDecoder.DateDecodingStrategy = .deferredToDate, keyDecodingStrategy: JSONDecoder.KeyDecodingStrategy = .useDefaultKeys) -> T {
|
||||||
|
guard let url = self.url(forResource: file, withExtension: nil) else {
|
||||||
if let data = try? Data(contentsOf: fileURL) {
|
fatalError("Failed to locate \(file) in bundle.")
|
||||||
let decoder = PropertyListDecoder()
|
}
|
||||||
fiatUnits = try? decoder.decode(FiatUnits.self, from: data)
|
|
||||||
}
|
guard let data = try? Data(contentsOf: url) else {
|
||||||
return fiatUnits?.first(where: {$0.endPointKey == currency})
|
fatalError("Failed to load \(file) from bundle.")
|
||||||
|
}
|
||||||
|
|
||||||
|
let decoder = JSONDecoder()
|
||||||
|
|
||||||
|
decoder.dateDecodingStrategy = dateDecodingStrategy
|
||||||
|
decoder.keyDecodingStrategy = keyDecodingStrategy
|
||||||
|
|
||||||
|
do {
|
||||||
|
return try decoder.decode(T.self, from: data)
|
||||||
|
} catch DecodingError.keyNotFound(let key, let context) {
|
||||||
|
fatalError("Failed to decode \(file) from bundle due to missing key '\(key.stringValue)' not found – \(context.debugDescription)")
|
||||||
|
} catch DecodingError.typeMismatch(_, let context) {
|
||||||
|
fatalError("Failed to decode \(file) from bundle due to type mismatch – \(context.debugDescription)")
|
||||||
|
} catch DecodingError.valueNotFound(let type, let context) {
|
||||||
|
fatalError("Failed to decode \(file) from bundle due to missing \(type) value – \(context.debugDescription)")
|
||||||
|
} catch DecodingError.dataCorrupted(_) {
|
||||||
|
fatalError("Failed to decode \(file) from bundle because it appears to be invalid JSON")
|
||||||
|
} catch {
|
||||||
|
fatalError("Failed to decode \(file) from bundle: \(error.localizedDescription)")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,416 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>USD</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>$</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>en-US</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>ANG</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>ƒ</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>en-SX</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>ARS</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>$</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>es-AR</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>Yadio</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>AUD</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>$</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>en-AU</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>AWG</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>ƒ</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>nl-AW</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>BRL</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>R$</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>pt-BR</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>CAD</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>$</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>en-CA</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>CHF</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>CHF</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>de-CH</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>CLP</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>$</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>es-CL</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>COP</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>$</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>es-CO</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>CZK</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>Kč</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>cs-CZ</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>CNY</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>¥</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>zh-CN</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>EUR</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>€</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>en-IE</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>GBP</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>£</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>en-GB</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>HRK</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>HRK</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>hr-HR</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>HUF</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>Ft</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>hu-HU</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>ILS</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>₪</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>he-IL</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>INR</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>₹</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>hi-HN</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>JPY</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>¥</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>ja-JP</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>KES</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>Ksh</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>en-KE</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>KRW</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>₩</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>ko-KR</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>LBP</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>ل.ل.</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>ar-LB</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>BitcoinduLiban</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>MXN</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>$</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>es-MX</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>MYR</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>RM</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>ms-MY</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>NGN</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>₦</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>en-NG</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>NOK</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>kr</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>nb-NO</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>NZD</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>$</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>en-NZ</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>PLN</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>zł</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>pl-PL</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>PHP</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>₱</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>en-PH</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>RUB</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>₽</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>ru-RU</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>SGD</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>S$</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>zh-SG</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>SEK</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>kr</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>sv-SE</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>TRY</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>₺</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>tr-TR</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>THB</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>฿</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>th-TH</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>TWD</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>NT$</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>zh-Hant-TW</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>TZS</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>TSh</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>en-TZ</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>UAH</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>₴</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>uk-UA</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>UYU</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>$</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>es-UY</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>VEF</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>Bs.</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>es-VE</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>VES</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>Bs.</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>es-VE</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>Yadio</string>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>endPointKey</key>
|
|
||||||
<string>ZAR</string>
|
|
||||||
<key>symbol</key>
|
|
||||||
<string>R</string>
|
|
||||||
<key>locale</key>
|
|
||||||
<string>en-ZA</string>
|
|
||||||
<key>source</key>
|
|
||||||
<string>CoinDesk</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</plist>
|
|
|
@ -63,49 +63,7 @@ const RateExtractors = Object.freeze({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const FiatUnit = Object.freeze({
|
export const FiatUnit = require('./fiatUnit.json');
|
||||||
USD: { endPointKey: 'USD', symbol: '$', locale: 'en-US', source: FiatUnitSource.CoinDesk },
|
|
||||||
ANG: { endPointKey: 'ANG', symbol: 'ƒ', locale: 'en-SX', source: FiatUnitSource.CoinDesk },
|
|
||||||
ARS: { endPointKey: 'ARS', symbol: '$', locale: 'es-AR', source: FiatUnitSource.Yadio },
|
|
||||||
AUD: { endPointKey: 'AUD', symbol: '$', locale: 'en-AU', source: FiatUnitSource.CoinDesk },
|
|
||||||
AWG: { endPointKey: 'AWG', symbol: 'ƒ', locale: 'nl-AW', source: FiatUnitSource.CoinDesk },
|
|
||||||
BRL: { endPointKey: 'BRL', symbol: 'R$', locale: 'pt-BR', source: FiatUnitSource.CoinDesk },
|
|
||||||
CAD: { endPointKey: 'CAD', symbol: '$', locale: 'en-CA', source: FiatUnitSource.CoinDesk },
|
|
||||||
CHF: { endPointKey: 'CHF', symbol: 'CHF', locale: 'de-CH', source: FiatUnitSource.CoinDesk },
|
|
||||||
CLP: { endPointKey: 'CLP', symbol: '$', locale: 'es-CL', source: FiatUnitSource.CoinDesk },
|
|
||||||
COP: { endPointKey: 'COP', symbol: '$', locale: 'es-CO', source: FiatUnitSource.CoinDesk },
|
|
||||||
CZK: { endPointKey: 'CZK', symbol: 'Kč', locale: 'cs-CZ', source: FiatUnitSource.CoinDesk },
|
|
||||||
CNY: { endPointKey: 'CNY', symbol: '¥', locale: 'zh-CN', source: FiatUnitSource.CoinDesk },
|
|
||||||
EUR: { endPointKey: 'EUR', symbol: '€', locale: 'en-IE', source: FiatUnitSource.CoinDesk },
|
|
||||||
GBP: { endPointKey: 'GBP', symbol: '£', locale: 'en-GB', source: FiatUnitSource.CoinDesk },
|
|
||||||
HRK: { endPointKey: 'HRK', symbol: 'HRK', locale: 'hr-HR', source: FiatUnitSource.CoinDesk },
|
|
||||||
HUF: { endPointKey: 'HUF', symbol: 'Ft', locale: 'hu-HU', source: FiatUnitSource.CoinDesk },
|
|
||||||
ILS: { endPointKey: 'ILS', symbol: '₪', locale: 'he-IL', source: FiatUnitSource.CoinDesk },
|
|
||||||
INR: { endPointKey: 'INR', symbol: '₹', locale: 'hi-HN', source: FiatUnitSource.CoinDesk },
|
|
||||||
JPY: { endPointKey: 'JPY', symbol: '¥', locale: 'ja-JP', source: FiatUnitSource.CoinDesk },
|
|
||||||
KES: { endPointKey: 'KES', symbol: 'Ksh', locale: 'en-KE', source: FiatUnitSource.CoinDesk },
|
|
||||||
KRW: { endPointKey: 'KRW', symbol: '₩', locale: 'ko-KR', source: FiatUnitSource.CoinDesk },
|
|
||||||
LBP: { endPointKey: 'LBP', symbol: 'ل.ل.', locale: 'ar-LB', source: FiatUnitSource.BitcoinduLiban },
|
|
||||||
MXN: { endPointKey: 'MXN', symbol: '$', locale: 'es-MX', source: FiatUnitSource.CoinDesk },
|
|
||||||
MYR: { endPointKey: 'MYR', symbol: 'RM', locale: 'ms-MY', source: FiatUnitSource.CoinDesk },
|
|
||||||
NGN: { endPointKey: 'NGN', symbol: '₦', locale: 'en-NG', source: FiatUnitSource.CoinDesk },
|
|
||||||
NOK: { endPointKey: 'NOK', symbol: 'kr', locale: 'nb-NO', source: FiatUnitSource.CoinDesk },
|
|
||||||
NZD: { endPointKey: 'NZD', symbol: '$', locale: 'en-NZ', source: FiatUnitSource.CoinDesk },
|
|
||||||
PLN: { endPointKey: 'PLN', symbol: 'zł', locale: 'pl-PL', source: FiatUnitSource.CoinDesk },
|
|
||||||
PHP: { endPointKey: 'PHP', symbol: '₱', locale: 'en-PH', source: FiatUnitSource.CoinDesk },
|
|
||||||
RUB: { endPointKey: 'RUB', symbol: '₽', locale: 'ru-RU', source: FiatUnitSource.CoinDesk },
|
|
||||||
SGD: { endPointKey: 'SGD', symbol: 'S$', locale: 'zh-SG', source: FiatUnitSource.CoinDesk },
|
|
||||||
SEK: { endPointKey: 'SEK', symbol: 'kr', locale: 'sv-SE', source: FiatUnitSource.CoinDesk },
|
|
||||||
TRY: { endPointKey: 'TRY', symbol: '₺', locale: 'tr-TR', source: FiatUnitSource.CoinDesk },
|
|
||||||
THB: { endPointKey: 'THB', symbol: '฿', locale: 'th-TH', source: FiatUnitSource.CoinDesk },
|
|
||||||
TWD: { endPointKey: 'TWD', symbol: 'NT$', locale: 'zh-Hant-TW', source: FiatUnitSource.CoinDesk },
|
|
||||||
TZS: { endPointKey: 'TZS', symbol: 'TSh', locale: 'en-TZ', source: FiatUnitSource.CoinDesk },
|
|
||||||
UAH: { endPointKey: 'UAH', symbol: '₴', locale: 'uk-UA', source: FiatUnitSource.CoinDesk },
|
|
||||||
UYU: { endPointKey: 'UYU', symbol: '$', locale: 'es-UY', source: FiatUnitSource.CoinDesk },
|
|
||||||
VEF: { endPointKey: 'VEF', symbol: 'Bs.', locale: 'es-VE', source: FiatUnitSource.CoinDesk },
|
|
||||||
VES: { endPointKey: 'VES', symbol: 'Bs.', locale: 'es-VE', source: FiatUnitSource.Yadio },
|
|
||||||
ZAR: { endPointKey: 'ZAR', symbol: 'R', locale: 'en-ZA', source: FiatUnitSource.CoinDesk },
|
|
||||||
});
|
|
||||||
|
|
||||||
export async function getFiatRate(ticker) {
|
export async function getFiatRate(ticker) {
|
||||||
return await RateExtractors[FiatUnit[ticker].source](ticker);
|
return await RateExtractors[FiatUnit[ticker].source](ticker);
|
||||||
|
|
248
models/fiatUnit.json
Normal file
248
models/fiatUnit.json
Normal file
|
@ -0,0 +1,248 @@
|
||||||
|
{
|
||||||
|
"USD": {
|
||||||
|
"endPointKey": "USD",
|
||||||
|
"symbol": "$",
|
||||||
|
"locale": "en-US",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"ANG": {
|
||||||
|
"endPointKey": "ANG",
|
||||||
|
"symbol": "ƒ",
|
||||||
|
"locale": "en-SX",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"ARS": {
|
||||||
|
"endPointKey": "ARS",
|
||||||
|
"symbol": "$",
|
||||||
|
"locale": "es-AR",
|
||||||
|
"source": "Yadio"
|
||||||
|
},
|
||||||
|
"AUD": {
|
||||||
|
"endPointKey": "AUD",
|
||||||
|
"symbol": "$",
|
||||||
|
"locale": "en-AU",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"AWG": {
|
||||||
|
"endPointKey": "AWG",
|
||||||
|
"symbol": "ƒ",
|
||||||
|
"locale": "nl-AW",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"BRL": {
|
||||||
|
"endPointKey": "BRL",
|
||||||
|
"symbol": "R$",
|
||||||
|
"locale": "pt-BR",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"CAD": {
|
||||||
|
"endPointKey": "CAD",
|
||||||
|
"symbol": "$",
|
||||||
|
"locale": "en-CA",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"CHF": {
|
||||||
|
"endPointKey": "CHF",
|
||||||
|
"symbol": "CHF",
|
||||||
|
"locale": "de-CH",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"CLP": {
|
||||||
|
"endPointKey": "CLP",
|
||||||
|
"symbol": "$",
|
||||||
|
"locale": "es-CL",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"COP": {
|
||||||
|
"endPointKey": "COP",
|
||||||
|
"symbol": "$",
|
||||||
|
"locale": "es-CO",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"CZK": {
|
||||||
|
"endPointKey": "CZK",
|
||||||
|
"symbol": "Kč",
|
||||||
|
"locale": "cs-CZ",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"CNY": {
|
||||||
|
"endPointKey": "CNY",
|
||||||
|
"symbol": "¥",
|
||||||
|
"locale": "zh-CN",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"EUR": {
|
||||||
|
"endPointKey": "EUR",
|
||||||
|
"symbol": "€",
|
||||||
|
"locale": "en-IE",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"GBP": {
|
||||||
|
"endPointKey": "GBP",
|
||||||
|
"symbol": "£",
|
||||||
|
"locale": "en-GB",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"HRK": {
|
||||||
|
"endPointKey": "HRK",
|
||||||
|
"symbol": "HRK",
|
||||||
|
"locale": "hr-HR",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"HUF": {
|
||||||
|
"endPointKey": "HUF",
|
||||||
|
"symbol": "Ft",
|
||||||
|
"locale": "hu-HU",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"ILS": {
|
||||||
|
"endPointKey": "ILS",
|
||||||
|
"symbol": "₪",
|
||||||
|
"locale": "he-IL",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"INR": {
|
||||||
|
"endPointKey": "INR",
|
||||||
|
"symbol": "₹",
|
||||||
|
"locale": "hi-HN",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"JPY": {
|
||||||
|
"endPointKey": "JPY",
|
||||||
|
"symbol": "¥",
|
||||||
|
"locale": "ja-JP",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"KES": {
|
||||||
|
"endPointKey": "KES",
|
||||||
|
"symbol": "Ksh",
|
||||||
|
"locale": "en-KE",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"KRW": {
|
||||||
|
"endPointKey": "KRW",
|
||||||
|
"symbol": "₩",
|
||||||
|
"locale": "ko-KR",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"LBP": {
|
||||||
|
"endPointKey": "LBP",
|
||||||
|
"symbol": "ل.ل.",
|
||||||
|
"locale": "ar-LB",
|
||||||
|
"source": "BitcoinduLiban"
|
||||||
|
},
|
||||||
|
"MXN": {
|
||||||
|
"endPointKey": "MXN",
|
||||||
|
"symbol": "$",
|
||||||
|
"locale": "es-MX",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"MYR": {
|
||||||
|
"endPointKey": "MYR",
|
||||||
|
"symbol": "RM",
|
||||||
|
"locale": "ms-MY",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"NGN": {
|
||||||
|
"endPointKey": "NGN",
|
||||||
|
"symbol": "₦",
|
||||||
|
"locale": "en-NG",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"NOK": {
|
||||||
|
"endPointKey": "NOK",
|
||||||
|
"symbol": "kr",
|
||||||
|
"locale": "nb-NO",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"NZD": {
|
||||||
|
"endPointKey": "NZD",
|
||||||
|
"symbol": "$",
|
||||||
|
"locale": "en-NZ",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"PLN": {
|
||||||
|
"endPointKey": "PLN",
|
||||||
|
"symbol": "zł",
|
||||||
|
"locale": "pl-PL",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"PHP": {
|
||||||
|
"endPointKey": "PHP",
|
||||||
|
"symbol": "₱",
|
||||||
|
"locale": "en-PH",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"RUB": {
|
||||||
|
"endPointKey": "RUB",
|
||||||
|
"symbol": "₽",
|
||||||
|
"locale": "ru-RU",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"SGD": {
|
||||||
|
"endPointKey": "SGD",
|
||||||
|
"symbol": "S$",
|
||||||
|
"locale": "zh-SG",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"SEK": {
|
||||||
|
"endPointKey": "SEK",
|
||||||
|
"symbol": "kr",
|
||||||
|
"locale": "sv-SE",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"TRY": {
|
||||||
|
"endPointKey": "TRY",
|
||||||
|
"symbol": "₺",
|
||||||
|
"locale": "tr-TR",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"THB": {
|
||||||
|
"endPointKey": "THB",
|
||||||
|
"symbol": "฿",
|
||||||
|
"locale": "th-TH",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"TWD": {
|
||||||
|
"endPointKey": "TWD",
|
||||||
|
"symbol": "NT$",
|
||||||
|
"locale": "zh-Hant-TW",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"TZS": {
|
||||||
|
"endPointKey": "TZS",
|
||||||
|
"symbol": "TSh",
|
||||||
|
"locale": "en-TZ",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"UAH": {
|
||||||
|
"endPointKey": "UAH",
|
||||||
|
"symbol": "₴",
|
||||||
|
"locale": "uk-UA",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"UYU": {
|
||||||
|
"endPointKey": "UYU",
|
||||||
|
"symbol": "$",
|
||||||
|
"locale": "es-UY",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"VEF": {
|
||||||
|
"endPointKey": "VEF",
|
||||||
|
"symbol": "Bs.",
|
||||||
|
"locale": "es-VE",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
},
|
||||||
|
"VES": {
|
||||||
|
"endPointKey": "VES",
|
||||||
|
"symbol": "Bs.",
|
||||||
|
"locale": "es-VE",
|
||||||
|
"source": "Yadio"
|
||||||
|
},
|
||||||
|
"ZAR": {
|
||||||
|
"endPointKey": "ZAR",
|
||||||
|
"symbol": "R",
|
||||||
|
"locale": "en-ZA",
|
||||||
|
"source": "CoinDesk"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue