Merge pull request #3949 from AlphaWallet/refactor-move-type-out-into-file

Refactor. Move type out into its own file
pull/3950/head
Hwee-Boon Yar 3 years ago committed by GitHub
commit 06e644b091
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      AlphaWallet.xcodeproj/project.pbxproj
  2. 9
      AlphaWallet/Gas/Models/UnitConfiguration.swift
  3. 8
      AlphaWallet/Settings/Types/Constants.swift

@ -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 = "<group>"; };
5E7C74294562EB79EFCD3559 /* DiscoverDappCellViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DiscoverDappCellViewModel.swift; sourceTree = "<group>"; };
5E7C743C5382AF2288A1DB0D /* ReplaceTransactionCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReplaceTransactionCoordinator.swift; sourceTree = "<group>"; };
5E7C743FCC624ABD8640FAB5 /* UnitConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnitConfiguration.swift; sourceTree = "<group>"; };
5E7C746AB3B09DC0E47614EA /* AnalyticsCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsCoordinator.swift; sourceTree = "<group>"; };
5E7C74822F5F71748184F6C1 /* EventInstance.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventInstance.swift; sourceTree = "<group>"; };
5E7C7487BDF72352446E1266 /* ImportTokenViewControllerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImportTokenViewControllerTests.swift; sourceTree = "<group>"; };
@ -3941,6 +3943,7 @@
872D9565271D66C200870971 /* GasPriceEstimates.swift */,
872D9566271D66C200870971 /* GasPriceEstimator.swift */,
5E7C7B19FDDF5D0535243682 /* GasEstimates.swift */,
5E7C743FCC624ABD8640FAB5 /* UnitConfiguration.swift */,
);
path = Models;
sourceTree = "<group>";
@ -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;
};

@ -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
}

@ -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
}
}
}
Loading…
Cancel
Save