Version Bump

pull/2/head
Michael Scoff 7 years ago
parent dd6ac71fd7
commit 8af2e55920
  1. 8
      Trust.xcodeproj/project.pbxproj
  2. 4
      Trust/Info.plist
  3. 17
      Trust/Transfer/Types/CurrencyRate+Fee.swift
  4. 14
      Trust/Transfer/ViewControllers/ConfigureTransactionViewController.swift
  5. 3
      Trust/Transfer/ViewControllers/ConfirmPaymentViewController.swift
  6. 9
      Trust/Transfer/ViewModels/ConfirmPaymentDetailsViewModel.swift
  7. 4
      TrustTests/Info.plist
  8. 4
      TrustUITests/Info.plist

@ -314,6 +314,7 @@
77B3BF4A2019247200EEC15A /* BrowserNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77B3BF492019247200EEC15A /* BrowserNavigationBar.swift */; }; 77B3BF4A2019247200EEC15A /* BrowserNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77B3BF492019247200EEC15A /* BrowserNavigationBar.swift */; };
77E0E773201FAD06009B4B31 /* BrowserURLParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E0E772201FAD05009B4B31 /* BrowserURLParser.swift */; }; 77E0E773201FAD06009B4B31 /* BrowserURLParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E0E772201FAD05009B4B31 /* BrowserURLParser.swift */; };
77E0E777201FAD36009B4B31 /* BrowserURLParserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E0E776201FAD36009B4B31 /* BrowserURLParserTests.swift */; }; 77E0E777201FAD36009B4B31 /* BrowserURLParserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E0E776201FAD36009B4B31 /* BrowserURLParserTests.swift */; };
BB5D6A9E20232EE8000FC5AB /* CurrencyRate+Fee.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB5D6A9D20232EE8000FC5AB /* CurrencyRate+Fee.swift */; };
CCA4FE331FD3655900749AE4 /* CheckDeviceCoordinatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA4FE321FD3655900749AE4 /* CheckDeviceCoordinatorTests.swift */; }; CCA4FE331FD3655900749AE4 /* CheckDeviceCoordinatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA4FE321FD3655900749AE4 /* CheckDeviceCoordinatorTests.swift */; };
CCA4FE361FD4282400749AE4 /* DeviceChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA4FE351FD4282400749AE4 /* DeviceChecker.swift */; }; CCA4FE361FD4282400749AE4 /* DeviceChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA4FE351FD4282400749AE4 /* DeviceChecker.swift */; };
CCA4FE381FD428B300749AE4 /* JailbreakChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA4FE371FD428B300749AE4 /* JailbreakChecker.swift */; }; CCA4FE381FD428B300749AE4 /* JailbreakChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA4FE371FD428B300749AE4 /* JailbreakChecker.swift */; };
@ -665,6 +666,7 @@
A3B747245A27436E621E7E41 /* Pods-TrustUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TrustUITests.release.xcconfig"; path = "Pods/Target Support Files/Pods-TrustUITests/Pods-TrustUITests.release.xcconfig"; sourceTree = "<group>"; }; A3B747245A27436E621E7E41 /* Pods-TrustUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TrustUITests.release.xcconfig"; path = "Pods/Target Support Files/Pods-TrustUITests/Pods-TrustUITests.release.xcconfig"; sourceTree = "<group>"; };
A48A17FC2CC895AF2BB871D0 /* Pods_TrustTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TrustTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A48A17FC2CC895AF2BB871D0 /* Pods_TrustTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TrustTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
B13A87D3BA5167741E5D0801 /* Pods-Trust.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Trust.release.xcconfig"; path = "Pods/Target Support Files/Pods-Trust/Pods-Trust.release.xcconfig"; sourceTree = "<group>"; }; B13A87D3BA5167741E5D0801 /* Pods-Trust.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Trust.release.xcconfig"; path = "Pods/Target Support Files/Pods-Trust/Pods-Trust.release.xcconfig"; sourceTree = "<group>"; };
BB5D6A9D20232EE8000FC5AB /* CurrencyRate+Fee.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CurrencyRate+Fee.swift"; sourceTree = "<group>"; };
CCA4FE321FD3655900749AE4 /* CheckDeviceCoordinatorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckDeviceCoordinatorTests.swift; sourceTree = "<group>"; }; CCA4FE321FD3655900749AE4 /* CheckDeviceCoordinatorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckDeviceCoordinatorTests.swift; sourceTree = "<group>"; };
CCA4FE351FD4282400749AE4 /* DeviceChecker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceChecker.swift; sourceTree = "<group>"; }; CCA4FE351FD4282400749AE4 /* DeviceChecker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceChecker.swift; sourceTree = "<group>"; };
CCA4FE371FD428B300749AE4 /* JailbreakChecker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JailbreakChecker.swift; sourceTree = "<group>"; }; CCA4FE371FD428B300749AE4 /* JailbreakChecker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JailbreakChecker.swift; sourceTree = "<group>"; };
@ -1497,6 +1499,7 @@
29BDF1A01FEE51A80023A45F /* GasLimitConfiguration.swift */, 29BDF1A01FEE51A80023A45F /* GasLimitConfiguration.swift */,
29FF6D6A2011D2AF00A3011C /* InCoordinatorError.swift */, 29FF6D6A2011D2AF00A3011C /* InCoordinatorError.swift */,
29C70C702016C7780072E454 /* SentTransaction.swift */, 29C70C702016C7780072E454 /* SentTransaction.swift */,
BB5D6A9D20232EE8000FC5AB /* CurrencyRate+Fee.swift */,
); );
path = Types; path = Types;
sourceTree = "<group>"; sourceTree = "<group>";
@ -2558,6 +2561,7 @@
294DFBA31FE0E2EA004CEB56 /* TransactionValue.swift in Sources */, 294DFBA31FE0E2EA004CEB56 /* TransactionValue.swift in Sources */,
2912CD2B1F6A833E00C6CBE3 /* TransactionsViewController.swift in Sources */, 2912CD2B1F6A833E00C6CBE3 /* TransactionsViewController.swift in Sources */,
775C00B520195BFB001B5EBC /* BrowserAction.swift in Sources */, 775C00B520195BFB001B5EBC /* BrowserAction.swift in Sources */,
BB5D6A9E20232EE8000FC5AB /* CurrencyRate+Fee.swift in Sources */,
295996161FADAFE500DB66A8 /* TransactionAction.swift in Sources */, 295996161FADAFE500DB66A8 /* TransactionAction.swift in Sources */,
299B5E291FCA8F040051361C /* GetERC20Balance.swift in Sources */, 299B5E291FCA8F040051361C /* GetERC20Balance.swift in Sources */,
77E0E773201FAD06009B4B31 /* BrowserURLParser.swift in Sources */, 77E0E773201FAD06009B4B31 /* BrowserURLParser.swift in Sources */,
@ -2862,7 +2866,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 133; CURRENT_PROJECT_VERSION = 134;
DEVELOPMENT_TEAM = 9873B38DWV; DEVELOPMENT_TEAM = 9873B38DWV;
ENABLE_BITCODE = YES; ENABLE_BITCODE = YES;
INFOPLIST_FILE = Trust/Info.plist; INFOPLIST_FILE = Trust/Info.plist;
@ -2886,7 +2890,7 @@
CODE_SIGN_ENTITLEMENTS = Trust/Trust.entitlements; CODE_SIGN_ENTITLEMENTS = Trust/Trust.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 133; CURRENT_PROJECT_VERSION = 134;
DEVELOPMENT_TEAM = 9873B38DWV; DEVELOPMENT_TEAM = 9873B38DWV;
ENABLE_BITCODE = YES; ENABLE_BITCODE = YES;
INFOPLIST_FILE = Trust/Info.plist; INFOPLIST_FILE = Trust/Info.plist;

@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.1.121</string> <string>1.1.122</string>
<key>CFBundleURLTypes</key> <key>CFBundleURLTypes</key>
<array> <array>
<dict> <dict>
@ -28,7 +28,7 @@
</dict> </dict>
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>133</string> <string>134</string>
<key>Fabric</key> <key>Fabric</key>
<dict> <dict>
<key>APIKey</key> <key>APIKey</key>

@ -0,0 +1,17 @@
// Copyright SIX DAY LLC. All rights reserved.
import Foundation
import BigInt
extension CurrencyRate {
func estimate(fee: String, with symbol: String) -> String? {
guard let feeInDouble = Double(fee) else {
return nil
}
guard let price = self.rates.filter({ $0.code == symbol }).first else {
return nil
}
let formattedFee = CurrencyFormatter.formatter.string(from: NSNumber(value: price.price * feeInDouble))
return formattedFee
}
}

@ -13,6 +13,7 @@ class ConfigureTransactionViewController: FormViewController {
let configuration: TransactionConfiguration let configuration: TransactionConfiguration
let config: Config let config: Config
let transferType: TransferType let transferType: TransferType
let currencyRate: CurrencyRate?
private let fullFormatter = EtherNumberFormatter.full private let fullFormatter = EtherNumberFormatter.full
struct Values { struct Values {
@ -60,11 +61,13 @@ class ConfigureTransactionViewController: FormViewController {
init( init(
configuration: TransactionConfiguration, configuration: TransactionConfiguration,
transferType: TransferType, transferType: TransferType,
config: Config config: Config,
currencyRate: CurrencyRate?
) { ) {
self.configuration = configuration self.configuration = configuration
self.transferType = transferType self.transferType = transferType
self.config = config self.config = config
self.currencyRate = currencyRate
super.init(nibName: nil, bundle: nil) super.init(nibName: nil, bundle: nil)
@ -140,7 +143,14 @@ class ConfigureTransactionViewController: FormViewController {
} }
func recalculateTotalFee() { func recalculateTotalFee() {
totalFeeRow?.value = "\(fullFormatter.string(from: totalFee)) \(config.server.symbol)"
let fee = fullFormatter.string(from: totalFee)
var feeAndSymbol = "\(fee) \(config.server.symbol)"
if let feeInCurrency = currencyRate?.estimate(fee: fee, with: config.server.symbol) {
feeAndSymbol += " (\(feeInCurrency))"
}
totalFeeRow?.value = feeAndSymbol
totalFeeRow?.updateCell() totalFeeRow?.updateCell()
} }

@ -149,7 +149,8 @@ class ConfirmPaymentViewController: UIViewController {
let controller = ConfigureTransactionViewController( let controller = ConfigureTransactionViewController(
configuration: configurator.configuration, configuration: configurator.configuration,
transferType: configurator.transaction.transferType, transferType: configurator.transaction.transferType,
config: session.config config: session.config,
currencyRate: session.balanceCoordinator.currencyRate
) )
controller.delegate = self controller.delegate = self
self.navigationController?.pushViewController(controller, animated: true) self.navigationController?.pushViewController(controller, animated: true)

@ -71,13 +71,8 @@ struct ConfirmPaymentDetailsViewModel {
fee.description, fee.description,
config.server.symbol config.server.symbol
) )
if let feeInDouble = Double(fee), let price = currencyRate?.rates if let feeInCurrency = currencyRate?.estimate(fee: fee, with: config.server.symbol) {
.filter({ $0.code == config.server.symbol }).first { feeAndSymbol += " (\(feeInCurrency))"
feeAndSymbol += String(
format: " (~ %f %@)",
price.price * feeInDouble,
config.currency.rawValue
)
} }
let warningFee = BigInt(EthereumUnit.ether.rawValue) / BigInt(20) let warningFee = BigInt(EthereumUnit.ether.rawValue) / BigInt(20)
guard totalFee <= warningFee else { guard totalFee <= warningFee else {

@ -15,8 +15,8 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>BNDL</string> <string>BNDL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.1.121</string> <string>1.1.122</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>133</string> <string>134</string>
</dict> </dict>
</plist> </plist>

@ -15,8 +15,8 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>BNDL</string> <string>BNDL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.1.121</string> <string>1.1.122</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>133</string> <string>134</string>
</dict> </dict>
</plist> </plist>

Loading…
Cancel
Save