Skip to content

Commit

Permalink
Fixed a bug where the selected coin would appear in the currencies li…
Browse files Browse the repository at this point in the history
…st (e.g. BTC/BTC).
  • Loading branch information
hwki committed Feb 27, 2022
1 parent 99e5efb commit b375b94
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bitcoin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ android {
applicationId "com.brentpanther.bitcoinwidget"
minSdk 23
targetSdk 31
versionCode 296
versionCode 297
versionName "8.2.2"

javaCompileOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ open class ExchangeData(val coinEntry: CoinEntry, json: InputStream) {
if (i2 >= 0) return@Comparator 1
o1.compareTo(o2)
})
currencyNames.remove(coinEntry.symbol)
return currencyNames.toTypedArray()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class ExchangeTest {
var currencyName = data.getExchangeCurrencyName(exchange, currency)
if (coinName == null) coinName = coin.getSymbol()
if (currencyName == null) currencyName = currency
if (coinName == currencyName) continue
valueOf(exchange).getValue(coinName, currencyName)!!.toDouble()
} catch (e: Exception) {
System.err.println("Failure: $coin $exchange $currency: ${e.message}")
Expand Down

0 comments on commit b375b94

Please sign in to comment.