Skip to content

Commit

Permalink
Correct empty api data and instaswap ribbon click
Browse files Browse the repository at this point in the history
  • Loading branch information
MIPPL committed Aug 26, 2020
1 parent 8dc12ca commit 08e2962
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class SwapViewController : UIViewController, Subscriber, ModalPresentable, Track
init( wm : BTCWalletManager, currency: CurrencyDef, select: String?) {
self.currency = currency
self.walletManager = wm
self.select = select
amountView = SwapAmountViewController(currency: currency, isPinPadExpandedAtLaunch: false, selected: select ?? "BTC")
self.select = (select==nil || select=="") ? "BTC": select!
amountView = SwapAmountViewController(currency: currency, isPinPadExpandedAtLaunch: false, selected: self.select!)
refundWalletCell = AddressCell(currency: currency, noScan: true)
refundWalletCellConstrainVisible = []
refundWalletCellConstrainHidden = []
Expand Down
8 changes: 4 additions & 4 deletions breadwallet/src/ViewModels/BtcTransaction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ struct WgrTransactionInfo {
var eventDetailString : String {
var ret = String.init(format: "%@ %@ - %@ %@", self.betEvent!.txHomeTeam, self.betEvent!.txHomeScore, self.betEvent!.txAwayScore, self.betEvent!.txAwayTeam)
if explorerInfo != nil {
ret += String.init(format: "\nPrice: %.2f", (explorerInfo?.price!)!)
ret += String.init(format: "\nPrice: %.2f", (explorerInfo?.price ?? 0)!)
if explorerInfo?.total != nil && Double((explorerInfo?.total)!)! > 0.0 {
ret += String.init(format: " Total: %@", (explorerInfo?.total!)!)
ret += String.init(format: " Total: %@", (explorerInfo?.total ?? 0)!)
}
if explorerInfo?.spread != nil && Double((explorerInfo?.spread)!)! > 0.0 {
ret += String.init(format: " Spread: %@", (explorerInfo?.spread!)!)
if explorerInfo?.spread != nil && Double((explorerInfo?.spread)!)! != 0.0 {
ret += String.init(format: " Spread: %@", (explorerInfo?.spread ?? 0)!)
}
}
return ret
Expand Down

0 comments on commit 08e2962

Please sign in to comment.