Updated on 2026-08-14

This commit is contained in:
Tangem 2024-09-09 20:08:13 +03:00
parent 57be17a027
commit 69c0d69adb
8 changed files with 83 additions and 4 deletions

View file

@ -18,6 +18,9 @@ android {
jniLibs {
useLegacyPackaging = true
}
resources.excludes.add("META-INF/DEPENDENCIES")
resources.excludes.add("META-INF/LICENSE.md")
resources.excludes.add("META-INF/NOTICE.md")
}
}

View file

@ -74,6 +74,7 @@ fun getActiveIconRes(blockchainId: String): Int {
"filecoin" -> R.drawable.img_filecoin_22
"cyber", "cyber/test" -> R.drawable.img_cyber_22
"sei", "sei/test" -> R.drawable.img_sei_22
"internet-computer" -> R.drawable.img_icp_22
else -> R.drawable.ic_alert_24
}
}
@ -149,11 +150,12 @@ fun getActiveIconResByNetworkId(networkId: String): Int {
"filecoin" -> R.drawable.img_filecoin_22
"cyber", "cyber/test" -> R.drawable.img_cyber_22
"sei", "sei/test" -> R.drawable.img_sei_22
"internet-computer" -> R.drawable.img_icp_22
else -> R.drawable.ic_alert_24
}
}
@Suppress("ComplexMethod")
@Suppress("ComplexMethod", "LongMethod")
@DrawableRes
fun getActiveIconResByCoinId(coinId: String): Int {
return when (coinId) {
@ -221,6 +223,7 @@ fun getActiveIconResByCoinId(coinId: String): Int {
"filecoin" -> R.drawable.img_filecoin_22
"cyber", "cyber/test" -> R.drawable.img_cyber_22
"sei", "sei/test" -> R.drawable.img_sei_22
"internet-computer" -> R.drawable.img_icp_22
else -> R.drawable.ic_alert_24
}
}
@ -296,6 +299,7 @@ fun getGreyedOutIconRes(blockchainId: String): Int {
"filecoin" -> R.drawable.ic_filecoin_22
"cyber", "cyber/test" -> R.drawable.ic_cyber_22
"sei", "sei/test" -> R.drawable.ic_sei_22
"internet-computer" -> R.drawable.ic_icp_22
else -> R.drawable.ic_alert_24
}
}
@ -371,6 +375,7 @@ fun getGreyedOutIconResByNetworkId(networkId: String): Int {
"filecoin" -> R.drawable.ic_filecoin_22
"cyber", "cyber/test" -> R.drawable.ic_cyber_22
"sei", "sei/test" -> R.drawable.ic_sei_22
"internet-computer" -> R.drawable.ic_icp_22
else -> R.drawable.ic_alert_24
}
}

View file

@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="22dp"
android:height="22dp"
android:viewportWidth="22"
android:viewportHeight="22">
<group>
<clip-path android:pathData="M11,0L11,0A11,11 0,0 1,22 11L22,11A11,11 0,0 1,11 22L11,22A11,11 0,0 1,0 11L0,11A11,11 0,0 1,11 0z" />
<path
android:fillColor="#000000"
android:pathData="M19,10.778C19,8.695 17.254,7 15.111,7C14.218,7 13.245,7.458 12.214,8.361C11.727,8.788 11.305,9.245 10.987,9.612C9.873,8.371 8.379,7 6.889,7C5.087,7 3.516,8.248 3.107,9.901C3.036,10.188 3,10.482 3,10.778C3,12.861 4.718,14.555 6.861,14.555C7.754,14.555 8.755,14.097 9.785,13.194C10.273,12.767 10.695,12.311 11.012,11.943C12.126,13.184 13.62,14.555 15.111,14.555C16.913,14.555 18.485,13.308 18.893,11.655C18.963,11.373 19,11.079 19,10.778ZM9.957,10.815C9.66,11.167 9.233,11.647 8.741,12.078C7.825,12.881 7.229,13.049 6.889,13.049C5.604,13.049 4.556,12.03 4.556,10.778C4.556,9.525 5.603,8.514 6.889,8.506C6.935,8.506 6.992,8.511 7.06,8.523C7.723,8.777 8.315,9.183 8.672,9.51C8.96,9.773 9.481,10.312 9.957,10.815ZM12.043,10.741C12.339,10.388 12.767,9.908 13.259,9.477C14.175,8.674 14.77,8.506 15.111,8.506C16.396,8.506 17.444,9.525 17.444,10.778C17.444,12.03 16.397,13.042 15.111,13.049C15.064,13.049 15.008,13.045 14.939,13.032L14.941,13.033C14.277,12.779 13.685,12.373 13.327,12.045C13.04,11.782 12.519,11.243 12.043,10.741Z" />
</group>
</vector>

View file

@ -0,0 +1,45 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="22dp"
android:height="22dp"
android:viewportWidth="22"
android:viewportHeight="22">
<group>
<clip-path
android:pathData="M11,0L11,0A11,11 0,0 1,22 11L22,11A11,11 0,0 1,11 22L11,22A11,11 0,0 1,0 11L0,11A11,11 0,0 1,11 0z"/>
<path
android:pathData="M11,0L11,0A11,11 0,0 1,22 11L22,11A11,11 0,0 1,11 22L11,22A11,11 0,0 1,0 11L0,11A11,11 0,0 1,11 0z"
android:fillColor="#1E005D"/>
<path
android:pathData="M16.139,13.278C15.047,13.278 13.893,12.564 13.327,12.046C12.708,11.479 11.007,9.634 11,9.626C9.885,8.381 8.385,7 6.889,7C5.087,7 3.515,8.248 3.106,9.901C3.138,9.792 3.71,8.278 5.861,8.278C6.953,8.278 8.107,8.992 8.673,9.51C9.292,10.077 10.993,11.922 11,11.93C12.115,13.174 13.615,14.556 15.111,14.556C16.913,14.556 18.485,13.308 18.894,11.654C18.862,11.763 18.29,13.278 16.139,13.278V13.278Z"
android:fillColor="#00ACE5"/>
<path
android:pathData="M11,11.93C10.996,11.926 10.506,11.395 9.957,10.815C9.661,11.167 9.233,11.647 8.741,12.078C7.825,12.881 7.229,13.05 6.889,13.05C5.604,13.05 4.556,12.031 4.556,10.778C4.556,9.525 5.603,8.514 6.889,8.506C6.935,8.506 6.992,8.511 7.06,8.523C6.674,8.375 6.263,8.278 5.861,8.278C3.711,8.278 3.138,9.792 3.107,9.901C3.036,10.188 3,10.482 3,10.778C3,12.861 4.718,14.556 6.861,14.556C7.755,14.556 8.755,14.097 9.786,13.194C10.273,12.767 10.696,12.311 11.013,11.943C11.009,11.939 11.004,11.934 11.001,11.93L11,11.93Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="8.905"
android:startY="14.062"
android:endX="3.642"
android:endY="8.612"
android:type="linear">
<item android:offset="0.22" android:color="#FFFF0079"/>
<item android:offset="0.89" android:color="#FF592489"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M11,9.626C11.004,9.63 11.494,10.161 12.043,10.741C12.34,10.389 12.767,9.908 13.259,9.478C14.175,8.675 14.771,8.506 15.111,8.506C16.396,8.506 17.444,9.525 17.444,10.778C17.444,12.024 16.397,13.042 15.111,13.05C15.065,13.05 15.008,13.045 14.94,13.033C15.326,13.181 15.737,13.278 16.139,13.278C18.289,13.278 18.862,11.764 18.893,11.655C18.963,11.373 19,11.08 19,10.778C19,8.695 17.254,7 15.111,7C14.218,7 13.245,7.458 12.214,8.361C11.727,8.788 11.304,9.245 10.987,9.612C10.991,9.617 10.996,9.622 11,9.626L11,9.626Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="13.092"
android:startY="7.498"
android:endX="18.354"
android:endY="12.947"
android:type="linear">
<item android:offset="0.21" android:color="#FFFF4B00"/>
<item android:offset="0.68" android:color="#FFFFAB00"/>
</gradient>
</aapt:attr>
</path>
</group>
</vector>

View file

@ -13,6 +13,5 @@ org.gradle.jvmargs = -Xmx6144m -XX:MaxMetaspaceSize=768m -XX:
org.gradle.parallel = true
org.gradle.daemon = true
android.useAndroidX = true
android.enableJetifier = true
org.gradle.unsafe.configuration-cache = true
android.nonTransitiveRClass = false

View file

@ -89,7 +89,7 @@ markdownComposeView = "0.5.4"
# endregion Other libraries
# region Tangem
tangemBlockchainSdk = "develop-762"
tangemBlockchainSdk = "develop-765"
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
tangemCardSdk = "develop-381"
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^

View file

@ -125,6 +125,7 @@ fun Blockchain.Companion.fromNetworkId(networkId: String): Blockchain? {
"cyber/test" -> Blockchain.CyberTestnet
"sei-network" -> Blockchain.Sei
"sei-network/test" -> Blockchain.SeiTestnet
"internet-computer" -> Blockchain.InternetComputer
else -> null
}
}
@ -251,6 +252,7 @@ fun Blockchain.toNetworkId(): String {
Blockchain.CyberTestnet -> "cyber/test"
Blockchain.Sei -> "sei-network"
Blockchain.SeiTestnet -> "sei-network/test"
Blockchain.InternetComputer -> "internet-computer"
}
}
@ -334,6 +336,7 @@ fun Blockchain.toCoinId(): String {
Blockchain.Blast, Blockchain.BlastTestnet -> "blast-ethereum"
Blockchain.Cyber, Blockchain.CyberTestnet -> "cyber-ethereum"
Blockchain.Sei, Blockchain.SeiTestnet -> "sei-network"
Blockchain.InternetComputer -> "internet-computer"
}
}
@ -364,4 +367,6 @@ private val excludedBlockchains = listOf(
Blockchain.Unknown,
Blockchain.Nexa,
Blockchain.NexaTestnet,
Blockchain.Sei,
Blockchain.InternetComputer,
)

View file

@ -95,8 +95,18 @@ dependencyResolutionManagement {
includeGroupAndSubgroups("com.tangem.vico")
}
}
maven {
// setting any repository from tangem project allows maven search all packages in the project
url = uri("https://maven.pkg.github.com/tangem/ic4j-agent")
credentials {
username = properties.getProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
password = properties.getProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
content {
includeGroupAndSubgroups("com.tangem.ic4j")
}
}
maven("https://jitpack.io")
maven("https://clients-nexus.sprinklr.com/")
}
versionCatalogs {