Skip to content

Commit

Permalink
Show max gas fee in current currency
Browse files Browse the repository at this point in the history
  • Loading branch information
vikmeup committed Mar 12, 2018
1 parent 9e4404f commit 4b6512c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Trust/Transfer/Types/ConfigureTransaction.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Copyright SIX DAY LLC. All rights reserved.

import Foundation
import BigInt

struct ConfigureTransaction {
static var gasLimitMax: Int = 6370515
static var gasFeeMax: Int64 = 1_000_000_000_000_000_000 / 10
static var gasFeeMax = BigInt("100000000000000000")!
}
7 changes: 4 additions & 3 deletions Trust/Transfer/Types/ConfigureTransactionError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ enum ConfigureTransactionError: LocalizedError {
case .gasFeeTooHigh:
return String(
format: NSLocalizedString(
"configureTransaction.error.gasFeeTooHigh",
value: "Gas Fee too high. Max available: %@",
"configureTransaction.error.gasFeeHigh",
value: "Gas Fee is too high. Max available: %@ %@",
comment: ""
),
String(ConfigureTransaction.gasFeeMax)
EtherNumberFormatter.full.string(from: ConfigureTransaction.gasFeeMax),
Config().server.symbol
)
}
}
Expand Down

0 comments on commit 4b6512c

Please sign in to comment.