diff --git a/AlphaWallet.xcodeproj/project.pbxproj b/AlphaWallet.xcodeproj/project.pbxproj index 93519d07f..3de44add2 100644 --- a/AlphaWallet.xcodeproj/project.pbxproj +++ b/AlphaWallet.xcodeproj/project.pbxproj @@ -634,6 +634,7 @@ 5E7C7F53A21D1D0FE576DD8F /* ElevateWalletSecurityViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C753A2216F043CBDEC07C /* ElevateWalletSecurityViewController.swift */; }; 5E7C7F60056FDD6ACC390400 /* UniversalLinkInPasteboardCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C7F3DD81D44A996789FC4 /* UniversalLinkInPasteboardCoordinator.swift */; }; 5E7C7F61D540CAFC68D6843D /* WebImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C77A8E9F8DF94ED53D452 /* WebImageView.swift */; }; + 5E7C7F62DA439F87F46D09C7 /* UnitConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C743FCC624ABD8640FAB5 /* UnitConfiguration.swift */; }; 5E7C7F67945615E242B61CC3 /* BoxView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C7C5454600A70DCFD7C0E /* BoxView.swift */; }; 5E7C7F72926D84CF741C0D18 /* ABIType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E7C7CBCC0A74A084AC2F053 /* ABIType.swift */; }; 5E7C7F808D0B0B19ECEA6623 /* ETH.tsml in Resources */ = {isa = PBXBuildFile; fileRef = 5E7C768D3C3F400E0B88B575 /* ETH.tsml */; }; @@ -1408,6 +1409,7 @@ 5E7C74259A3F3B0277B0E8C5 /* SingleChainTransactionEtherscanDataCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SingleChainTransactionEtherscanDataCoordinator.swift; sourceTree = ""; }; 5E7C74294562EB79EFCD3559 /* DiscoverDappCellViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DiscoverDappCellViewModel.swift; sourceTree = ""; }; 5E7C743C5382AF2288A1DB0D /* ReplaceTransactionCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReplaceTransactionCoordinator.swift; sourceTree = ""; }; + 5E7C743FCC624ABD8640FAB5 /* UnitConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnitConfiguration.swift; sourceTree = ""; }; 5E7C746AB3B09DC0E47614EA /* AnalyticsCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsCoordinator.swift; sourceTree = ""; }; 5E7C74822F5F71748184F6C1 /* EventInstance.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventInstance.swift; sourceTree = ""; }; 5E7C7487BDF72352446E1266 /* ImportTokenViewControllerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImportTokenViewControllerTests.swift; sourceTree = ""; }; @@ -3941,6 +3943,7 @@ 872D9565271D66C200870971 /* GasPriceEstimates.swift */, 872D9566271D66C200870971 /* GasPriceEstimator.swift */, 5E7C7B19FDDF5D0535243682 /* GasEstimates.swift */, + 5E7C743FCC624ABD8640FAB5 /* UnitConfiguration.swift */, ); path = Models; sourceTree = ""; @@ -6503,6 +6506,7 @@ 5E7C71967C34DD3F207F8126 /* WhatsNewExperimentCoordinator.swift in Sources */, 5E7C7062A44AF416B110008A /* PingInfuraCoordinator.swift in Sources */, 5E7C788C6ACB6E5AA24216A6 /* FiatOnRampCoordinator.swift in Sources */, + 5E7C7F62DA439F87F46D09C7 /* UnitConfiguration.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/AlphaWallet/Gas/Models/UnitConfiguration.swift b/AlphaWallet/Gas/Models/UnitConfiguration.swift new file mode 100644 index 000000000..db2e882c9 --- /dev/null +++ b/AlphaWallet/Gas/Models/UnitConfiguration.swift @@ -0,0 +1,9 @@ +// Copyright © 2022 Stormbird PTE. LTD. + +import Foundation + +struct UnitConfiguration { + static let gasPriceUnit: EthereumUnit = .gwei + static let gasFeeUnit: EthereumUnit = .ether + static let finneyUnit: EthereumUnit = .finney +} diff --git a/AlphaWallet/Settings/Types/Constants.swift b/AlphaWallet/Settings/Types/Constants.swift index dfb7486eb..691139924 100644 --- a/AlphaWallet/Settings/Types/Constants.swift +++ b/AlphaWallet/Settings/Types/Constants.swift @@ -206,14 +206,8 @@ public struct Constants { ] } -public struct UnitConfiguration { - public static let gasPriceUnit: EthereumUnit = .gwei - public static let gasFeeUnit: EthereumUnit = .ether - public static let finneyUnit: EthereumUnit = .finney -} - extension URL { static var forResolvingDAS: URL { return Constants.dasLookupURL } -} +} \ No newline at end of file