diff --git a/app/src/main/assets/erc20_tokens.json b/app/src/main/assets/erc20_tokens.json index 9b29c198bb..5f2bfeb629 100644 --- a/app/src/main/assets/erc20_tokens.json +++ b/app/src/main/assets/erc20_tokens.json @@ -629,6 +629,13 @@ "name" : "QASH", "contractAddress" : "0x618e75ac90b12c6049ba3b27f5d5f8651b0037f6" }, + { + "decimalCount" : 8, + "symbol" : "QCX", + "name" : "QuickX Protocol", + "contractAddress" : "0xf9e5af7b42d31d51677c75bbbd37c1986ec79aee", + "customIcon": "qcx" + }, { "decimalCount" : 8, "symbol" : "QRL", diff --git a/app/src/main/java/com/tangem/tap/common/extensions/Picasso.kt b/app/src/main/java/com/tangem/tap/common/extensions/Picasso.kt index 1ec834aa43..97a952841e 100644 --- a/app/src/main/java/com/tangem/tap/common/extensions/Picasso.kt +++ b/app/src/main/java/com/tangem/tap/common/extensions/Picasso.kt @@ -27,23 +27,31 @@ fun Picasso.loadCurrenciesIcon( imageView.colorFilter = null textView.text = null - if (url != null) { - this.load(url) - .placeholder(R.drawable.shape_circle) - ?.into(imageView, - object : Callback { - override fun onError(e: Exception?) { - setOfflineCurrencyImage(imageView, textView, token, blockchain) - } + when { + url != null -> { + this.load(url) + .placeholder(R.drawable.shape_circle) + ?.into(imageView, + object : Callback { + override fun onError(e: Exception?) { + setOfflineCurrencyImage(imageView, textView, token, blockchain) + } - override fun onSuccess() { - } - }) - } else { - setOfflineCurrencyImage(imageView, textView, token, blockchain) + override fun onSuccess() { + } + }) + } + token?.symbol == QCX -> { + this.load(R.drawable.ic_qcx)?.into(imageView) + } + else -> { + setOfflineCurrencyImage(imageView, textView, token, blockchain) + } } } +private const val QCX = "QCX" + private fun setOfflineCurrencyImage( imageView: ImageView, textView: TextView, diff --git a/app/src/main/res/drawable-ldpi/ic_qcx.png b/app/src/main/res/drawable-ldpi/ic_qcx.png new file mode 100644 index 0000000000..68f2ded287 Binary files /dev/null and b/app/src/main/res/drawable-ldpi/ic_qcx.png differ