Skip to content

Commit

Permalink
Fixed a bug preventing data from being loaded for certain exchanges a…
Browse files Browse the repository at this point in the history
…nd coins.
  • Loading branch information
hwki committed Aug 1, 2021
1 parent 365eac1 commit 23d51bc
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 11 deletions.
3 changes: 1 addition & 2 deletions SimpleBitcoinWidget.iml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
<option name="BUILDABLE" value="false" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<component name="NewModuleRootManager">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
Expand Down
4 changes: 2 additions & 2 deletions bitcoin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "com.brentpanther.bitcoinwidget"
minSdkVersion 21
targetSdkVersion 30
versionCode 264
versionName "7.4.5"
versionCode 265
versionName "7.4.6"
}

buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ internal enum class Exchange(val exchangeName: String, shortName: String? = null
ZB("ZB") {

override fun getValue(coin: String, currency: String): String {
val url = "http://api.zb.land/data/v1/ticker?market=${coin.lowercase(Locale.ROOT)}_${
val url = "https://api.zb.land/data/v1/ticker?market=${coin.lowercase(Locale.ROOT)}_${
currency.lowercase(Locale.ROOT)
}"
return getJsonObject(url).getAsJsonObject("ticker").get("last").asString
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ open class ExchangeData(val coin: CoinEntry, json: InputStream) {
}

open fun getExchangeCoinName(exchange: String): String? {
return obj?.getExchangeCoinName(exchange, coin.name)
return obj?.getExchangeCoinName(exchange, coin.coin.name)
}

open fun getExchangeCurrencyName(exchange: String, currency: String): String? {
Expand Down
2 changes: 1 addition & 1 deletion bitcoin/src/main/res/raw/cryptowidgetcoins.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bitcoin/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
</string-array>
<string name="value_unknown" translatable="false">\u0020\u0020\u0020\?\u0020\u0020\u0020</string>
<string name="value_exchange_removed" translatable="false">\u0020!\u0020</string>
<string name="json_last_modified" translatable="false">Tue, 06 Jul 2021 19:00:00 GMT</string>
<string name="json_last_modified" translatable="false">Sun, 01 Aug 2021 15:41:00 GMT</string>
<string name="json_url" translatable="false">https://www.brentpanther.com/cryptowidgetcoins.json</string>

<string name="dialog_update_title">Updating</string>
Expand Down
3 changes: 0 additions & 3 deletions bitcoin/src/main/res/xml/network_security_config.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="false"/>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">zb.live</domain>
</domain-config>
</network-security-config>
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/265.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed a bug preventing data from being loaded for certain exchanges and coins.

0 comments on commit 23d51bc

Please sign in to comment.