Skip to content

Commit

Permalink
recover wallet, forgot password
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisDemyanko committed Apr 3, 2019
1 parent f9eedae commit a3a83e6
Show file tree
Hide file tree
Showing 49 changed files with 346 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ class CreateWalletProgressViewController: BaseViewController {
let appModel = AppModel.sharedManager()
appModel.addDelegate(self)

if (!appModel.isInternetAvailable){
self.alert(title: "Error", message: "No internet connection") { (_ ) in
self.navigationController?.popToRootViewController(animated: true)
}
}
else{
// if (!appModel.isInternetAvailable){
// self.alert(title: "Error", message: "No internet connection") { (_ ) in
// self.navigationController?.popToRootViewController(animated: true)
// }
// }
// else{
if let phrase = phrase {
let created = appModel.createWallet(phrase, pass: password)
if(!created)
Expand Down Expand Up @@ -92,7 +92,7 @@ class CreateWalletProgressViewController: BaseViewController {
}
}
}
}
// }
}

override var preferredStatusBarStyle: UIStatusBarStyle {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<segments>
<segment title="Active"/>
<segment title="Expired"/>
<segment title="Contacts"/>
</segments>
<color key="tintColor" red="0.0" green="0.96470588239999999" blue="0.82352941180000006" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import SelectItemController

class EditAddressViewController: BaseViewController {

private let hours_24: UInt64 = 86400
private var address:BMAddress!
private var oldAddress:BMAddress!

Expand All @@ -44,7 +45,7 @@ class EditAddressViewController: BaseViewController {
self.address.ownerId = address.ownerId
self.address.isNowExpired = false
self.address.isNowActive = false
self.address.isNowActiveDuration = 86400
self.address.isNowActiveDuration = hours_24
}

required init?(coder aDecoder: NSCoder) {
Expand Down Expand Up @@ -243,10 +244,10 @@ extension EditAddressViewController : AddressExpireCellDelegate {
SelectItemController().show(parent: self, params: params) { (index) in
if let index = index {
if self.address.isNowActive {
self.address.isNowActiveDuration = (index == 0 ? 86400 : 0)
self.address.isNowActiveDuration = (index == 0 ? self.hours_24 : 0)
}
else{
self.address.duration = (index == 0 ? 86400 : 0)
self.address.duration = (index == 0 ? self.hours_24 : 0)
}

self.checkIsChanges()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ extension WalletSendViewController : UITextFieldDelegate {
if v == 0 {
textField.text = "0"
}
else if textField == feeField {
textField.text = String(Int(v))
}
}
else{
textField.text = "0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class TransactionViewController: BaseViewController {

@objc private func onMore(sender:UIBarButtonItem) {
let frame = CGRect(x: UIScreen.main.bounds.size.width-80, y: 44, width: 60, height: 40)
var items = [BMPopoverMenu.BMPopoverMenuItem(name: "Repeat transaction", icon: "iconRepeat", id:1), BMPopoverMenu.BMPopoverMenuItem(name: "Save peer address", icon: "iconSaveAddress", id:2)]
var items = [BMPopoverMenu.BMPopoverMenuItem(name: "Repeat transaction", icon: "iconRepeat", id:1) /*, BMPopoverMenu.BMPopoverMenuItem(name: "Save peer address", icon: "iconSaveAddress", id:2)*/]

if transaction.canCancel {
items.append(BMPopoverMenu.BMPopoverMenuItem(name: "Cancel transaction", icon: "iconCancelTransction", id:3))
Expand Down
84 changes: 84 additions & 0 deletions InfoTestnet.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?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">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Beam Wallet Testnet</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.1</string>
<key>CFBundleVersion</key>
<string>8</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
<string>a1b807ba21d77b7a801d4c9674b93d0e4f26b21d</string>
<key>Kits</key>
<array>
<dict>
<key>KitInfo</key>
<dict/>
<key>KitName</key>
<string>Crashlytics</string>
</dict>
</array>
</dict>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSCameraUsageDescription</key>
<string>The camera is needed to scan QR codes</string>
<key>UIAppFonts</key>
<array>
<string>ProximaNova-Bold.ttf</string>
<string>ProximaNova-Regular.ttf</string>
<string>SF-Pro-Display-Bold.otf</string>
<string>SF-Pro-Display-Regular.otf</string>
<string>SF-Pro-Display-Semibold.otf</string>
</array>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
</array>
<key>UIFileSharingEnabled</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreenTestNet</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
11 changes: 10 additions & 1 deletion Podfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'


post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['DEBUG_INFORMATION_FORMAT'] = 'dwarf'
end
end
end

def shared_pods
use_frameworks!

pod 'Fabric'
pod 'Crashlytics'
pod 'SVProgressHUD'
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ SPEC CHECKSUMS:
SSZipArchive: 41455d4b8d2b6ab93990820b50dc697c2554a322
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6

PODFILE CHECKSUM: 19f679bb059691686badc372833a64640ac66067
PODFILE CHECKSUM: 54858bba46d5bd85c09ed7cc9db697c5689a6894

COCOAPODS: 1.5.3
23 changes: 23 additions & 0 deletions Resources/Assets.xcassets/iconAddresses.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "iconAddressbookActive.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "iconAddressbookActive@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "iconAddressbookActive@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "iconCancelTransction-1.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "iconCancelTransction.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "iconCancelTransction@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions Resources/Assets.xcassets/iconCopyWhite24.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "iconCopyWhite24-2.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "iconCopyWhite24-1.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "iconCopyWhite24.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions Resources/Assets.xcassets/iconDelete.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "iconDelete.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "iconDelete@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "iconDelete@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions Resources/Assets.xcassets/iconEdit.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "icon_edit-2.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "icon_edit-1.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "icon_edit.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "iconReceiveBlue.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "iconReceiveBlue@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "iconReceiveBlue@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions Resources/Assets.xcassets/iconRepeat.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "iconRepeat.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "iconRepeat@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "iconRepeat@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions Resources/Assets.xcassets/iconSaveAddress.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "iconSaveAddress.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "iconSaveAddress@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "iconSaveAddress@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a3a83e6

Please sign in to comment.