-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix delete cloud backup after local backup - Fix some bugs
- Loading branch information
Showing
36 changed files
with
989 additions
and
138 deletions.
There are no files selected for viewing
118 changes: 91 additions & 27 deletions
118
UnstoppableWallet/UnstoppableWallet.xcodeproj/project.pbxproj
Large diffs are not rendered by default.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
...pableWallet/UnstoppableWallet/Assets.xcassets/Icons/no_internet_48.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "no internet@2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "no internet@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+1.83 KB
...toppableWallet/Assets.xcassets/Icons/no_internet_48.imageset/no internet@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.64 KB
...toppableWallet/Assets.xcassets/Icons/no_internet_48.imageset/no internet@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
UnstoppableWallet/UnstoppableWallet/Modules/Backup/ICloud/BackupCloudModule.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import UIKit | ||
import ThemeKit | ||
import HsToolKit | ||
|
||
class BackupCloudModule { | ||
static let minimumPassphraseLength = 8 | ||
|
||
static func backupTerms(account: Account) -> UIViewController { | ||
let service = ICloudBackupTermsService(account: account) | ||
let viewModel = ICloudBackupTermsViewModel(service: service) | ||
let controller = ICloudBackupTermsViewController(viewModel: viewModel) | ||
|
||
return ThemeNavigationController(rootViewController: controller) | ||
} | ||
|
||
static func backupName(account: Account) -> UIViewController { | ||
let service = ICloudBackupNameService(iCloudManager: App.shared.cloudAccountBackupManager, account: account) | ||
let viewModel = ICloudBackupNameViewModel(service: service) | ||
let controller = ICloudBackupNameViewController(viewModel: viewModel) | ||
|
||
return controller | ||
} | ||
|
||
static func backupPassword(account: Account, name: String) -> UIViewController { | ||
let service = BackupCloudPassphraseService(iCloudManager: App.shared.cloudAccountBackupManager, account: account, name: name) | ||
let viewModel = BackupCloudPassphraseViewModel(service: service) | ||
let controller = BackupCloudPassphraseViewController(viewModel: viewModel) | ||
|
||
return controller | ||
} | ||
|
||
} | ||
|
||
extension BackupCloudModule { | ||
|
||
enum PassphraseCharacterSet: CaseIterable { | ||
case lowerCased | ||
case upperCased | ||
case digits | ||
case customSymbols | ||
|
||
var set: CharacterSet { | ||
switch self { | ||
case .upperCased: return CharacterSet.uppercaseLetters | ||
case .lowerCased: return CharacterSet.lowercaseLetters | ||
case .digits: return CharacterSet.decimalDigits | ||
case .customSymbols: return CharacterSet(charactersIn: " '\"`&/?!:;.,~*$=+-[](){}<>\\_#@|%") | ||
} | ||
} | ||
|
||
func contains(_ string: String) -> Bool { | ||
string.rangeOfCharacter(from: set) != nil | ||
} | ||
} | ||
|
||
} |
31 changes: 0 additions & 31 deletions
31
UnstoppableWallet/UnstoppableWallet/Modules/Backup/ICloud/ICloudBackupModule.swift
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.