Skip to content

Commit

Permalink
Texas build
Browse files Browse the repository at this point in the history
  • Loading branch information
sidorov-panda committed Mar 3, 2020
1 parent ee7449c commit d97f715
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 40 deletions.
16 changes: 8 additions & 8 deletions MinterWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3438,7 +3438,7 @@
CODE_SIGN_ENTITLEMENTS = MinterWallet/MinterWallet.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 244;
CURRENT_PROJECT_VERSION = 251;
DEVELOPMENT_TEAM = A26H28FPZU;
ENABLE_BITCODE = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -3452,7 +3452,7 @@
INFOPLIST_FILE = "$(SRCROOT)/MinterWallet/MinterWallet-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0.22;
MARKETING_VERSION = 1.0.24;
PRODUCT_BUNDLE_IDENTIFIER = MNT.BipWallet;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -3473,7 +3473,7 @@
CODE_SIGN_ENTITLEMENTS = MinterWallet/MinterWallet.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 244;
CURRENT_PROJECT_VERSION = 251;
DEVELOPMENT_TEAM = A26H28FPZU;
ENABLE_BITCODE = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -3487,7 +3487,7 @@
INFOPLIST_FILE = "$(SRCROOT)/MinterWallet/MinterWallet-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0.22;
MARKETING_VERSION = 1.0.24;
PRODUCT_BUNDLE_IDENTIFIER = MNT.BipWallet;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3614,7 +3614,7 @@
CODE_SIGN_ENTITLEMENTS = MinterWalletTestnet.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 245;
CURRENT_PROJECT_VERSION = 250;
DEVELOPMENT_TEAM = A26H28FPZU;
ENABLE_BITCODE = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -3628,7 +3628,7 @@
INFOPLIST_FILE = "$(SRCROOT)/MinterWalletTestnet-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0.22;
MARKETING_VERSION = 1.0.23;
PRODUCT_BUNDLE_IDENTIFIER = MNT.BipWalletTestnet;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -3649,7 +3649,7 @@
CODE_SIGN_ENTITLEMENTS = MinterWalletTestnet.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 245;
CURRENT_PROJECT_VERSION = 250;
DEVELOPMENT_TEAM = A26H28FPZU;
ENABLE_BITCODE = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -3663,7 +3663,7 @@
INFOPLIST_FILE = "$(SRCROOT)/MinterWalletTestnet-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0.22;
MARKETING_VERSION = 1.0.23;
PRODUCT_BUNDLE_IDENTIFIER = MNT.BipWalletTestnet;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
3 changes: 2 additions & 1 deletion MinterWallet/Classes/Common/Helper/ConvertRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class ConvertRouter: BaseRouter {
}

static func viewController(path: [String], param: [String: Any]) -> UIViewController? {
return Storyboards.Convert.instantiateRootConvertViewController()
let viewController = Storyboards.Convert.instantiateRootConvertViewController()
return UINavigationController(rootViewController: viewController)
}

static func convertViewController() -> UIViewController? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class TransactionsRouter: BaseRouter {
static func viewController(path: [String], param: [String: Any]) -> UIViewController? {
let coinsVC = Storyboards.Transactions.instantiateTransactionsViewController()
coinsVC.viewModel = TransactionsViewModel()
return coinsVC
return UINavigationController(rootViewController: coinsVC)
}

static func transactionsViewController(viewModel: TransactionsViewModel) -> UIViewController? {
Expand Down
6 changes: 3 additions & 3 deletions MinterWallet/Classes/Common/Storage/Storage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class LocalStorage: Storage {

private var storage = UserDefaults.standard

func set<T : AnyObject>(_ object: T, forKey key: String) where T : NSCoding {
func set<T: AnyObject>(_ object: T, forKey key: String) where T: NSCoding {
//archive key
let data = NSKeyedArchiver.archivedData(withRootObject: object)
storage.set(data, forKey: key)
Expand Down Expand Up @@ -66,7 +66,7 @@ class LocalStorage: Storage {

class SecureStorage: Storage {

//MARK: -
// MARK: -

init(namespace: String = "SecureStorage") {
self.namespace = namespace
Expand All @@ -77,7 +77,7 @@ class SecureStorage: Storage {

private let storage: KeychainSwift

//MARK: - Setters
// MARK: - Setters

func set(_ bool: Bool, forKey key: String) {
storage.set(bool, forKey: key)
Expand Down
4 changes: 2 additions & 2 deletions MinterWallet/Classes/Convert/Convert.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15400" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="HKa-ye-yvn">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="HKa-ye-yvn">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15404"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<customFonts key="customFonts">
Expand Down
17 changes: 6 additions & 11 deletions MinterWallet/Classes/Root/ViewController/RootViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ class RootViewController: UIViewController, ControllerType {
self?.tabbarVC.selectedIndex = index
return
}

let transitionDelegate = DeckTransitioningDelegate()
viewController.transitioningDelegate = transitionDelegate
viewController.modalPresentationStyle = .custom
self?.present(viewController, animated: true, completion: nil)
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
let transitionDelegate = DeckTransitioningDelegate()
viewController.transitioningDelegate = transitionDelegate
viewController.modalPresentationStyle = .custom
self?.present(viewController, animated: true, completion: nil)
}
}
} else {
if url.host == "tx" || url.path.contains("tx") {
Expand Down Expand Up @@ -181,12 +182,6 @@ class RootViewController: UIViewController, ControllerType {
}).forEach({ (view) in
(view as? McPicker)?.cancel()
})
//
// viewController.childViewControllers.forEach { (vc) in
// if vc != viewController {
// removePopupViewController(in: vc)
// }
// }
}

removePopupViewController(in: self)
Expand Down
12 changes: 12 additions & 0 deletions MinterWallet/Classes/Send/ViewController/SendViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,18 @@ extension SendViewController {
self?.tableView.endUpdates()
}).disposed(by: disposeBag)

viewModel.output.shouldShowAlert
.asDriver(onErrorJustReturn: "")
.drive(onNext: { [weak self] (message) in
let alert = UIAlertController(title: "❗️❗️ ATTENTION:", message: message, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: { (action) in

}))
self?.present(alert, animated: true, completion: {

})
}).disposed(by: disposeBag)

readerVC.completionBlock = { [weak self] (result: QRCodeReaderResult?) in
self?.readerVC.stopScanning()
self?.readerVC.dismiss(animated: true) {
Expand Down
17 changes: 14 additions & 3 deletions MinterWallet/Classes/Send/ViewModel/SendViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import RxAppState
import RxBiBinding
import RxRelay
import AVFoundation
import GoldenKeystore

struct AccountPickerItem {
var title: String?
Expand Down Expand Up @@ -50,6 +51,7 @@ class SendViewModel: BaseViewModel, ViewModelProtocol {// swiftlint:disable:this
var showViewController: Observable<UIViewController?>
var openAppSettings: Observable<Void>
var updateTableHeight: Observable<Void>
var shouldShowAlert: Observable<String>
}

struct Dependency {
Expand All @@ -71,6 +73,7 @@ class SendViewModel: BaseViewModel, ViewModelProtocol {// swiftlint:disable:this
private let addressSubject = BehaviorRelay<String?>(value: "")
private var recipientAddress = BehaviorRelay<String?>(value: nil)
private let amountSubject = BehaviorRelay<String?>(value: "")
private let shouldShowAlertSubject = PublishSubject<String>()
//used to update input amount value
private let clearAmountBehavior = BehaviorRelay<String?>(value: "")
private var formChangedObservable: Observable<FormChangedObservable> {
Expand Down Expand Up @@ -199,7 +202,8 @@ class SendViewModel: BaseViewModel, ViewModelProtocol {// swiftlint:disable:this
popup: popupSubject.asObservable(),
showViewController: showViewControllerSubject.asObservable(),
openAppSettings: openAppSettingsSubject.asObservable(),
updateTableHeight: updateTableHeight.asObservable())
updateTableHeight: updateTableHeight.asObservable(),
shouldShowAlert: shouldShowAlertSubject.asObservable())
self.dependency = dependency

super.init()
Expand All @@ -209,14 +213,21 @@ class SendViewModel: BaseViewModel, ViewModelProtocol {// swiftlint:disable:this
.distinctUntilChanged()
.throttle(1.0, scheduler: MainScheduler.instance)
.subscribe(onNext: { [weak self] (val) in
if (val ?? "") == "," || (val ?? "") == "." {
self?.amountSubject.accept("0.")
if (val ?? "").starts(with: ",") || (val ?? "").starts(with: ".") {
let newVal = (val ?? "").trimmingCharacters(in: CharacterSet(charactersIn: ".,"))
self?.amountSubject.accept("0." + newVal)
} else {
self?.amountSubject.accept(val)
}
}).disposed(by: disposeBag)

payloadSubject.asObservable().subscribe(onNext: { (payld) in
if GoldenKeystore.mnemonicIsValid(payld ?? "") {
self.shouldShowAlertSubject.onNext("""
YOU ARE ABOUT TO SEND SEED PHRASE IN THE MESSAGE ATTACHED TO THIS TRANSACTION.\nIF YOU DO THIS, ANYONE WILL BE ABLE TO SEE IT AND ACCESS FUNDS!
""")
}

let data = (payld ?? "").data(using: .utf8) ?? Data()
if data.count > RawTransaction.maxPayloadSize {
self.payloadStateObservable.onNext(.invalid(error: "TOO MANY SYMBOLS".localized()))
Expand Down
6 changes: 3 additions & 3 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use_frameworks!
platform :ios, '10.0'

def shared_pods
pod 'MinterCore'#, :git => 'https://github.com/MinterTeam/minter-ios-core.git', :branch => 'texas'
pod 'MinterMy'#, :path => '../../minter-ios-my'
pod 'MinterExplorer'#, :path => '../../minter-ios-explorer'
pod 'MinterCore', :git => 'https://github.com/MinterTeam/minter-ios-core.git', :branch => 'texas'
pod 'MinterMy', :path => '../../minter-ios-my'
pod 'MinterExplorer', :path => '../../minter-ios-explorer'
pod 'Alamofire'
pod 'AlamofireImage'
pod 'RxSwift'
Expand Down
18 changes: 10 additions & 8 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ DEPENDENCIES:
- GoldenKeystore (from `https://github.com/sidorov-panda/GoldenKeystore`)
- GrowingTextView
- KeychainSwift (= 12.0.0)
- MinterCore (from `https://github.com/MinterTeam/minter-ios-core.git`, branch `texas`)
- MinterExplorer
- MinterMy
- MinterCore (from `https://github.com/MinterTeam/minter-ios-core.git`, branch `master`)
- MinterExplorer (from `../../minter-ios-explorer`)
- MinterMy (from `../../minter-ios-my`)
- NotificationBannerSwift (= 1.8.0)
- ObjectMapper (~> 3.3)
- ReachabilitySwift (~> 4.3)
Expand Down Expand Up @@ -114,8 +114,6 @@ SPEC REPOS:
- GrowingTextView
- KeychainSwift
- MarqueeLabel
- MinterExplorer
- MinterMy
- NotificationBannerSwift
- ObjectMapper
- ReachabilitySwift
Expand Down Expand Up @@ -143,8 +141,12 @@ EXTERNAL SOURCES:
GoldenKeystore:
:git: https://github.com/sidorov-panda/GoldenKeystore
MinterCore:
:branch: texas
:branch: master
:git: https://github.com/MinterTeam/minter-ios-core.git
MinterExplorer:
:path: "../../minter-ios-explorer"
MinterMy:
:path: "../../minter-ios-my"
RealmSwift:
:branch: master
:git: https://github.com/realm/realm-cocoa.git
Expand All @@ -158,7 +160,7 @@ CHECKOUT OPTIONS:
:commit: 2f58a6eb405561bec305d5a197bcaa1514eed77e
:git: https://github.com/sidorov-panda/GoldenKeystore
MinterCore:
:commit: c1bb1f9b5b64268ad55c806f13eb021d8e570f46
:commit: 7b27ee8195e7b657d661f5d212d31ab89f98c3cc
:git: https://github.com/MinterTeam/minter-ios-core.git
RealmSwift:
:commit: 6d52751b9c9aa7e6e6b8413721543133a05ad79e
Expand Down Expand Up @@ -210,6 +212,6 @@ SPEC CHECKSUMS:
XLPagerTabStrip: 63166e21c9844fa30f2d95d30f335e73be5caf22
YandexMobileMetrica: f18374ee6977a4cd1d0a86298a0df4ad7baf4135

PODFILE CHECKSUM: 7162d11c5f4ac3da447ca25bf068a9dbcf9cb9e0
PODFILE CHECKSUM: 9fdc9847dc97feed1d0a17026b88e9bf4e72c11a

COCOAPODS: 1.8.4

0 comments on commit d97f715

Please sign in to comment.