Updated on 2026-08-14

This commit is contained in:
Tangem 2024-01-18 14:30:01 +01:00
parent a24de5f7f8
commit d227d1fae3
9 changed files with 28 additions and 14 deletions

View file

@ -539,7 +539,7 @@
},
{
"id": "xdce-crowd-sale",
"name": "XinFin",
"name": "XDC",
"symbol": "XDC",
"networks": [
{

View file

@ -129,6 +129,7 @@ internal class ConfigManagerImpl @Inject constructor() : ConfigManager {
tron = GetBlockAccessToken(rest = accessTokens.tron?.rest),
cosmos = GetBlockAccessToken(rest = accessTokens.cosmos?.rest),
near = GetBlockAccessToken(jsonRpc = accessTokens.near?.jsonRPC),
aptos = GetBlockAccessToken(rest = accessTokens.aptos?.rest),
dogecoin = GetBlockAccessToken(
jsonRpc = accessTokens.dogecoin?.jsonRPC,
blockBookRest = accessTokens.dogecoin?.blockBookRest,

View file

@ -62,6 +62,7 @@ data class GetBlockAccessTokens(
@Json(name = "tron") val tron: GetBlockToken?,
@Json(name = "cosmos-hub") val cosmos: GetBlockToken?,
@Json(name = "near") val near: GetBlockToken?,
@Json(name = "aptos") val aptos: GetBlockToken?,
@Json(name = "dogecoin") val dogecoin: GetBlockToken?,
@Json(name = "litecoin") val litecoin: GetBlockToken?,
@Json(name = "dash") val dash: GetBlockToken?,

View file

@ -46,7 +46,7 @@ fun getActiveIconRes(blockchainId: String): Int {
"chia", "chia/test" -> R.drawable.img_chia_22
"NEAR", "NEAR/test" -> R.drawable.img_near_22
"decimal", "decimal/test" -> R.drawable.img_decimal_22
"xinfin", "xinfin/test" -> R.drawable.img_xdc_22
"xdc", "xdc/test" -> R.drawable.img_xdc_22
else -> R.drawable.ic_alert_24
}
}
@ -187,7 +187,7 @@ fun getGreyedOutIconRes(blockchainId: String): Int {
"chia", "chia/test" -> R.drawable.ic_chia_22
"NEAR", "NEAR/test" -> R.drawable.ic_near_22
"decimal", "decimal/test" -> R.drawable.ic_decimal_22
"xdc-network", "xdc-network/test" -> R.drawable.ic_xinfin_22
"xdc", "xdc/test" -> R.drawable.ic_xdc_22
else -> R.drawable.ic_alert_24
}
}
@ -235,7 +235,7 @@ fun getGreyedOutIconResByNetworkId(networkId: String): Int {
"chia", "chia/test" -> R.drawable.ic_chia_22
"near-protocol", "near-protocol/test" -> R.drawable.ic_near_22
"decimal", "decimal/test" -> R.drawable.ic_decimal_22
"xdc-network", "xdc-network/test" -> R.drawable.ic_xinfin_22
"xdc-network", "xdc-network/test" -> R.drawable.ic_xdc_22
else -> R.drawable.ic_alert_24
}
}

View file

@ -1,5 +1,16 @@
<vector android:height="22dp" android:viewportHeight="2500"
android:viewportWidth="2500" android:width="22dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#B7B5B1" android:pathData="M2500,1131C2213,-533 40,-211 1,1131c125,65 204,105 204,105s-66,40 -205,128c250,1632 2386,1395 2500,-2c-136,-83 -210,-127 -210,-127S2354,1205 2500,1131zM1431,1712l-204,-350l-207,350l-157,-11l295,-497L892,775l160,-14l189,318l189,-304l149,4l-248,422l273,508l-175,4L1431,1712z"/>
<path android:fillColor="#244B81" android:pathData="M2399,1066C2010,-413 225,-13 103,1066c248,139 304,172 304,172s-96,61 -305,194c266,1422 2191,1148 2297,-2c-194,-122 -309,-193 -309,-193S2352,1091 2399,1066zM1431,1713l-204,-350l-207,350l-156,-11l295,-497L893,776l160,-14l189,318l189,-304l149,4l-247,422l273,508l-175,4V1713z"/>
<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: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="#244B81"/>
<path
android:pathData="M10.93,12.313L13.132,15.99L13.111,16L15,15.958L12.053,10.622L14.73,6.189L13.122,6.147L11.081,9.34L9.04,6L7.313,6.147L10.185,10.653L7,15.874L8.695,15.99L10.93,12.313Z"
android:fillColor="#ffffff"/>
</group>
</vector>

View file

@ -74,8 +74,8 @@ fun Blockchain.Companion.fromNetworkId(networkId: String): Blockchain? {
"near-protocol/test" -> Blockchain.NearTestnet
"decimal" -> Blockchain.Decimal
"decimal/test" -> Blockchain.DecimalTestnet
"xdc-network" -> Blockchain.XinFin
"xdc-network/test" -> Blockchain.XinFinTestnet
"xdc-network" -> Blockchain.XDC
"xdc-network/test" -> Blockchain.XDCTestnet
"TODO" -> Blockchain.Vechain // TODO [REDACTED_TASK_KEY]
"TODO/test" -> Blockchain.VechainTestnet // TODO [REDACTED_TASK_KEY]
"aptos" -> Blockchain.Aptos
@ -155,8 +155,8 @@ fun Blockchain.toNetworkId(): String {
Blockchain.NearTestnet -> "near-protocol/test"
Blockchain.Decimal -> "decimal"
Blockchain.DecimalTestnet -> "decimal/test"
Blockchain.XinFin -> "xdc-network"
Blockchain.XinFinTestnet -> "xdc-network/test"
Blockchain.XDC -> "xdc-network"
Blockchain.XDCTestnet -> "xdc-network/test"
Blockchain.Vechain -> "TODO" // TODO [REDACTED_TASK_KEY]
Blockchain.VechainTestnet -> "TODO/test" // TODO [REDACTED_TASK_KEY]
Blockchain.Aptos -> "aptos"
@ -208,7 +208,7 @@ fun Blockchain.toCoinId(): String {
Blockchain.Near -> "near"
Blockchain.NearTestnet -> "near/test"
Blockchain.Decimal, Blockchain.DecimalTestnet -> "decimal"
Blockchain.XinFin, Blockchain.XinFinTestnet -> "xdce-crowd-sale"
Blockchain.XDC, Blockchain.XDCTestnet -> "xdce-crowd-sale"
Blockchain.Vechain -> "TODO" // TODO [REDACTED_TASK_KEY]
Blockchain.VechainTestnet -> "TODO/test" // TODO [REDACTED_TASK_KEY]
Blockchain.Aptos -> "aptos"

View file

@ -1302,6 +1302,7 @@ internal class SwapInteractorImpl @Inject constructor(
is Fee.Common -> 0
is Fee.Ethereum -> this.gasLimit.toInt()
is Fee.Vechain -> TODO() // TODO [REDACTED_TASK_KEY]
is Fee.Aptos -> TODO()
}
}

View file

@ -85,7 +85,7 @@ spr-client = "3.6.2"
# endregion Other libraries
# region Tangem
tangemBlockchainSdk = "develop-450"
tangemBlockchainSdk = "develop-453"
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
tangemCardSdk = "develop-318"
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^