Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOB-1830 Remove ZIL logic #416

Merged
merged 10 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions unstoppable-ios-app/domains-manager-ios.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
30784C8E27F455350034FA4A /* UDTextView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 30784C8D27F455350034FA4A /* UDTextView.xib */; };
307852642771FB030039FF40 /* DeepLinks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307852632771FB020039FF40 /* DeepLinks.swift */; };
307B1CEA2602775D007B14C3 /* UDWallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307B1CE92602775C007B14C3 /* UDWallet.swift */; };
307B1D322603C087007B14C3 /* UDWalletZil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307B1D312603C087007B14C3 /* UDWalletZil.swift */; };
307B1D392603C0C4007B14C3 /* UDWalletEthereum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307B1D382603C0C4007B14C3 /* UDWalletEthereum.swift */; };
307B1D5A2603C8E0007B14C3 /* BigInt in Frameworks */ = {isa = PBXBuildFile; productRef = 307B1D592603C8E0007B14C3 /* BigInt */; };
307EC19B25383EF600D62BA1 /* TransactionItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307EC19A25383EF600D62BA1 /* TransactionItem.swift */; };
Expand All @@ -87,7 +86,6 @@
309FDFBC265E7C0C00AE53D3 /* StripePaymentHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 309FDFBB265E7C0C00AE53D3 /* StripePaymentHelper.swift */; };
30A1895525AB483B0001178D /* PullUpView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 30A1895425AB483B0001178D /* PullUpView.xib */; };
30A280372714217200FD3759 /* wallets-registry.json in Resources */ = {isa = PBXBuildFile; fileRef = 30A280362714217100FD3759 /* wallets-registry.json */; };
30AD0D792704634600F42ACC /* Zesame in Frameworks */ = {isa = PBXBuildFile; productRef = 30AD0D782704634600F42ACC /* Zesame */; };
30AE84A92575862F003A0142 /* SF-Pro.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 30AE84A82575862F003A0142 /* SF-Pro.ttf */; };
30AE8521257837B5003A0142 /* NetworkConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30AE8520257837B5003A0142 /* NetworkConfig.swift */; };
30B3DC9728763294006FAA64 /* WCConnectionIntentStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30B3DC9628763294006FAA64 /* WCConnectionIntentStorage.swift */; };
Expand Down Expand Up @@ -2396,7 +2394,6 @@
307852632771FB020039FF40 /* DeepLinks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeepLinks.swift; sourceTree = "<group>"; };
307B1C7D25FA258F007B14C3 /* Env-Demo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Env-Demo.swift"; sourceTree = "<group>"; };
307B1CE92602775C007B14C3 /* UDWallet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UDWallet.swift; sourceTree = "<group>"; };
307B1D312603C087007B14C3 /* UDWalletZil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UDWalletZil.swift; sourceTree = "<group>"; };
307B1D382603C0C4007B14C3 /* UDWalletEthereum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UDWalletEthereum.swift; sourceTree = "<group>"; };
307CFF7E279AEF2B003A6AF1 /* ArrayExtensionsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayExtensionsTests.swift; sourceTree = "<group>"; };
307EC19A25383EF600D62BA1 /* TransactionItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransactionItem.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3637,7 +3634,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
30AD0D792704634600F42ACC /* Zesame in Frameworks */,
C61ECD862A25AB4200E97D70 /* SocketIO in Frameworks */,
290A604C2950AA1600882109 /* WalletConnectNetworking in Frameworks */,
307B1D5A2603C8E0007B14C3 /* BigInt in Frameworks */,
Expand Down Expand Up @@ -4620,7 +4616,6 @@
29AEA05429367785003BB5B4 /* UDWallet+Signing.swift */,
2959AC4629A61916006387DD /* UDWallet+SigningTransaction.swift */,
307B1D382603C0C4007B14C3 /* UDWalletEthereum.swift */,
307B1D312603C087007B14C3 /* UDWalletZil.swift */,
3004E32626D528D300B9CB6A /* LegacyUnitaryWallet.swift */,
C616C2D72806DBC600C212DC /* ExternalWalletMake.swift */,
C617FDA02B58E75B00B93433 /* WalletEntity.swift */,
Expand Down Expand Up @@ -7673,7 +7668,6 @@
30CE604B26A9DED000E0D29B /* web3swift */,
30B6583826A9E75E004F707F /* Stripe */,
30D89F5A26A9EB5500251C2D /* Bugsnag */,
30AD0D782704634600F42ACC /* Zesame */,
C63402872886547C00AB5D38 /* SVGKit */,
290A60472950AA1600882109 /* WalletConnect */,
290A60492950AA1600882109 /* WalletConnectAuth */,
Expand Down Expand Up @@ -7820,7 +7814,6 @@
30CE604A26A9DED000E0D29B /* XCRemoteSwiftPackageReference "web3swift" */,
30B6583726A9E75E004F707F /* XCRemoteSwiftPackageReference "stripe-ios" */,
30D89F5926A9EB5500251C2D /* XCRemoteSwiftPackageReference "bugsnag-cocoa" */,
30AD0D772704634600F42ACC /* XCRemoteSwiftPackageReference "Zesame" */,
C63402862886547C00AB5D38 /* XCRemoteSwiftPackageReference "SVGKit-Light" */,
290A60462950AA1500882109 /* XCRemoteSwiftPackageReference "WalletConnectSwiftV2" */,
C63812222993E009002590E7 /* XCRemoteSwiftPackageReference "Valet-ios" */,
Expand Down Expand Up @@ -8974,7 +8967,6 @@
C692C30E282E0C7500C31393 /* CreateBackupPasswordToBackupWalletPresenter.swift in Sources */,
30E549C32886DA27009833FB /* DefaultsStorage.swift in Sources */,
C600AB8329F807F60089107B /* DomainTransferService.swift in Sources */,
307B1D322603C087007B14C3 /* UDWalletZil.swift in Sources */,
C6456F202800303D00A517D5 /* ConfirmWordConfirmationCell.swift in Sources */,
C6F6AF6928A4D20A00A7B571 /* TitleVisibilityAfterLimitNavBarScrollingBehaviour.swift in Sources */,
C6D646DF2B1ED46200D724AC /* WalletConnectController.swift in Sources */,
Expand Down Expand Up @@ -10984,14 +10976,6 @@
version = 5.3.0;
};
};
30AD0D772704634600F42ACC /* XCRemoteSwiftPackageReference "Zesame" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/unstoppabledomains/Zesame";
requirement = {
branch = master;
kind = branch;
};
};
30B6583726A9E75E004F707F /* XCRemoteSwiftPackageReference "stripe-ios" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/stripe/stripe-ios";
Expand Down Expand Up @@ -11138,11 +11122,6 @@
package = 307B1D582603C8E0007B14C3 /* XCRemoteSwiftPackageReference "BigInt" */;
productName = BigInt;
};
30AD0D782704634600F42ACC /* Zesame */ = {
isa = XCSwiftPackageProductDependency;
package = 30AD0D772704634600F42ACC /* XCRemoteSwiftPackageReference "Zesame" */;
productName = Zesame;
};
30B6583826A9E75E004F707F /* Stripe */ = {
isa = XCSwiftPackageProductDependency;
package = 30B6583726A9E75E004F707F /* XCRemoteSwiftPackageReference "stripe-ios" */;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
{
"pins" : [
{
"identity" : "alamofire",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Alamofire/Alamofire.git",
"state" : {
"revision" : "3dc6a42c7727c49bf26508e29b0a0b35f9c7e1ad",
"version" : "5.8.1"
}
},
{
"identity" : "amplitude-ios",
"kind" : "remoteSourceControl",
Expand Down Expand Up @@ -72,15 +63,6 @@
"version" : "1.8.0"
}
},
{
"identity" : "ellipticcurvekit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Sajjon/EllipticCurveKit.git",
"state" : {
"revision" : "9ebdfefe73f97cd9a2b95cd94a093d4aad61d12e",
"version" : "1.0.2"
}
},
{
"identity" : "generic-json-swift",
"kind" : "remoteSourceControl",
Expand Down Expand Up @@ -143,15 +125,6 @@
"version" : "14.3.1"
}
},
{
"identity" : "rxswift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/ReactiveX/RxSwift.git",
"state" : {
"revision" : "7e01c05f25c025143073eaa3be3532f9375c614b",
"version" : "6.1.0"
}
},
{
"identity" : "secp256k1.swift",
"kind" : "remoteSourceControl",
Expand Down Expand Up @@ -375,15 +348,6 @@
"branch" : "main",
"revision" : "e08af6942841054ae02a6fe01d90d18e76d5f248"
}
},
{
"identity" : "zesame",
"kind" : "remoteSourceControl",
"location" : "https://github.com/unstoppabledomains/Zesame",
"state" : {
"branch" : "master",
"revision" : "5a3d17e30f7e480e8f3168a915ae3327643ee0d8"
}
}
],
"version" : 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,12 @@ extension DomainDisplayInfo {
enum UsageType: Equatable {
case normal,
newNonInteractable(tld: String),
zil,
deprecated(tld: String),
parked(status: DomainParkingStatus)
}

var usageType: UsageType {
if isZilliqaBased {
return .zil
} else if let tld = name.getTldName(), Constants.newNonInteractableTLDs.contains(tld) {
if let tld = name.getTldName(), Constants.newNonInteractableTLDs.contains(tld) {
return .newNonInteractable(tld: tld)
} else if let tld = name.getTldName(),
Constants.deprecatedTLDs.contains(tld) {
Expand All @@ -149,7 +146,6 @@ extension DomainDisplayInfo {
}
return .normal
}
var isZilliqaBased: Bool { blockchain == .Zilliqa }
var isInteractable: Bool { usageType == .normal }
var isAbleToSetAsRR: Bool { usageType == .normal && blockchain == .Matic }
var isAbleToTransfer: Bool { usageType == .normal && blockchain == .Matic }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ extension DomainItem {
static func isValidTxCost(blockchain: BlockchainType, txCost: NetworkService.TxCost?) -> Bool {
switch blockchain {
case .Ethereum: return txCost != nil
case .Zilliqa, .Matic: return txCost == nil
case .Matic: return txCost == nil
}
}
}
Expand Down Expand Up @@ -149,10 +149,6 @@ extension Array where Element == DomainItem {
}

extension Array where Element == DomainItem {
func filterZilCoOwned(by ownerAddress: HexAddress) -> Self {
return filterCoOwned(by: ownerAddress, in: .ZNS)
}

func filterCoOwned(by ownerAddress: HexAddress, in namingService: NamingService) -> Self {
return self.filter({$0.namingService == namingService && $0.ownerWallet?.normalized == ownerAddress.normalized})
}
Expand All @@ -165,7 +161,7 @@ extension DomainItem {
func doesRequirePayment() -> Bool {
switch self.getBlockchainType() {
case .Ethereum: return true
case .Zilliqa, .Matic: return false
case .Matic: return false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import Foundation

enum NamingService: String, Codable, CaseIterable {
case UNS
case ZNS = "zil"

static let cases = NamingService.allCases
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import Foundation
import BigInt

enum TxType: String, Codable {
case zilTx = "ZilTx"
case ethTx = "EthTx"
case maticTx = "MaticTx"
}
Expand Down Expand Up @@ -152,7 +151,6 @@ struct TransactionItem: Codable {

switch domain.namingService {
case .UNS: return domainName == domain.name
case .ZNS: return self.isPendingZilDomain(domain)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import UIKit

enum BlockchainType: String, CaseIterable, Codable, Hashable {
case Ethereum = "ETH"
case Zilliqa = "ZIL"
case Matic = "MATIC"

static let cases = Self.allCases
Expand All @@ -28,8 +27,6 @@ enum BlockchainType: String, CaseIterable, Codable, Hashable {
switch self {
case .Ethereum:
return UIImage(named: String.BlockChainIcons.ethereum.rawValue)!
case .Zilliqa:
return UIImage(named: String.BlockChainIcons.zilliqa.rawValue)!
case .Matic:
return UIImage(named: String.BlockChainIcons.matic.rawValue)!
}
Expand All @@ -39,8 +36,6 @@ enum BlockchainType: String, CaseIterable, Codable, Hashable {
switch self {
case .Ethereum:
return "Ethereum"
case .Zilliqa:
return "Zilliqa"
case .Matic:
return "Polygon"
}
Expand All @@ -52,8 +47,6 @@ enum BlockchainType: String, CaseIterable, Codable, Hashable {
return isTestNet ? 5 : 1 // Goerly or Mainnet
case .Matic:
return isTestNet ? 80001 : 137 // Mumbai or
case .Zilliqa:
return nil
}
}

Expand Down
Loading