Updated on 2026-08-14

This commit is contained in:
Tangem 2022-09-19 22:42:39 +03:00
commit eef06dbc82
6 changed files with 51 additions and 1 deletions

View file

@ -430,6 +430,17 @@
"networkId" : "polkadot/test"
}
]
},
{
"id": "optimistic-ethereum",
"name": "Optimistic Ethereum",
"symbol": "ETH",
"active": true,
"networks": [
{
"networkId": "optimistic-ethereum/test"
}
]
}
],

View file

@ -29,6 +29,7 @@ fun Blockchain.getRoundIconRes(): Int {
Blockchain.Tron, Blockchain.TronTestnet -> R.drawable.ic_tron_round
Blockchain.Gnosis -> R.drawable.ic_gnosis_round
Blockchain.Polkadot, Blockchain.PolkadotTestnet -> R.drawable.ic_polkadot_round
Blockchain.Optimism, Blockchain.OptimismTestnet -> R.drawable.ic_optimism
else -> R.drawable.ic_tangem_logo
}
}
@ -57,6 +58,7 @@ fun Blockchain.getGreyedOutIconRes(): Int {
Blockchain.Tron, Blockchain.TronTestnet -> R.drawable.ic_tron_no_color
Blockchain.Gnosis -> R.drawable.ic_gnosis_no_color
Blockchain.Polkadot, Blockchain.PolkadotTestnet -> R.drawable.ic_polkadot_no_color
Blockchain.Optimism, Blockchain.OptimismTestnet -> R.drawable.ic_optimism_no_color
else -> R.drawable.ic_tangem_logo
}
}

View file

@ -0,0 +1,16 @@
<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="M0,0h22v22h-22z" />
<path
android:fillColor="#FF0420"
android:pathData="M11,22C17.075,22 22,17.075 22,11C22,4.925 17.075,0 11,0C4.925,0 0,4.925 0,11C0,17.075 4.925,22 11,22Z" />
<path
android:fillColor="#ffffff"
android:fillType="evenOdd"
android:pathData="M4.244,14.356C4.814,14.777 5.546,14.987 6.439,14.987C7.52,14.987 8.383,14.735 9.029,14.233C9.674,13.722 10.128,12.953 10.391,11.925C10.548,11.294 10.684,10.645 10.796,9.977C10.834,9.737 10.852,9.538 10.852,9.38C10.852,8.855 10.721,8.404 10.458,8.029C10.196,7.646 9.835,7.361 9.378,7.174C8.92,6.978 8.402,6.881 7.824,6.881C5.7,6.881 4.383,7.913 3.872,9.977C3.692,10.735 3.553,11.384 3.456,11.925C3.418,12.165 3.399,12.367 3.399,12.533C3.399,13.321 3.681,13.929 4.244,14.356ZM7.666,12.994C7.374,13.242 7.017,13.366 6.597,13.366C5.876,13.366 5.516,13.02 5.516,12.33C5.516,12.165 5.531,12.007 5.561,11.857C5.696,11.129 5.831,10.514 5.966,10.011C6.094,9.5 6.304,9.121 6.597,8.874C6.897,8.626 7.257,8.502 7.678,8.502C8.391,8.502 8.747,8.844 8.747,9.526C8.747,9.692 8.732,9.853 8.702,10.011C8.612,10.536 8.481,11.151 8.308,11.857C8.18,12.367 7.967,12.746 7.666,12.994ZM11.178,14.795C11.223,14.848 11.287,14.874 11.369,14.874H12.9C12.975,14.874 13.047,14.848 13.114,14.795C13.182,14.743 13.223,14.675 13.238,14.593L13.756,12.127H15.276C16.259,12.127 17.032,11.921 17.595,11.508C18.166,11.095 18.545,10.457 18.732,9.594C18.777,9.391 18.8,9.196 18.8,9.009C18.8,8.356 18.545,7.857 18.034,7.511C17.531,7.166 16.863,6.993 16.03,6.993H13.035C12.96,6.993 12.889,7.02 12.822,7.072C12.754,7.125 12.713,7.192 12.698,7.275L11.144,14.593C11.129,14.668 11.14,14.735 11.178,14.795ZM16.177,10.315C15.944,10.487 15.67,10.573 15.355,10.573H14.06L14.488,8.558H15.839C16.147,8.558 16.364,8.618 16.492,8.738C16.619,8.851 16.683,9.016 16.683,9.234C16.683,9.331 16.672,9.444 16.649,9.572C16.574,9.894 16.417,10.142 16.177,10.315Z" />
</group>
</vector>

View file

@ -0,0 +1,16 @@
<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="M0,0h22v22h-22z" />
<path
android:fillColor="#F1F1F1"
android:pathData="M11,22C17.075,22 22,17.075 22,11C22,4.925 17.075,0 11,0C4.925,0 0,4.925 0,11C0,17.075 4.925,22 11,22Z" />
<path
android:fillColor="#A1A1A4"
android:fillType="evenOdd"
android:pathData="M4.244,14.356C4.814,14.777 5.546,14.987 6.439,14.987C7.52,14.987 8.383,14.735 9.029,14.233C9.674,13.722 10.128,12.953 10.391,11.925C10.548,11.294 10.684,10.645 10.796,9.977C10.834,9.737 10.852,9.538 10.852,9.38C10.852,8.855 10.721,8.404 10.458,8.029C10.196,7.646 9.835,7.361 9.378,7.174C8.92,6.978 8.402,6.881 7.824,6.881C5.7,6.881 4.383,7.913 3.872,9.977C3.692,10.735 3.553,11.384 3.456,11.925C3.418,12.165 3.399,12.367 3.399,12.533C3.399,13.321 3.681,13.929 4.244,14.356ZM7.666,12.994C7.374,13.242 7.017,13.366 6.597,13.366C5.876,13.366 5.516,13.02 5.516,12.33C5.516,12.165 5.531,12.007 5.561,11.857C5.696,11.129 5.831,10.514 5.966,10.011C6.094,9.5 6.304,9.121 6.597,8.874C6.897,8.626 7.257,8.502 7.678,8.502C8.391,8.502 8.747,8.844 8.747,9.526C8.747,9.692 8.732,9.853 8.702,10.011C8.612,10.536 8.481,11.151 8.308,11.857C8.18,12.367 7.967,12.746 7.666,12.994ZM11.178,14.795C11.223,14.848 11.287,14.874 11.369,14.874H12.9C12.975,14.874 13.047,14.848 13.114,14.795C13.182,14.743 13.223,14.675 13.238,14.593L13.756,12.127H15.276C16.259,12.127 17.032,11.921 17.595,11.508C18.166,11.095 18.545,10.457 18.732,9.594C18.777,9.391 18.8,9.196 18.8,9.009C18.8,8.356 18.545,7.857 18.034,7.511C17.531,7.166 16.863,6.993 16.03,6.993H13.035C12.96,6.993 12.889,7.02 12.822,7.072C12.754,7.125 12.713,7.192 12.698,7.275L11.144,14.593C11.129,14.668 11.14,14.735 11.178,14.795ZM16.177,10.315C15.944,10.487 15.67,10.573 15.355,10.573H14.06L14.488,8.558H15.839C16.147,8.558 16.364,8.618 16.492,8.738C16.619,8.851 16.683,9.016 16.683,9.234C16.683,9.331 16.672,9.444 16.649,9.572C16.574,9.894 16.417,10.142 16.177,10.315Z" />
</group>
</vector>

View file

@ -2,7 +2,7 @@ ext.versions = [
kotlin : '1.6.10',
build_gradle : '7.1.3',
tangem_card_sdk : 'develop-159',
tangem_blockchain_sdk: 'develop-113',
tangem_blockchain_sdk: 'develop-114',
// tangem_blockchain_sdk: '0.0.1',
]

View file

@ -40,6 +40,8 @@ fun Blockchain.Companion.fromNetworkId(networkId: String): Blockchain? {
"xdai" -> Blockchain.Gnosis
"polkadot" -> Blockchain.Polkadot
"polkadot/test" -> Blockchain.PolkadotTestnet
"optimistic-ethereum" -> Blockchain.Optimism
"optimistic-ethereum/test" -> Blockchain.OptimismTestnet
"kusama" -> Blockchain.Kusama
else -> null
}
@ -86,6 +88,8 @@ fun Blockchain.toNetworkId(): String {
Blockchain.Polkadot -> "polkadot"
Blockchain.PolkadotTestnet -> "polkadot/test"
Blockchain.Kusama -> "kusama"
Blockchain.Optimism -> "optimistic-ethereum"
Blockchain.OptimismTestnet -> "optimistic-ethereum/test"
}
}
@ -113,6 +117,7 @@ fun Blockchain.toCoinId(): String {
Blockchain.Dogecoin -> "dogecoin"
Blockchain.Gnosis -> "xdai"
Blockchain.Kusama -> "kusama"
Blockchain.Optimism, Blockchain.OptimismTestnet -> "ethereum"
Blockchain.Unknown -> "unknown"
}
}