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

fix: some crashes #654

Merged
merged 2 commits into from
May 28, 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
24 changes: 12 additions & 12 deletions DashWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10195,7 +10195,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = dashwallet/dashwallet.entitlements;
CURRENT_PROJECT_VERSION = 9;
CURRENT_PROJECT_VERSION = 11;
DEVELOPMENT_TEAM = 44RJ69WHFF;
EXCLUDED_ARCHS = "";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
Expand Down Expand Up @@ -10325,7 +10325,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = dashwallet/dashwallet.entitlements;
CURRENT_PROJECT_VERSION = 9;
CURRENT_PROJECT_VERSION = 11;
DEVELOPMENT_TEAM = 44RJ69WHFF;
EXCLUDED_ARCHS = "";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
Expand Down Expand Up @@ -10531,7 +10531,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 9;
CURRENT_PROJECT_VERSION = 11;
DEVELOPMENT_TEAM = 44RJ69WHFF;
EXCLUDED_ARCHS = "";
IBSC_MODULE = WatchApp_Extension;
Expand All @@ -10553,7 +10553,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 9;
CURRENT_PROJECT_VERSION = 11;
DEVELOPMENT_TEAM = 44RJ69WHFF;
EXCLUDED_ARCHS = "";
IBSC_MODULE = WatchApp_Extension;
Expand All @@ -10573,7 +10573,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = C98AA93FF5283EC6405BCE4B /* Pods-WatchApp Extension.debug.xcconfig */;
buildSettings = {
CURRENT_PROJECT_VERSION = 9;
CURRENT_PROJECT_VERSION = 11;
DEVELOPMENT_TEAM = 44RJ69WHFF;
ENABLE_BITCODE = NO;
EXCLUDED_ARCHS = "";
Expand All @@ -10600,7 +10600,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = CE02413EF0C60B1D1EDE6457 /* Pods-WatchApp Extension.release.xcconfig */;
buildSettings = {
CURRENT_PROJECT_VERSION = 9;
CURRENT_PROJECT_VERSION = 11;
DEVELOPMENT_TEAM = 44RJ69WHFF;
ENABLE_BITCODE = NO;
EXCLUDED_ARCHS = "";
Expand Down Expand Up @@ -11312,7 +11312,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = dashwallet/dashwallet.entitlements;
CURRENT_PROJECT_VERSION = 9;
CURRENT_PROJECT_VERSION = 11;
DEVELOPMENT_TEAM = 44RJ69WHFF;
EXCLUDED_ARCHS = "";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
Expand Down Expand Up @@ -11513,7 +11513,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 9;
CURRENT_PROJECT_VERSION = 11;
DEVELOPMENT_TEAM = 44RJ69WHFF;
EXCLUDED_ARCHS = "";
IBSC_MODULE = WatchApp_Extension;
Expand All @@ -11533,7 +11533,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 556B5EBEBAEA571D74FF69A3 /* Pods-WatchApp Extension.testflight.xcconfig */;
buildSettings = {
CURRENT_PROJECT_VERSION = 9;
CURRENT_PROJECT_VERSION = 11;
DEVELOPMENT_TEAM = 44RJ69WHFF;
ENABLE_BITCODE = NO;
EXCLUDED_ARCHS = "";
Expand Down Expand Up @@ -11632,7 +11632,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = dashwallet/dashwallet.entitlements;
CURRENT_PROJECT_VERSION = 9;
CURRENT_PROJECT_VERSION = 11;
DEVELOPMENT_TEAM = 44RJ69WHFF;
EXCLUDED_ARCHS = "";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
Expand Down Expand Up @@ -11821,7 +11821,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 9;
CURRENT_PROJECT_VERSION = 11;
DEVELOPMENT_TEAM = 44RJ69WHFF;
EXCLUDED_ARCHS = "";
IBSC_MODULE = WatchApp_Extension;
Expand All @@ -11841,7 +11841,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 29B232FD70BA2EDF87F86A56 /* Pods-WatchApp Extension.testnet.xcconfig */;
buildSettings = {
CURRENT_PROJECT_VERSION = 9;
CURRENT_PROJECT_VERSION = 11;
DEVELOPMENT_TEAM = 44RJ69WHFF;
ENABLE_BITCODE = NO;
EXCLUDED_ARCHS = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,12 @@ final class BaseRatesProvider: NSObject, RatesProvider {
}

private func emitRates() {
let plainPricesByCode = UserDefaults.standard.object(forKey: PRICESBYCODE_KEY) as! [String : NSNumber]
let rates = plainPricesByCode.map { code, rate in
RateObject(code: code, name: currencyName(fromCode: code), price: rate.decimalValue)
if let plainPricesByCode = UserDefaults.standard.object(forKey: PRICESBYCODE_KEY) as? [String : NSNumber] {
let rates = plainPricesByCode.map { code, rate in
RateObject(code: code, name: currencyName(fromCode: code), price: rate.decimalValue)
}
updateHandler?(rates)
}
updateHandler?(rates)
}

func currencyName(fromCode code: String) -> String {
Expand Down
2 changes: 1 addition & 1 deletion DashWallet/Sources/UI/Home/HomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import UIKit

class HomeViewController: DWBasePayViewController {
var model: DWHomeModel!
var model: DWHomeProtocol!
private var homeView: HomeView!
weak var delegate: (DWHomeViewControllerDelegate & DWWipeDelegate)?

Expand Down
2 changes: 1 addition & 1 deletion DashWallet/Sources/UI/Main/MainTabbarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ extension MainTabbarController {

let homeVC = HomeViewController()
homeVC.delegate = self
homeVC.model = homeModel as? DWHomeModel
homeVC.model = homeModel
homeController = homeVC

var nvc = BaseNavigationController(rootViewController: homeVC)
Expand Down