From 341eae434e1b4ac1d32605ac2735e01a6b52aa16 Mon Sep 17 00:00:00 2001 From: MIPPL <> Date: Thu, 9 Apr 2020 09:39:08 +0200 Subject: [PATCH] validate min amount instaswap, other UI fixes --- breadwallet.xcodeproj/project.pbxproj | 120 +++++++++--------- breadwallet/HomeSwapCell.swift | 8 ++ breadwallet/src/Constants/Strings.swift | 1 + .../ViewControllers/AssetListTableView.swift | 3 +- .../RootModals/SwapViewController.swift | 27 +++- 5 files changed, 95 insertions(+), 64 deletions(-) diff --git a/breadwallet.xcodeproj/project.pbxproj b/breadwallet.xcodeproj/project.pbxproj index 4e826205..a143795c 100644 --- a/breadwallet.xcodeproj/project.pbxproj +++ b/breadwallet.xcodeproj/project.pbxproj @@ -5496,12 +5496,12 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; ENABLE_BITCODE = YES; INFOPLIST_FILE = "breadwallet WatchKit Extension/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.watchkitapp.Ext; PRODUCT_NAME = "${TARGET_NAME}"; SDKROOT = watchos; @@ -5516,12 +5516,12 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; ENABLE_BITCODE = YES; INFOPLIST_FILE = "breadwallet WatchKit Extension/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.watchkitapp.Ext; PRODUCT_NAME = "${TARGET_NAME}"; SDKROOT = watchos; @@ -5539,12 +5539,12 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; ENABLE_BITCODE = YES; IBSC_MODULE = breadwallet_WatchKit_Extension; INFOPLIST_FILE = "breadwallet WatchKit App/Info.plist"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.watchkitapp; PRODUCT_NAME = "Wagerr Pro"; PROVISIONING_PROFILE = ""; @@ -5564,12 +5564,12 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; ENABLE_BITCODE = YES; IBSC_MODULE = breadwallet_WatchKit_Extension; INFOPLIST_FILE = "breadwallet WatchKit App/Info.plist"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.watchkitapp; PRODUCT_NAME = "Wagerr Pro"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -5589,12 +5589,12 @@ CODE_SIGN_ENTITLEMENTS = breadwallet/breadwallet.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/**"; INFOPLIST_FILE = breadwallet/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; OTHER_SWIFT_FLAGS = "-DDebug"; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet; PRODUCT_NAME = "Wagerr Pro"; @@ -5615,12 +5615,12 @@ CODE_SIGN_ENTITLEMENTS = breadwallet/breadwallet.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/**"; INFOPLIST_FILE = breadwallet/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; OTHER_SWIFT_FLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet; PRODUCT_NAME = "Wagerr Pro"; @@ -5693,12 +5693,12 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "iMessage App Icon"; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; INFOPLIST_FILE = MessagesExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.watchkitapp.Ext; PRODUCT_NAME = "Wagerr Pro"; SKIP_INSTALL = YES; @@ -5709,12 +5709,12 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "iMessage App Icon"; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; INFOPLIST_FILE = MessagesExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.watchkitapp.Ext; PRODUCT_NAME = "Wagerr Pro"; SKIP_INSTALL = YES; @@ -5725,11 +5725,11 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = TodayExtension/TodayExtension.entitlements; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; INFOPLIST_FILE = TodayExtension/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.TodayExt; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -5740,11 +5740,11 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = TodayExtension/TodayExtension.entitlements; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; INFOPLIST_FILE = TodayExtension/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.TodayExt; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -5754,12 +5754,12 @@ 75A2A8251DA5938500A983D8 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; INFOPLIST_FILE = NotificationServiceExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.TodayExt; PRODUCT_NAME = "Wagerr Pro"; SKIP_INSTALL = YES; @@ -5770,12 +5770,12 @@ 75A2A8261DA5938500A983D8 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; INFOPLIST_FILE = NotificationServiceExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.TodayExt; PRODUCT_NAME = "Wagerr Pro"; SKIP_INSTALL = YES; @@ -5927,12 +5927,12 @@ CODE_SIGN_ENTITLEMENTS = breadwallet/breadwallet.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/**"; INFOPLIST_FILE = breadwallet/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; OTHER_SWIFT_FLAGS = "-DDebug -DScreenshots -DTestnet"; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet; PRODUCT_NAME = "Wagerr Pro"; @@ -5980,12 +5980,12 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; ENABLE_BITCODE = YES; IBSC_MODULE = breadwallet_WatchKit_Extension; INFOPLIST_FILE = "breadwallet WatchKit App/Info.plist"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.watchkitapp; PRODUCT_NAME = "Wagerr Pro"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -6000,12 +6000,12 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; ENABLE_BITCODE = YES; INFOPLIST_FILE = "breadwallet WatchKit Extension/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.watchkitapp.Ext; PRODUCT_NAME = "${TARGET_NAME}"; SDKROOT = watchos; @@ -6020,12 +6020,12 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "iMessage App Icon"; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; INFOPLIST_FILE = MessagesExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.watchkitapp.Ext; PRODUCT_NAME = "Wagerr Pro"; SKIP_INSTALL = YES; @@ -6036,11 +6036,11 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = TodayExtension/TodayExtension.entitlements; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; INFOPLIST_FILE = TodayExtension/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.TodayExt; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -6050,12 +6050,12 @@ CEA7E6901F09AC6A001F8C27 /* Screenshots */ = { isa = XCBuildConfiguration; buildSettings = { - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; INFOPLIST_FILE = NotificationServiceExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.TodayExt; PRODUCT_NAME = "Wagerr Pro"; SKIP_INSTALL = YES; @@ -6256,12 +6256,12 @@ CODE_SIGN_ENTITLEMENTS = breadwallet/breadwallet.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/**"; INFOPLIST_FILE = breadwallet/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; OTHER_SWIFT_FLAGS = "-DDebug -DTestnet"; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet; PRODUCT_NAME = "Wagerr Pro"; @@ -6309,12 +6309,12 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; ENABLE_BITCODE = YES; IBSC_MODULE = breadwallet_WatchKit_Extension; INFOPLIST_FILE = "breadwallet WatchKit App/Info.plist"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.watchkitapp; PRODUCT_NAME = "Wagerr Pro"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -6329,12 +6329,12 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; ENABLE_BITCODE = YES; INFOPLIST_FILE = "breadwallet WatchKit Extension/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.watchkitapp.Ext; PRODUCT_NAME = "${TARGET_NAME}"; SDKROOT = watchos; @@ -6349,12 +6349,12 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "iMessage App Icon"; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; INFOPLIST_FILE = MessagesExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.watchkitapp.Ext; PRODUCT_NAME = "Wagerr Pro"; SKIP_INSTALL = YES; @@ -6365,11 +6365,11 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = TodayExtension/TodayExtension.entitlements; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; INFOPLIST_FILE = TodayExtension/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.TodayExt; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -6379,12 +6379,12 @@ CEA7E6A31F0AAA84001F8C27 /* Testnet */ = { isa = XCBuildConfiguration; buildSettings = { - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; INFOPLIST_FILE = NotificationServiceExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.TodayExt; PRODUCT_NAME = "Wagerr Pro"; SKIP_INSTALL = YES; @@ -6578,12 +6578,12 @@ CODE_SIGN_ENTITLEMENTS = breadwallet/breadwallet.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/**"; INFOPLIST_FILE = breadwallet/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; OTHER_SWIFT_FLAGS = "-DTestflight -DDebug"; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet; PRODUCT_NAME = "Wagerr Pro"; @@ -6631,12 +6631,12 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; ENABLE_BITCODE = YES; IBSC_MODULE = breadwallet_WatchKit_Extension; INFOPLIST_FILE = "breadwallet WatchKit App/Info.plist"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.watchkitapp; PRODUCT_NAME = "Wagerr Pro"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -6651,12 +6651,12 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; ENABLE_BITCODE = YES; INFOPLIST_FILE = "breadwallet WatchKit Extension/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.watchkitapp.Ext; PRODUCT_NAME = "${TARGET_NAME}"; SDKROOT = watchos; @@ -6671,12 +6671,12 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "iMessage App Icon"; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; INFOPLIST_FILE = MessagesExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.watchkitapp.Ext; PRODUCT_NAME = "Wagerr Pro"; SKIP_INSTALL = YES; @@ -6687,11 +6687,11 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = TodayExtension/TodayExtension.entitlements; - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; INFOPLIST_FILE = TodayExtension/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.TodayExt; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -6701,12 +6701,12 @@ CEE0EF5C1EBF8D7F0018DB36 /* Testflight */ = { isa = XCBuildConfiguration; buildSettings = { - CURRENT_PROJECT_VERSION = 326; + CURRENT_PROJECT_VERSION = 328; DEVELOPMENT_TEAM = GZ55ZWQ3G3; INFOPLIST_FILE = NotificationServiceExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 3.2.6; + MARKETING_VERSION = 3.2.8; PRODUCT_BUNDLE_IDENTIFIER = org.wagerr.betwallet.TodayExt; PRODUCT_NAME = "Wagerr Pro"; SKIP_INSTALL = YES; diff --git a/breadwallet/HomeSwapCell.swift b/breadwallet/HomeSwapCell.swift index fe3d5219..48ec84ef 100644 --- a/breadwallet/HomeSwapCell.swift +++ b/breadwallet/HomeSwapCell.swift @@ -14,6 +14,7 @@ class HomeSwapCell : UITableViewCell { private let check = UIImageView(image: #imageLiteral(resourceName: "Flash").withRenderingMode(.alwaysTemplate)) private let titleLabel = UILabel(font: .customBold(size: 18.0), color: .white) + private let titlePairLabel = UILabel(font: .customBody(size: 16.0), color: .white) private let container = Background() override init(style: UITableViewCellStyle, reuseIdentifier: String?) { @@ -25,6 +26,7 @@ class HomeSwapCell : UITableViewCell { accessibilityIdentifier = "Instaswap" container.currency = viewModel.currency titleLabel.attributedText = viewModel.title + titlePairLabel.text = "WGR/BTC" container.setNeedsDisplay() check.tintColor = .white } @@ -42,6 +44,7 @@ class HomeSwapCell : UITableViewCell { contentView.addSubview(container) container.addSubview(check) container.addSubview(titleLabel) + container.addSubview(titlePairLabel) } private func addConstraints() { @@ -58,6 +61,11 @@ class HomeSwapCell : UITableViewCell { titleLabel.leadingAnchor.constraint(equalTo: check.trailingAnchor, constant: C.padding[2]), titleLabel.topAnchor.constraint(equalTo: container.topAnchor, constant: C.padding[2]) ]) + + titlePairLabel.constrain([ + titlePairLabel.trailingAnchor.constraint(equalTo: container.trailingAnchor, constant: -C.padding[2]), + titlePairLabel.topAnchor.constraint(equalTo: container.topAnchor, constant: C.padding[2]) + ]) } private func setupStyle() { diff --git a/breadwallet/src/Constants/Strings.swift b/breadwallet/src/Constants/Strings.swift index ba2d55ce..3298a51b 100644 --- a/breadwallet/src/Constants/Strings.swift +++ b/breadwallet/src/Constants/Strings.swift @@ -493,6 +493,7 @@ enum S { static let amountLabel = NSLocalizedString("Instaswap.amountLabel", value: "Enter BTC amount to swap", comment: "BTC amount cell") static let emptyMessage = NSLocalizedString("Instaswap.emptyMessage", value:"Swap operations will show here once submitted", comment: "Empty swap list message.") static let receiveAmount = NSLocalizedString("Instaswap.receiveAmount", value:"Amount to receive", comment: "Empty swap list message.") + static let youReceive = NSLocalizedString("Instaswap.youReceive", value:"You receive", comment: "You receive.") static let noAddress = NSLocalizedString("Instaswap.noAddress", value: "Please enter a valid BTC refund address.", comment: "Empty address alert message") static let errorSwap = NSLocalizedString("Instaswap.errorSwap", value: "An error ocurred while sending swap data: %@", comment: "Swap error message") static let sendSuccess = NSLocalizedString("Instaswap.sendSuccess", value:"Swap order sent", comment: "swap success alert header label (confirmation that the swap happened)") diff --git a/breadwallet/src/ViewControllers/AssetListTableView.swift b/breadwallet/src/ViewControllers/AssetListTableView.swift index 3340958b..459ab8c7 100644 --- a/breadwallet/src/ViewControllers/AssetListTableView.swift +++ b/breadwallet/src/ViewControllers/AssetListTableView.swift @@ -174,8 +174,7 @@ class AssetListTableView: UITableViewController, Subscriber { var viewModel : HomeSwapViewModel! viewModel = HomeSwapViewModel(currency: Currencies.btc, title: NSMutableAttributedString() - .bold("InstaSwap") - .normal(" by instaswap.io")) + .bold("InstaSwap.io")) let cell = tableView.dequeueReusableCell(withIdentifier: HomeSwapCell.cellIdentifier, for: indexPath) as! HomeSwapCell cell.set(viewModel: viewModel) return cell diff --git a/breadwallet/src/ViewControllers/RootModals/SwapViewController.swift b/breadwallet/src/ViewControllers/RootModals/SwapViewController.swift index b13543cf..70808aed 100644 --- a/breadwallet/src/ViewControllers/RootModals/SwapViewController.swift +++ b/breadwallet/src/ViewControllers/RootModals/SwapViewController.swift @@ -55,6 +55,7 @@ class SwapViewController : UIViewController, Subscriber, ModalPresentable, Track private var balance: UInt256 = 0 private var amount: Amount? private var isTOSAccepted = false + private var currentMin : Double = 0.0 // MARK: - Lifecycle override func viewDidLoad() { @@ -132,6 +133,10 @@ class SwapViewController : UIViewController, Subscriber, ModalPresentable, Track // MARK: - Actions private func addButtonActions() { + let gr = UITapGestureRecognizer(target: self, action: #selector(addressTapped)) + addressCell.addGestureRecognizer(gr) + addressCell.isUserInteractionEnabled = true + refundWalletCell.paste.addTarget(self, action: #selector(SwapViewController.pasteTapped), for: .touchUpInside) //refundWalletCell.scan.addTarget(self, action: #selector(SwapViewController.scanTapped), for: .touchUpInside) sendButton.addTarget(self, action: #selector(sendTapped), for: .touchUpInside) @@ -152,10 +157,23 @@ class SwapViewController : UIViewController, Subscriber, ModalPresentable, Track guard let `self` = self, case .success(let tickersData) = result else { return } DispatchQueue.main.async { - self.receiveCell.text = S.Instaswap.receiveAmount + ": " + tickersData.response!.getAmount + " " + self.currency.code + self.currentMin = tickersData.response!.min + self.receiveCell.text = S.Instaswap.youReceive + ": " + tickersData.response!.getAmount + " " + self.currency.code + + if Double(truncating: amount!.tokenValue as NSNumber) < self.currentMin { + self.receiveCell.textColor = .red + self.receiveCell.text! += String.init(format: " (min %.6f BTC)", self.currentMin) + } + else { + self.receiveCell.textColor = .grayTextTint + } } }) } + else { + self?.receiveCell.textColor = .grayTextTint + self?.receiveCell.text = S.Instaswap.receiveAmount + } self?.enableSendButton(isEnabled: self!.canEnableSend ) } @@ -167,6 +185,11 @@ class SwapViewController : UIViewController, Subscriber, ModalPresentable, Track } } + @objc private func addressTapped() { + UIPasteboard.general.string = receiveAddress + Store.trigger(name: .lightWeightAlert(S.Receive.copied)) + } + @objc private func pasteTapped() { refundWalletCell.textField.resignFirstResponder() guard let pasteboard = UIPasteboard.general.string, pasteboard.utf8.count > 0 else { @@ -216,7 +239,7 @@ class SwapViewController : UIViewController, Subscriber, ModalPresentable, Track } var canEnableSend : Bool { - return isTOSAccepted && (amount?.tokenValue ?? 0.0) > 0.0 + return isTOSAccepted && (amount?.tokenValue ?? 0.0) > 0.0 && Double(truncating: (amount?.tokenValue ?? 0.0) as NSNumber) >= currentMin } private func enableSendButton(isEnabled : Bool) {