Updated on 2026-08-14
This commit is contained in:
commit
456cd01c02
76 changed files with 1748 additions and 248 deletions
|
|
@ -5,39 +5,6 @@ import com.tangem.blockchain.common.Blockchain
|
|||
import com.tangem.common.extensions.remove
|
||||
import com.tangem.wallet.R
|
||||
|
||||
@DrawableRes
|
||||
fun Blockchain.getRoundIconRes(): Int {
|
||||
return when (this) {
|
||||
Blockchain.Arbitrum, Blockchain.ArbitrumTestnet -> R.drawable.ic_arbitrum_round
|
||||
Blockchain.Ducatus -> R.drawable.ic_ducatus
|
||||
Blockchain.Bitcoin, Blockchain.BitcoinTestnet,-> R.drawable.ic_bitcoin_round
|
||||
Blockchain.BitcoinCash -> R.drawable.ic_bitcoin_cash_round
|
||||
Blockchain.Litecoin -> R.drawable.ic_litecoin_round
|
||||
Blockchain.Ethereum, Blockchain.EthereumTestnet, -> R.drawable.ic_eth_round
|
||||
Blockchain.EthereumClassic, Blockchain.EthereumClassicTestnet -> R.drawable.ic_eth_round
|
||||
Blockchain.RSK -> R.drawable.ic_rsk_round
|
||||
Blockchain.Cardano, Blockchain.CardanoShelley -> R.drawable.ic_cardano_round
|
||||
Blockchain.Tezos -> R.drawable.ic_tezos_round
|
||||
Blockchain.XRP -> R.drawable.ic_xrp_round
|
||||
Blockchain.Stellar -> R.drawable.ic_stellar_round
|
||||
Blockchain.Avalanche, Blockchain.AvalancheTestnet -> R.drawable.ic_avalanche_round
|
||||
Blockchain.Polygon, Blockchain.PolygonTestnet -> R.drawable.ic_polygon_round
|
||||
Blockchain.Solana, Blockchain.SolanaTestnet -> R.drawable.ic_solana_round
|
||||
Blockchain.Fantom, Blockchain.FantomTestnet -> R.drawable.ic_fantom_round
|
||||
Blockchain.BSC, Blockchain.BSCTestnet, Blockchain.Binance, Blockchain.BinanceTestnet -> R.drawable.ic_bsc_round
|
||||
Blockchain.Dogecoin -> R.drawable.ic_dogecoin_round
|
||||
Blockchain.Tron, Blockchain.TronTestnet -> R.drawable.ic_tron_round
|
||||
Blockchain.Gnosis -> R.drawable.ic_gnosis_round
|
||||
Blockchain.EthereumPow, Blockchain.EthereumPowTestnet -> R.drawable.ic_ethereumpow_round
|
||||
Blockchain.EthereumFair -> R.drawable.ic_ethereumfair_round
|
||||
Blockchain.Polkadot, Blockchain.PolkadotTestnet -> R.drawable.ic_polkadot_round
|
||||
Blockchain.Kusama -> R.drawable.ic_kusama_round
|
||||
Blockchain.Optimism, Blockchain.OptimismTestnet -> R.drawable.ic_optimism
|
||||
Blockchain.Dash -> R.drawable.ic_dash
|
||||
else -> R.drawable.ic_tangem_logo
|
||||
}
|
||||
}
|
||||
|
||||
@DrawableRes
|
||||
fun Blockchain.getGreyedOutIconRes(): Int {
|
||||
return when (this) {
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ import androidx.compose.ui.unit.sp
|
|||
import coil.compose.SubcomposeAsyncImage
|
||||
import coil.request.ImageRequest
|
||||
import com.tangem.blockchain.common.Blockchain
|
||||
import com.tangem.core.ui.extensions.getActiveIconRes
|
||||
import com.tangem.domain.common.extensions.fromNetworkId
|
||||
import com.tangem.tap.common.extensions.getGreyedOutIconRes
|
||||
import com.tangem.tap.common.extensions.getRoundIconRes
|
||||
import com.tangem.tap.domain.tokens.Currency
|
||||
import com.tangem.tap.features.tokens.redux.TokenWithBlockchain
|
||||
import com.tangem.tap.features.tokens.ui.compose.CurrencyPlaceholderIcon
|
||||
|
|
@ -142,7 +142,7 @@ private fun NetworksRow(
|
|||
} else {
|
||||
val isAdded = addedTokens.map { it.token.contractAddress }.contains(contract.address)
|
||||
val iconResId = if (isAdded) {
|
||||
contract.blockchain.getRoundIconRes()
|
||||
getActiveIconRes(contract.blockchain.id)
|
||||
} else {
|
||||
contract.blockchain.getGreyedOutIconRes()
|
||||
}
|
||||
|
|
@ -173,7 +173,7 @@ private fun BlockchainNetworkItem(
|
|||
addedBlockchains: List<Blockchain>,
|
||||
) {
|
||||
val added = addedBlockchains.contains(blockchain)
|
||||
val icon = if (added) blockchain?.getRoundIconRes() else blockchain?.getGreyedOutIconRes()
|
||||
val icon = if (added) blockchain?.let { getActiveIconRes(it.id) } else blockchain?.getGreyedOutIconRes()
|
||||
if (icon != null) {
|
||||
Box(
|
||||
Modifier
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@ import androidx.compose.ui.unit.sp
|
|||
import coil.compose.SubcomposeAsyncImage
|
||||
import com.tangem.blockchain.common.Blockchain
|
||||
import com.tangem.blockchain.common.Token
|
||||
import com.tangem.core.ui.extensions.getActiveIconRes
|
||||
import com.tangem.tap.common.extensions.fullNameWithoutTestnet
|
||||
import com.tangem.tap.common.extensions.getGreyedOutIconRes
|
||||
import com.tangem.tap.common.extensions.getNetworkName
|
||||
import com.tangem.tap.common.extensions.getRoundIconRes
|
||||
import com.tangem.tap.domain.tokens.Contract
|
||||
import com.tangem.tap.domain.tokens.Currency
|
||||
import com.tangem.tap.features.tokens.redux.ContractAddress
|
||||
|
|
@ -85,7 +85,7 @@ fun NetworkItem(
|
|||
.align(Alignment.CenterVertically),
|
||||
) {
|
||||
SubcomposeAsyncImage(
|
||||
model = if (added) blockchain.getRoundIconRes() else blockchain.getGreyedOutIconRes(),
|
||||
model = if (added) getActiveIconRes(blockchain.id) else blockchain.getGreyedOutIconRes(),
|
||||
contentDescription = blockchain.fullName,
|
||||
loading = { CurrencyPlaceholderIcon(blockchain.id) },
|
||||
error = { CurrencyPlaceholderIcon(blockchain.id) },
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import coil.request.ImageRequest
|
|||
import com.tangem.blockchain.common.Blockchain
|
||||
import com.tangem.blockchain.common.IconsUtil
|
||||
import com.tangem.blockchain.common.Token
|
||||
import com.tangem.core.ui.extensions.getActiveIconRes
|
||||
import com.tangem.domain.common.extensions.toNetworkId
|
||||
import com.tangem.tap.common.extensions.getColor
|
||||
import com.tangem.tap.common.extensions.getRoundIconRes
|
||||
import com.tangem.tap.common.extensions.getTextColor
|
||||
import com.tangem.tap.domain.extensions.getCustomIconUrl
|
||||
import com.tangem.tap.domain.tokens.getIconUrl
|
||||
|
|
@ -85,8 +85,8 @@ class CurrencyIconRequest(
|
|||
crossinline onError: (Blockchain) -> Unit = {},
|
||||
) {
|
||||
currencyImageView.loadIcon(
|
||||
data = if (getLocalImage) blockchain.getRoundIconRes() else getIconUrl(blockchain.toNetworkId()),
|
||||
placeholderRes = blockchain.getRoundIconRes(),
|
||||
data = if (getLocalImage) getActiveIconRes(blockchain.id) else getIconUrl(blockchain.toNetworkId()),
|
||||
placeholderRes = getActiveIconRes(blockchain.id),
|
||||
onStart = { onStart(blockchain) },
|
||||
onSuccess = { onSuccess(blockchain) },
|
||||
onError = { onError(blockchain) },
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="22dp"
|
||||
android:viewportHeight="22" android:viewportWidth="22"
|
||||
android:width="22dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<group>
|
||||
<clip-path android:pathData="M0,0h22v22h-22z"/>
|
||||
<path android:fillColor="#2C374B" android:pathData="M11,22C17.1327,22 22,17.0354 22,11C22,4.8673 17.0354,0 11,0C4.8673,0 0,4.9646 0,11C0,17.0354 4.9646,22 11,22Z"/>
|
||||
<path android:fillColor="#24A2EE" android:pathData="M16.5486,12.9469L13.6283,8.469L12.5575,10.2212L15.3805,14.7964L16.646,14.2124L16.5486,12.9469Z"/>
|
||||
<path android:fillColor="#24A2EE" android:pathData="M15.186,15.3805L12.2656,10.9026L11.0001,12.8495L13.3364,16.5486L14.7966,15.9645L15.186,15.3805Z"/>
|
||||
<path android:fillColor="#98BCDC" android:fillType="evenOdd" android:pathData="M5.6461,7.8851L11.0001,4.7701L16.3541,7.8851V14.1152L11.0001,17.2303L7.0089,14.9913L7,16L10.9028,18.3984C11.0001,18.4958 11.0974,18.4958 11.1948,18.3984L17.3275,14.894C17.4249,14.7966 17.5222,14.6993 17.5222,14.602V7.5931C17.5222,7.4958 17.4249,7.3984 17.3275,7.3011L11.1948,3.7966C11.0974,3.6993 11.0001,3.6993 10.9028,3.7966L4.77,7.2037C4.6727,7.3011 4.5753,7.3984 4.5753,7.4958V14.5046C4.5753,14.602 4.6727,14.6993 4.77,14.7966L6,15.5L6.5,14.5L5.7435,14.1152V7.8851H5.6461Z"/>
|
||||
<path android:fillColor="#ffffff" android:pathData="M13.3364,7.96H11.2921L6.5222,15.7476L8.1771,16.721L13.3364,7.96Z"/>
|
||||
<path android:fillColor="#ffffff" android:pathData="M8.1771,8.6636C8.6638,7.8849 10.0266,7.8849 10.6107,7.9822L6,15.5C5.8053,15.4027 5.3541,15.1857 5.062,14.9911C4.6727,14.7964 4.5753,14.7964 4.5753,14.5043V14.1149C5.6461,12.5574 7.6904,9.4424 8.1771,8.6636Z"/>
|
||||
</group>
|
||||
</vector>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="16dp"
|
||||
android:viewportHeight="16" android:viewportWidth="16"
|
||||
android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#ffffff" android:pathData="M8,8m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"/>
|
||||
<path android:fillColor="#E74142" android:fillType="evenOdd" android:pathData="M16,8C16,12.4183 12.4183,16 8,16C3.5817,16 0,12.4183 0,8C0,3.5817 3.5817,0 8,0C12.4183,0 16,3.5817 16,8ZM5.733,11.1836H4.1804C3.8542,11.1836 3.6931,11.1836 3.5948,11.1207C3.4887,11.0519 3.4238,10.9379 3.416,10.8121C3.4101,10.6962 3.4906,10.5547 3.6518,10.2717L7.4853,3.5146C7.6484,3.2277 7.7309,3.0842 7.8351,3.0312C7.9471,2.9742 8.0808,2.9742 8.1928,3.0312C8.297,3.0842 8.3795,3.2277 8.5426,3.5146L9.3307,4.8903L9.3347,4.8973C9.5109,5.2052 9.6002,5.3613 9.6392,5.5251C9.6825,5.7039 9.6825,5.8926 9.6392,6.0715C9.5999,6.2365 9.5115,6.3938 9.3327,6.7063L7.319,10.2658L7.3138,10.2749C7.1365,10.5853 7.0466,10.7426 6.922,10.8613C6.7864,10.991 6.6233,11.0853 6.4445,11.1384C6.2813,11.1836 6.0986,11.1836 5.733,11.1836ZM9.6538,11.1836H11.8785C12.2067,11.1836 12.3718,11.1836 12.4701,11.1188C12.5762,11.05 12.643,10.934 12.6489,10.8083C12.6546,10.6961 12.5758,10.5601 12.4213,10.2935C12.416,10.2845 12.4107,10.2752 12.4052,10.2658L11.2909,8.3595L11.2782,8.3381C11.1216,8.0733 11.0426,7.9395 10.941,7.8878C10.8291,7.8309 10.6973,7.8309 10.5853,7.8878C10.4831,7.9409 10.4006,8.0805 10.2375,8.3615L9.1271,10.2678L9.1233,10.2744C8.9607,10.555 8.8795,10.6952 8.8854,10.8102C8.8932,10.936 8.9581,11.0519 9.0642,11.1207C9.1605,11.1836 9.3256,11.1836 9.6538,11.1836Z"/>
|
||||
</vector>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="16dp"
|
||||
android:viewportHeight="16" android:viewportWidth="16"
|
||||
android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#F3BA2F" android:pathData="M8,0L8,0A8,8 0,0 1,16 8L16,8A8,8 0,0 1,8 16L8,16A8,8 0,0 1,0 8L0,8A8,8 0,0 1,8 0z"/>
|
||||
<path android:fillColor="#ffffff" android:fillType="evenOdd" android:pathData="M6.0578,7.202L8.0002,5.2604L9.9434,7.2036L11.073,6.0733L8.0002,2.9998L4.9275,6.0725L6.0578,7.202ZM2.999,8.0005L4.129,6.8706L5.259,8.0005L4.129,9.1304L2.999,8.0005ZM8.0002,10.7408L6.0578,8.7985L4.9258,9.9272L4.9274,9.9288L8.0002,13.0007L11.073,9.9272L11.0738,9.9264L9.9434,8.7977L8.0002,10.7408ZM10.74,8.0009L11.87,6.871L12.9999,8.0009L11.87,9.1308L10.74,8.0009ZM8.0004,6.8526L9.1466,7.9995H9.1473L9.1466,8.0003L8.0004,9.1472L6.8542,8.0019L6.8526,7.9995L6.8542,7.9979L7.0549,7.7973L7.1528,7.7001L8.0004,6.8526Z"/>
|
||||
</vector>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="16dp"
|
||||
android:viewportHeight="16" android:viewportWidth="16"
|
||||
android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#0AC18E" android:pathData="M8,16C12.4183,16 16,12.4183 16,8C16,3.5817 12.4183,0 8,0C3.5817,0 0,3.5817 0,8C0,12.4183 3.5817,16 8,16Z"/>
|
||||
<path android:fillColor="#ffffff" android:pathData="M10.6797,5.3445C10.272,4.4259 9.3351,4.2295 8.1882,4.4198L7.8196,3L6.9507,3.223L7.3131,4.6387C7.0845,4.696 6.8498,4.7451 6.6171,4.8106L6.2547,3.403L5.3858,3.626L5.7543,5.0458C5.567,5.099 4,5.498 4,5.498L4.2389,6.4227C4.2389,6.4227 4.8772,6.2447 4.871,6.259C5.2252,6.1669 5.3919,6.3429 5.4702,6.5086L6.4833,10.3998C6.4956,10.5123 6.475,10.7046 6.232,10.77C6.2465,10.7782 5.5999,10.9317 5.5999,10.9317L5.6946,12.0098C5.6946,12.0098 7.2472,11.615 7.451,11.5638L7.8237,13L8.6927,12.777L8.32,11.3306C8.5588,11.2754 8.7915,11.2181 9.018,11.1588L9.3886,12.597L10.2576,12.374L9.8849,10.9399C11.2233,10.6166 12.1684,9.7778 11.9748,8.4951C11.8513,7.7218 11.0009,7.0876 10.2946,7.016C10.7291,6.6334 10.9494,6.0749 10.6797,5.3445ZM10.2617,8.7304C10.4346,10.0008 8.6577,10.1563 8.0708,10.3097L7.5602,8.4092C8.1491,8.2557 9.9693,7.6113 10.2617,8.7304ZM9.191,6.1424C9.3742,7.2717 7.8546,7.4026 7.3646,7.5274L6.8992,5.8028C7.3913,5.6821 8.8183,5.097 9.191,6.1424Z"/>
|
||||
</vector>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="16dp"
|
||||
android:viewportHeight="16" android:viewportWidth="16"
|
||||
android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#F7931A" android:pathData="M15.7605,9.9353C14.6919,14.221 10.3507,16.8292 6.064,15.7605C1.7791,14.692 -0.8295,10.351 0.2396,6.0656C1.3077,1.7794 5.649,-0.8291 9.9344,0.2394C14.2209,1.3079 16.8292,5.6493 15.7605,9.9353Z"/>
|
||||
<path android:fillColor="#ffffff" android:pathData="M11.5275,6.8603C11.6868,5.7958 10.8762,5.2236 9.7678,4.8418L10.1273,3.3998L9.2495,3.1811L8.8995,4.5851C8.6687,4.5276 8.4317,4.4733 8.1961,4.4196L8.5487,3.0064L7.6713,2.7876L7.3116,4.2291C7.1205,4.1856 6.933,4.1426 6.751,4.0973L6.752,4.0928L5.5414,3.7906L5.3078,4.7281C5.3078,4.7281 5.9592,4.8773 5.9454,4.8866C6.301,4.9753 6.3652,5.2106 6.3545,5.3971L5.9449,7.0398C5.9694,7.0461 6.0012,7.0551 6.0362,7.0691C6.0069,7.0618 5.9757,7.0538 5.9434,7.0461L5.3693,9.3473C5.3258,9.4553 5.2156,9.6173 4.9671,9.5558C4.9758,9.5685 4.329,9.3965 4.329,9.3965L3.8932,10.4013L5.0356,10.686C5.2481,10.7393 5.4563,10.795 5.6614,10.8475L5.2981,12.306L6.1749,12.5248L6.5347,11.0818C6.7742,11.1468 7.0068,11.2068 7.2343,11.2633L6.8758,12.6995L7.7536,12.9182L8.1169,11.4625C9.6138,11.7458 10.7394,11.6315 11.2132,10.2778C11.595,9.1878 11.1942,8.559 10.4066,8.149C10.9802,8.0168 11.4122,7.6396 11.5275,6.8603ZM9.5218,9.6725C9.2505,10.7625 7.4151,10.1733 6.82,10.0255L7.3021,8.0933C7.8971,8.2418 9.8053,8.5358 9.5218,9.6725ZM9.7933,6.8446C9.5458,7.8361 8.0181,7.3323 7.5226,7.2088L7.9596,5.4563C8.4552,5.5798 10.0511,5.8103 9.7933,6.8446Z"/>
|
||||
</vector>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="16dp"
|
||||
android:viewportHeight="16" android:viewportWidth="16"
|
||||
android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#000000" android:fillType="evenOdd" android:pathData="M8,0C12.4186,0 16,3.5814 16,8C16,12.4186 12.4186,16 8,16C3.5814,16 0,12.4186 0,8C0,3.5814 3.5814,0 8,0Z"/>
|
||||
<path android:fillColor="#F0B90B" android:pathData="M4.3968,8.0001L4.4025,10.1154L6.2,11.1731V12.4116L3.3506,10.7404V7.3815L4.3968,8.0001ZM4.3968,5.8847V7.1174L3.35,6.4981V5.2655L4.3968,4.6462L5.4487,5.2655L4.3968,5.8847ZM6.9506,5.2655L7.9974,4.6462L9.0493,5.2655L7.9974,5.8847L6.9506,5.2655Z"/>
|
||||
<path android:fillColor="#F0B90B" android:pathData="M5.1532,9.677V8.4385L6.2,9.0577V10.2904L5.1532,9.677ZM6.9506,11.6167L7.9974,12.2359L9.0493,11.6167V12.8494L7.9974,13.4686L6.9506,12.8494V11.6167ZM10.5505,5.2655L11.5973,4.6462L12.6492,5.2655V6.4981L11.5973,7.1174V5.8847L10.5505,5.2655ZM11.5973,10.1154L11.6031,8.0001L12.6499,7.3808V10.7398L9.8006,12.4109V11.1725L11.5973,10.1154Z"/>
|
||||
<path android:fillColor="#F0B90B" android:pathData="M10.8468,9.6769L9.8,10.2903V9.0577L10.8468,8.4385V9.6769Z"/>
|
||||
<path android:fillColor="#F0B90B" android:pathData="M10.8468,6.3232L10.8526,7.5616L9.05,8.6193V10.7398L8.0032,11.3533L6.9564,10.7398V8.6193L5.1538,7.5616V6.3232L6.2051,5.7039L7.9968,6.7667L9.7993,5.7039L10.8513,6.3232H10.8468ZM5.1532,4.2084L7.9974,2.5315L10.8468,4.2084L9.8,4.8276L7.9974,3.7648L6.2,4.8276L5.1532,4.2084Z"/>
|
||||
</vector>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="16dp"
|
||||
android:viewportHeight="16" android:viewportWidth="16"
|
||||
android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#0033AD" android:pathData="M8,8m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"/>
|
||||
<path android:fillColor="#ffffff" android:pathData="M7.8738,3.2662C8.098,3.1493 8.3717,3.4204 8.2526,3.6444C8.1834,3.827 7.9211,3.8755 7.7871,3.7364C7.6452,3.6028 7.6915,3.3388 7.8738,3.2662ZM5.4626,3.5261C5.5988,3.47 5.7712,3.5948 5.7573,3.7432C5.7718,3.9043 5.5747,4.0229 5.4359,3.9464C5.252,3.8751 5.273,3.5766 5.4626,3.5261ZM10.4011,3.9509C10.1883,3.9252 10.1546,3.5906 10.3595,3.5232C10.5184,3.4457 10.6642,3.591 10.6875,3.7417C10.6541,3.8703 10.5465,3.9881 10.4011,3.9509ZM6.0113,4.5523C6.2389,4.4083 6.5638,4.6228 6.5288,4.8872C6.517,5.1543 6.1623,5.309 5.9622,5.1284C5.7687,4.9867 5.798,4.6614 6.0113,4.5523ZM9.4869,4.7051C9.5884,4.4434 10,4.4354 10.1156,4.6903C10.2299,4.8886 10.0894,5.1342 9.8857,5.2016C9.616,5.2519 9.3599,4.9604 9.4869,4.7051ZM7.5835,5.1867C7.5813,4.9617 7.7862,4.7941 8.0001,4.7787C8.1419,4.8072 8.2965,4.8676 8.3573,5.0107C8.4707,5.2082 8.37,5.48 8.1651,5.5706C8.0714,5.6231 7.9607,5.6034 7.8586,5.5973C7.7027,5.5208 7.5713,5.3706 7.5835,5.1867ZM3.9976,5.5146C4.2056,5.3867 4.4862,5.62 4.4075,5.846C4.3641,6.0414 4.1014,6.1209 3.9512,5.9962C3.7909,5.8793 3.8163,5.5982 3.9976,5.5146ZM11.6978,5.5142C11.8742,5.3772 12.1654,5.5343 12.1444,5.7571C12.1562,5.9603 11.9045,6.1135 11.7293,6.0089C11.5364,5.9222 11.5167,5.6253 11.6978,5.5142ZM8.5919,5.9187C8.8831,5.814 9.2289,5.9392 9.3949,6.1988C9.6138,6.5162 9.4974,6.9995 9.1576,7.1816C8.8056,7.397 8.2916,7.2144 8.1615,6.8213C8.014,6.4694 8.229,6.029 8.5919,5.9187ZM6.8834,5.9533C7.2062,5.8009 7.6405,5.9287 7.7964,6.2589C7.9798,6.5802 7.838,7.0276 7.51,7.1935C7.1816,7.38 6.7183,7.2386 6.5594,6.8936C6.3812,6.56 6.5395,6.1069 6.8834,5.9533ZM5.1728,6.5381C5.1973,6.3302 5.3934,6.1949 5.5913,6.1809C5.8046,6.2066 5.9749,6.3722 5.9981,6.588C5.9841,6.8016 5.819,7.0104 5.5926,7.0091C5.3436,7.0306 5.1252,6.7828 5.1728,6.5381ZM10.2255,6.2261C10.4812,6.0773 10.8363,6.2939 10.8249,6.5877C10.8425,6.8989 10.4495,7.1183 10.1949,6.9357C9.9304,6.7837 9.951,6.3555 10.2255,6.2261ZM6.1882,7.3231C6.4872,7.2408 6.8292,7.3818 6.9759,7.6566C7.1365,7.9333 7.0708,8.3177 6.8213,8.5206C6.5013,8.8183 5.911,8.6988 5.7407,8.2926C5.545,7.9201 5.7827,7.4211 6.1882,7.3231ZM9.4286,7.3215C9.7194,7.2384 10.0609,7.3504 10.2172,7.6153C10.4238,7.9182 10.3252,8.37 10.0176,8.5653C9.6953,8.792 9.1961,8.673 9.0188,8.3184C8.8038,7.9517 9.0202,7.4334 9.4286,7.3215ZM4.2647,7.6671C4.523,7.5694 4.8094,7.8545 4.7047,8.1106C4.6408,8.3439 4.312,8.4302 4.1421,8.2581C3.9433,8.0966 4.0169,7.7372 4.2647,7.6671ZM11.2667,8.0388C11.2593,7.8247 11.4159,7.6352 11.6354,7.6234C11.8123,7.6514 11.9843,7.7941 11.9703,7.9867C11.9865,8.2411 11.68,8.414 11.4633,8.2944C11.3617,8.2428 11.3096,8.1386 11.2667,8.0388ZM2.9945,7.7928C3.1499,7.7249 3.3422,7.8596 3.3067,8.0322C3.2983,8.2276 3.0098,8.3028 2.9038,8.1395C2.8102,8.0261 2.8662,7.8512 2.9945,7.7928ZM12.7939,7.7889C12.9033,7.7109 13.0789,7.767 13.1223,7.8948C13.1958,8.0344 13.061,8.2257 12.9038,8.2021C12.6832,8.2222 12.6118,7.886 12.7939,7.7889ZM7.0323,8.727C7.4413,8.6206 7.8809,8.9616 7.8835,9.3827C7.9102,9.8083 7.4772,10.1856 7.0585,10.0873C6.735,10.0352 6.4811,9.7235 6.4915,9.3965C6.4907,9.0838 6.7267,8.7931 7.0323,8.727ZM8.6519,8.7261C9.067,8.6101 9.5197,8.9572 9.5131,9.388C9.5351,9.8057 9.1156,10.1703 8.7057,10.0875C8.32,10.0376 8.0354,9.6138 8.1431,9.2395C8.1974,8.9901 8.4058,8.7872 8.6519,8.7261ZM5.5292,8.9853C5.8165,8.9363 6.0857,9.2567 5.9692,9.5295C5.8843,9.8201 5.4613,9.8989 5.2743,9.6615C5.055,9.4335 5.2187,9.0168 5.5292,8.9853ZM10.2789,8.9981C10.535,8.8908 10.8494,9.1124 10.8297,9.3904C10.84,9.6964 10.4519,9.9074 10.2014,9.7288C9.9177,9.5684 9.9694,9.0965 10.2789,8.9981ZM11.6065,10.3297C11.5062,10.1427 11.6884,9.895 11.8959,9.9296C11.9993,9.9278 12.0715,10.0092 12.1377,10.0775C12.1512,10.1883 12.174,10.3205 12.0821,10.4059C11.9572,10.5639 11.6743,10.5188 11.6065,10.3297ZM3.9968,9.9816C4.1907,9.8525 4.4699,10.0451 4.4263,10.2719C4.4031,10.4725 4.1504,10.5871 3.984,10.4733C3.8054,10.37 3.812,10.0758 3.9968,9.9816ZM7.8292,10.4015C8.0832,10.2894 8.4067,10.5105 8.3826,10.7902C8.4015,11.0993 8.0013,11.3134 7.753,11.1278C7.4772,10.9684 7.5232,10.4995 7.8292,10.4015ZM6.0542,10.8156C6.2705,10.7018 6.5607,10.8983 6.541,11.1404C6.5476,11.3392 6.3536,11.5086 6.1575,11.4792C5.995,11.4757 5.8891,11.3301 5.837,11.1916C5.8396,11.0406 5.9018,10.8725 6.0542,10.8156ZM9.6497,10.8191C9.8722,10.6816 10.1883,10.8791 10.1673,11.1379C10.173,11.4085 9.8157,11.5818 9.6086,11.4041C9.4081,11.2648 9.4326,10.9299 9.6497,10.8191ZM10.275,12.3649C10.1761,12.2152 10.2925,12.0348 10.4532,12.0007C10.5824,12.0269 10.719,12.1241 10.6918,12.2739C10.673,12.4765 10.3766,12.5387 10.275,12.3649ZM5.3116,12.2349C5.351,12.1162 5.4464,11.9983 5.5861,12.0292C5.7897,12.0436 5.8501,12.3505 5.6719,12.4451C5.5117,12.5531 5.3258,12.4051 5.3116,12.2349ZM7.7062,12.371C7.7451,12.1955 7.9723,12.1101 8.1221,12.2033C8.2211,12.2458 8.25,12.3565 8.2754,12.4507C8.2618,12.4997 8.2496,12.5487 8.2377,12.5978C8.1764,12.6704 8.0976,12.7431 7.9956,12.7405C7.806,12.7627 7.6349,12.5483 7.7062,12.371Z"/>
|
||||
</vector>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="16dp"
|
||||
android:viewportHeight="16" android:viewportWidth="16"
|
||||
android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#C2A633" android:pathData="M8,8m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"/>
|
||||
<path android:fillColor="#ffffff" android:fillType="evenOdd" android:pathData="M5.3545,12.185H8.1164H8.1165C8.1165,12.185 11.9999,12.5157 11.9999,8.0674C11.9999,3.7917 8.4536,3.8068 7.7682,3.8098C7.7521,3.8098 7.7376,3.8099 7.7248,3.8099H5.3544V7.5406H4.3809V8.4545H5.3545V12.185ZM6.9101,5.3579H7.9998C8.4074,5.3579 10.4578,5.5245 10.4611,8.0975C10.4643,10.6399 8.397,10.6373 8.0645,10.6368C8.0604,10.6368 8.0567,10.6368 8.0532,10.6368H6.9101V8.4544H8.6245V7.5405H6.9101V5.3579Z"/>
|
||||
</vector>
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="22dp"
|
||||
android:viewportHeight="22" android:viewportWidth="22"
|
||||
android:width="22dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#F1F1F1" android:pathData="M11,22C17.0751,22 22,17.0751 22,11C22,4.9249 17.0751,0 11,0C4.9249,0 0,4.9249 0,11C0,17.0751 4.9249,22 11,22Z"/>
|
||||
<group>
|
||||
<clip-path android:pathData="M11.0001,3.8501L11.0001,3.8501A4.4,4.4 0,0 1,15.4001 8.2501L15.4001,13.7501A4.4,4.4 0,0 1,11.0001 18.1501L11.0001,18.1501A4.4,4.4 0,0 1,6.6001 13.7501L6.6001,8.2501A4.4,4.4 0,0 1,11.0001 3.8501z"/>
|
||||
<path android:fillColor="#343434" android:pathData="M10.999,3.8501L10.903,4.1759V13.6292L10.999,13.7249L15.3977,11.1311L10.999,3.8501Z"/>
|
||||
<path android:fillColor="#8C8C8C" android:pathData="M10.9988,3.8501L6.6001,11.1311L10.9988,13.725V9.1366V3.8501Z"/>
|
||||
<path android:fillColor="#3C3C3B" android:pathData="M10.9987,14.5559L10.9446,14.6217V17.9892L10.9987,18.147L15.4001,11.9634L10.9987,14.5559Z"/>
|
||||
<path android:fillColor="#8C8C8C" android:pathData="M10.9988,18.147V14.5559L6.6001,11.9634L10.9988,18.147Z"/>
|
||||
<path android:fillColor="#141414" android:pathData="M10.9987,13.725L15.3973,11.1312L10.9987,9.1367V13.725Z"/>
|
||||
<path android:fillColor="#393939" android:pathData="M6.6001,11.1312L10.9987,13.7251V9.1367L6.6001,11.1312Z"/>
|
||||
</group>
|
||||
</vector>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="22dp"
|
||||
android:viewportHeight="22" android:viewportWidth="22"
|
||||
android:width="22dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillAlpha="0.12" android:fillColor="#3AB83A" android:pathData="M11,22C17.0751,22 22,17.0751 22,11C22,4.9249 17.0751,0 11,0C4.9249,0 0,4.9249 0,11C0,17.0751 4.9249,22 11,22Z"/>
|
||||
<path android:fillColor="#3AB83A" android:pathData="M7,11.6243C8.4096,12.4331 9.8804,13.2797 11.0164,13.9348L15,11.6243C13.5576,13.9395 12.3558,15.8669 11.0164,18C9.6747,15.8716 8.1929,13.523 7,11.6243ZM7.1532,10.9857L11.0208,8.7559L14.838,10.9694L11.023,13.2017L7.1532,10.9857ZM11.0164,8.0415L7,10.326L10.9989,4L15,10.3402L11.0164,8.0415Z"/>
|
||||
<path android:fillColor="#0B8311" android:pathData="M11.0164,13.9348L15,11.6243C13.5576,13.9395 11.0164,18 11.0164,18V13.9348ZM11.0208,8.7559L14.838,10.9694L11.023,13.2017L11.0208,8.7559ZM11.0164,8.0417L10.9989,4L15,10.3402L11.0164,8.0417Z"/>
|
||||
<path android:fillColor="#0B8311" android:pathData="M7.1532,10.9859L11.021,11.3288L14.8382,10.9717L11.023,13.2041L7.1532,10.9859Z"/>
|
||||
<path android:fillColor="#146714" android:pathData="M11.0208,11.3288L14.838,10.9717L11.0229,13.2041L11.0208,11.3288Z"/>
|
||||
</vector>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="22dp"
|
||||
android:viewportHeight="22" android:viewportWidth="22"
|
||||
android:width="22dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#13B5EC" android:pathData="M11,22C17.0751,22 22,17.0751 22,11C22,4.9249 17.0751,0 11,0C4.9249,0 0,4.9249 0,11C0,17.0751 4.9249,22 11,22Z"/>
|
||||
<path android:fillColor="#F8F9F9" android:fillType="evenOdd" android:pathData="M11.825,8.8687L14.3,7.425V10.3125L11.825,8.8687ZM14.3,15.0562L11,16.9813L7.7,15.0562V11.6875L11,13.6125L14.3,11.6875V15.0562ZM7.7,7.425L10.175,8.8687L7.7,10.3125V7.425ZM11.4125,9.5562L13.8875,11L11.4125,12.4438V9.5562ZM10.5875,12.4438L8.1125,11L10.5875,9.5562V12.4438ZM13.8875,6.7375L11,8.3875L8.1125,6.7375L11,5.0188L13.8875,6.7375ZM6.875,6.4625V15.4688L11,17.8062L15.125,15.4688V6.4625L11,4.125L6.875,6.4625Z"/>
|
||||
</vector>
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<vector android:height="22dp" android:viewportHeight="22"
|
||||
android:viewportWidth="22" android:width="22dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#3A775B" 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="#ffffff" android:pathData="M7.703,12.11C8.163,12.11 8.612,11.957 8.974,11.677L6.058,8.761C5.356,9.669 5.524,10.978 6.432,11.68C6.799,11.957 7.243,12.11 7.703,12.11Z"/>
|
||||
<path android:fillColor="#ffffff" android:pathData="M16.376,10.028C16.376,9.568 16.223,9.12 15.942,8.757L13.026,11.673C13.935,12.376 15.24,12.208 15.942,11.299C16.223,10.936 16.376,10.488 16.376,10.028Z"/>
|
||||
<path android:fillColor="#ffffff" android:pathData="M17.845,6.854L16.555,8.144C17.594,9.389 17.43,11.243 16.185,12.282C15.094,13.194 13.508,13.194 12.417,12.282L11,13.699L9.587,12.286C8.342,13.325 6.488,13.161 5.449,11.916C4.536,10.824 4.536,9.239 5.449,8.148L4.787,7.486L4.159,6.854C3.4,8.103 3,9.538 3,11C3,15.419 6.581,19 11,19C15.419,19 19,15.419 19,11C19.004,9.538 18.6,8.103 17.845,6.854Z"/>
|
||||
<path android:fillColor="#ffffff" android:pathData="M16.787,5.478C13.74,2.282 8.679,2.163 5.482,5.209C5.389,5.299 5.299,5.389 5.213,5.478C5.015,5.688 4.828,5.905 4.652,6.133L11,12.484L17.348,6.133C17.176,5.905 16.985,5.688 16.787,5.478ZM11,4.047C12.869,4.047 14.611,4.768 15.92,6.084L11,11.004L6.08,6.084C7.389,4.768 9.131,4.047 11,4.047Z"/>
|
||||
</vector>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="16dp"
|
||||
android:viewportHeight="16" android:viewportWidth="16"
|
||||
android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#000000" android:pathData="M8,8m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"/>
|
||||
<path android:fillColor="#ffffff" android:pathData="M12.4155,5.3206C12.265,5.2041 12.0856,5.0449 11.7587,5.0051C11.452,4.9653 11.1395,5.1671 10.9282,5.3007C10.717,5.4343 10.3177,5.8266 10.1528,5.946C9.9879,6.0654 9.5654,6.1762 8.8854,6.577C8.2054,6.9778 5.5376,8.6606 5.5376,8.6606L6.2321,8.6691L3.136,10.2354H3.4456L3,10.5679C3,10.5679 3.3935,10.6703 3.7234,10.4656V10.5594C3.7234,10.5594 7.4097,9.1325 8.1215,9.502L7.6875,9.6271C7.7251,9.6271 8.4254,9.6725 8.4254,9.6725C8.4423,9.815 8.4911,9.952 8.5681,10.0738C8.6451,10.1957 8.7485,10.2994 8.8709,10.3775C9.2934,10.6504 9.3021,10.801 9.3021,10.801C9.3021,10.801 9.0822,10.8891 9.0822,11C9.0822,11 9.4063,10.9034 9.7072,10.9119C9.8982,10.919 10.0876,10.9486 10.2714,11C10.2714,11 10.2483,10.8806 9.956,10.801C9.6638,10.7214 9.3744,10.4088 9.2326,10.2382C9.1458,10.1296 9.0892,10.0008 9.0684,9.8642C9.0476,9.7276 9.0633,9.5881 9.114,9.4593C9.2153,9.2007 9.5683,9.0585 10.2975,8.689C11.1568,8.2513 11.3536,7.9272 11.4751,7.6742C11.5966,7.4212 11.776,6.9181 11.8773,6.6822C12.0046,6.378 12.1609,6.216 12.2911,6.1194C12.4213,6.0227 13,5.8095 13,5.8095C13,5.8095 12.5573,5.4315 12.4155,5.3206Z"/>
|
||||
</vector>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="16dp"
|
||||
android:viewportHeight="16" android:viewportWidth="16"
|
||||
android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<group>
|
||||
<clip-path android:pathData="M0,0h16v16h-16z"/>
|
||||
<path android:fillColor="#ffffff" android:pathData="M8,16C12.4183,16 16,12.4183 16,8C16,3.5817 12.4183,0 8,0C3.5817,0 0,3.5817 0,8C0,12.4183 3.5817,16 8,16Z"/>
|
||||
<path android:fillColor="#345D9D" android:pathData="M8,0C6.4177,0 4.871,0.4692 3.5554,1.3482C2.2399,2.2273 1.2145,3.4767 0.609,4.9385C0.0035,6.4003 -0.155,8.0089 0.1537,9.5607C0.4624,11.1126 1.2243,12.538 2.3431,13.6569C3.462,14.7757 4.8874,15.5376 6.4393,15.8463C7.9911,16.155 9.5997,15.9965 11.0615,15.391C12.5233,14.7855 13.7727,13.7602 14.6518,12.4446C15.5308,11.129 16,9.5822 16,8C16.0031,6.9525 15.7998,5.9146 15.4017,4.9457C15.0037,3.9767 14.4187,3.0956 13.6801,2.3528C12.9416,1.6099 12.0639,1.0198 11.0973,0.6161C10.1307,0.2124 9.094,0.003 8.0465,0H8ZM8.1356,8.2712L7.3027,11.0799H11.7579C11.7874,11.0789 11.8168,11.0837 11.8445,11.094C11.8721,11.1044 11.8975,11.12 11.9191,11.1402C11.9407,11.1603 11.9581,11.1846 11.9703,11.2114C11.9825,11.2383 11.9893,11.2673 11.9903,11.2969V11.3705L11.6029,12.707C11.5858,12.7702 11.5478,12.8257 11.495,12.8645C11.4422,12.9032 11.3778,12.9228 11.3124,12.9201H4.4939L5.6368,9.0266L4.3584,9.414L4.6489,8.523L5.9274,8.1356L7.5351,2.6731C7.5528,2.6103 7.591,2.5552 7.6437,2.5165C7.6963,2.4779 7.7604,2.458 7.8257,2.4601H9.5496C9.5792,2.459 9.6086,2.4638 9.6362,2.4741C9.6639,2.4845 9.6892,2.5002 9.7108,2.5203C9.7324,2.5405 9.7498,2.5647 9.762,2.5916C9.7743,2.6185 9.7811,2.6475 9.7821,2.677V2.7506L8.4262,7.3608L9.7046,6.9734L9.4334,7.9032L8.1356,8.2712Z"/>
|
||||
</group>
|
||||
</vector>
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<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>
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="16dp"
|
||||
android:viewportHeight="16" android:viewportWidth="16"
|
||||
android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FEF2F8" android:pathData="M8,8m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"/>
|
||||
<path android:fillColor="#E6007A" android:pathData="M7.9994,4.5169C9.2703,4.5169 10.3006,3.9535 10.3006,3.2585C10.3006,2.5634 9.2703,2 7.9994,2C6.7285,2 5.6982,2.5634 5.6982,3.2585C5.6982,3.9535 6.7285,4.5169 7.9994,4.5169Z"/>
|
||||
<path android:fillColor="#E6007A" android:pathData="M7.9994,13.9991C9.2703,13.9991 10.3006,13.4357 10.3006,12.7406C10.3006,12.0456 9.2703,11.4822 7.9994,11.4822C6.7285,11.4822 5.6982,12.0456 5.6982,12.7406C5.6982,13.4357 6.7285,13.9991 7.9994,13.9991Z"/>
|
||||
<path android:fillColor="#E6007A" android:pathData="M4.7927,6.259C5.4282,5.2241 5.424,4.1032 4.7835,3.7555C4.1429,3.4077 3.1086,3.9648 2.4731,4.9997C1.8376,6.0346 1.8418,7.1554 2.4823,7.5032C3.1228,7.8509 4.1572,7.2939 4.7927,6.259Z"/>
|
||||
<path android:fillColor="#E6007A" android:pathData="M13.5251,10.9994C14.1605,9.9645 14.1567,8.8438 13.5166,8.4963C12.8765,8.1488 11.8425,8.706 11.207,9.7409C10.5715,10.7758 10.5753,11.8965 11.2154,12.244C11.8555,12.5915 12.8896,12.0343 13.5251,10.9994Z"/>
|
||||
<path android:fillColor="#E6007A" android:pathData="M4.7837,12.2438C5.4243,11.896 5.4284,10.7752 4.793,9.7403C4.1575,8.7054 3.1231,8.1483 2.4826,8.4961C1.842,8.8438 1.8379,9.9647 2.4733,10.9996C3.1088,12.0345 4.1432,12.5915 4.7837,12.2438Z"/>
|
||||
<path android:fillColor="#E6007A" android:pathData="M13.517,7.5035C14.1571,7.156 14.1609,6.0353 13.5255,5.0004C12.89,3.9655 11.856,3.4083 11.2159,3.7558C10.5758,4.1033 10.572,5.224 11.2075,6.2589C11.8429,7.2938 12.8769,7.851 13.517,7.5035Z"/>
|
||||
</vector>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="16dp"
|
||||
android:viewportHeight="16" android:viewportWidth="16"
|
||||
android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#8247E5" android:pathData="M8,16C12.4183,16 16,12.4183 16,8C16,3.5817 12.4183,0 8,0C3.5817,0 0,3.5817 0,8C0,12.4183 3.5817,16 8,16Z"/>
|
||||
<path android:fillColor="#ffffff" android:pathData="M10.6283,6.3937C10.4378,6.2889 10.1902,6.2889 9.9808,6.3937L8.4952,7.1968L7.4858,7.7205L6.0003,8.5237C5.8098,8.6284 5.5622,8.6284 5.3527,8.5237L4.1719,7.8951C3.9815,7.7904 3.8482,7.5983 3.8482,7.3888V6.1492C3.8482,5.9397 3.9624,5.7477 4.1719,5.6429L5.3337,5.0319C5.5241,4.9271 5.7717,4.9271 5.9812,5.0319L7.143,5.6429C7.3335,5.7477 7.4668,5.9397 7.4668,6.1492V6.9524L8.4762,6.4111V5.608C8.4762,5.3985 8.3619,5.2064 8.1524,5.1017L6.0003,3.9494C5.8098,3.8447 5.5622,3.8447 5.3527,3.9494L3.1625,5.1017C2.953,5.2064 2.8387,5.3985 2.8387,5.608V7.93C2.8387,8.1395 2.953,8.3316 3.1625,8.4363L5.3527,9.5886C5.5432,9.6934 5.7908,9.6934 6.0003,9.5886L7.4858,8.803L8.4952,8.2618L9.9808,7.4761C10.1712,7.3714 10.4188,7.3714 10.6283,7.4761L11.7901,8.0872C11.9805,8.1919 12.1138,8.384 12.1138,8.5935V9.8331C12.1138,10.0426 11.9996,10.2346 11.7901,10.3394L10.6283,10.9679C10.4378,11.0727 10.1902,11.0727 9.9808,10.9679L8.819,10.3568C8.6285,10.2521 8.4952,10.06 8.4952,9.8505V9.0474L7.4858,9.5886V10.3917C7.4858,10.6013 7.6001,10.7933 7.8096,10.8981L9.9998,12.0504C10.1902,12.1551 10.4378,12.1551 10.6473,12.0504L12.8376,10.8981C13.028,10.7933 13.1613,10.6013 13.1613,10.3917V8.0697C13.1613,7.8602 13.0471,7.6682 12.8376,7.5634L10.6283,6.3937Z"/>
|
||||
</vector>
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,18 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="16dp"
|
||||
android:viewportHeight="16" android:viewportWidth="16"
|
||||
android:width="16dp" xmlns:aapt="http://schemas.android.com/aapt" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#000000" android:pathData="M8,0L8,0A8,8 0,0 1,16 8L16,8A8,8 0,0 1,8 16L8,16A8,8 0,0 1,0 8L0,8A8,8 0,0 1,8 0z"/>
|
||||
<path android:pathData="M12.3419,10.4366L10.8935,12.0202C10.862,12.0546 10.8239,12.082 10.7816,12.1008C10.7392,12.1195 10.6936,12.1292 10.6474,12.1292H3.7811C3.7483,12.1292 3.7163,12.1194 3.6889,12.1011C3.6615,12.0828 3.6399,12.0567 3.6268,12.0261C3.6138,11.9954 3.6098,11.9616 3.6154,11.9287C3.6209,11.8957 3.6358,11.8652 3.6581,11.8408L5.1077,10.2572C5.1391,10.2228 5.177,10.1955 5.2192,10.1767C5.2614,10.158 5.307,10.1483 5.353,10.1482H12.219C12.2517,10.1482 12.2838,10.158 12.3112,10.1763C12.3385,10.1946 12.3601,10.2207 12.3732,10.2513C12.3862,10.2819 12.3902,10.3158 12.3847,10.3487C12.3791,10.3816 12.3643,10.4122 12.3419,10.4366ZM10.8935,7.2476C10.862,7.2132 10.8239,7.1858 10.7816,7.167C10.7392,7.1483 10.6936,7.1386 10.6474,7.1387H3.7811C3.7483,7.1387 3.7163,7.1484 3.6889,7.1667C3.6615,7.1851 3.6399,7.2111 3.6268,7.2418C3.6138,7.2724 3.6098,7.3063 3.6154,7.3392C3.6209,7.3721 3.6358,7.4026 3.6581,7.4271L5.1077,9.0107C5.1391,9.045 5.177,9.0723 5.2192,9.0911C5.2614,9.1098 5.307,9.1195 5.353,9.1196H12.219C12.2517,9.1196 12.2838,9.1099 12.3112,9.0915C12.3385,9.0732 12.3601,9.0472 12.3732,9.0165C12.3862,8.9859 12.3902,8.952 12.3847,8.9191C12.3791,8.8862 12.3643,8.8557 12.3419,8.8312L10.8935,7.2476ZM3.7811,6.1101H10.6474C10.6936,6.1101 10.7392,6.1005 10.7816,6.0817C10.8239,6.063 10.862,6.0356 10.8935,6.0012L12.3419,4.4175C12.3643,4.3931 12.3791,4.3626 12.3847,4.3296C12.3902,4.2967 12.3862,4.2629 12.3732,4.2323C12.3601,4.2016 12.3385,4.1755 12.3112,4.1572C12.2838,4.1389 12.2517,4.1291 12.219,4.1291H5.353C5.307,4.1292 5.2614,4.1389 5.2192,4.1577C5.177,4.1764 5.1391,4.2038 5.1077,4.2381L3.6585,5.8217C3.6362,5.8461 3.6213,5.8766 3.6157,5.9095C3.6102,5.9424 3.6141,5.9762 3.6272,6.0068C3.6402,6.0374 3.6617,6.0635 3.689,6.0819C3.7163,6.1002 3.7483,6.11 3.7811,6.1101Z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient android:endX="11.7097" android:endY="4.18558"
|
||||
android:startX="4.35356" android:startY="12.3198" android:type="linear">
|
||||
<item android:color="#FF9945FF" android:offset="0.08"/>
|
||||
<item android:color="#FF8752F3" android:offset="0.3"/>
|
||||
<item android:color="#FF5497D5" android:offset="0.5"/>
|
||||
<item android:color="#FF43B4CA" android:offset="0.6"/>
|
||||
<item android:color="#FF28E0B9" android:offset="0.72"/>
|
||||
<item android:color="#FF19FB9B" android:offset="0.97"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
</vector>
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="16dp"
|
||||
android:viewportHeight="16" android:viewportWidth="16"
|
||||
android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<group>
|
||||
<clip-path android:pathData="M0,0h16v16h-16z"/>
|
||||
<path android:fillColor="#000000" android:pathData="M8,0L8,0A8,8 0,0 1,16 8L16,8A8,8 0,0 1,8 16L8,16A8,8 0,0 1,0 8L0,8A8,8 0,0 1,8 0z"/>
|
||||
<group>
|
||||
<clip-path android:pathData="M7.871,2.8386L7.871,2.8386A5.0322,5.0322 0,0 1,12.9032 7.8709L12.9032,7.8709A5.0322,5.0322 0,0 1,7.871 12.9031L7.871,12.9031A5.0322,5.0322 0,0 1,2.8387 7.8709L2.8387,7.8709A5.0322,5.0322 0,0 1,7.871 2.8386z"/>
|
||||
<path android:fillColor="#ffffff" android:pathData="M7.9897,3.6149C7.4207,3.5991 6.8543,3.6974 6.324,3.9042C5.7937,4.111 5.3102,4.4221 4.9022,4.8189C4.4941,5.2158 4.1698,5.6904 3.9483,6.2148C3.7269,6.7392 3.6128,7.3026 3.6129,7.8718C3.6129,7.9804 3.6171,8.0882 3.6254,8.196C3.637,8.3484 3.6031,8.5007 3.5282,8.6339C3.4533,8.7671 3.3406,8.8752 3.2044,8.9445L2.8387,9.1311V10.0009L3.9156,9.4519L4.2646,9.2741L4.6084,9.0993L10.7771,5.9558L11.4703,5.6027L12.9033,4.8726V4.0028L11.4829,4.7275L10.271,5.3452L4.4189,8.326C4.3992,8.175 4.3894,8.0228 4.3895,7.8706C4.3903,7.2632 4.5498,6.6667 4.8521,6.1399C5.1544,5.6132 5.589,5.1746 6.113,4.8675C6.637,4.5605 7.2321,4.3956 7.8393,4.3893C8.4466,4.3829 9.045,4.5354 9.5753,4.8315L10.2689,4.478L10.3725,4.4251C9.678,3.9211 8.8474,3.6388 7.9897,3.6149ZM12.9033,5.7427L4.9586,9.7878L4.2654,10.1418L2.8387,10.8694V11.7383L4.2553,11.0161L5.4673,10.3984L11.3256,7.4139C11.3453,7.5657 11.3551,7.7187 11.355,7.8718C11.3546,8.4798 11.1952,9.0771 10.8926,9.6045C10.59,10.1319 10.1548,10.5709 9.6301,10.8781C9.1054,11.1853 8.5094,11.3498 7.9015,11.3555C7.2935,11.3612 6.6946,11.2078 6.1642,10.9105L6.1219,10.9331L5.37,11.3164C6.0053,11.7776 6.7557,12.0541 7.5383,12.1155C8.3209,12.177 9.1053,12.0208 9.8048,11.6644C10.5042,11.308 11.0915,10.7651 11.5018,10.0958C11.912,9.4265 12.1293,8.6568 12.1296,7.8718C12.1296,7.7628 12.1254,7.6529 12.117,7.5447C12.1055,7.3924 12.1393,7.24 12.2141,7.1069C12.289,6.9737 12.4015,6.8656 12.5376,6.7962L12.9033,6.6095V5.7427Z"/>
|
||||
</group>
|
||||
</group>
|
||||
</vector>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="16dp"
|
||||
android:viewportHeight="16" android:viewportWidth="16"
|
||||
android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#2D7DF8" android:pathData="M8,8m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"/>
|
||||
<path android:fillColor="#ffffff" android:pathData="M8.5216,13C7.8414,13 7.345,12.8281 7.0322,12.4844C6.7425,12.1934 6.5744,11.7939 6.5646,11.3732C6.5611,11.2455 6.5893,11.1189 6.6465,11.006C6.6999,10.9085 6.777,10.8275 6.8699,10.7715C6.9779,10.715 7.097,10.6856 7.2177,10.6856C7.3384,10.6856 7.4574,10.715 7.5654,10.7715C7.6582,10.8273 7.7349,10.9083 7.7875,11.006C7.8464,11.1184 7.8757,11.2451 7.8724,11.3732C7.8784,11.5263 7.8366,11.6772 7.7532,11.8029C7.6838,11.9056 7.5844,11.9818 7.4702,12.0203C7.5819,12.1695 7.74,12.2729 7.917,12.3125C8.1149,12.3728 8.3199,12.4038 8.5261,12.4046C8.799,12.4071 9.0663,12.3233 9.2931,12.164C9.5284,11.9896 9.7038,11.7403 9.7935,11.4531C9.9071,11.1112 9.9626,10.7511 9.9573,10.3891C9.9665,10.0117 9.9058,9.636 9.7786,9.2828C9.6829,9.0003 9.5013,8.7587 9.2618,8.5953C9.0392,8.4475 8.7807,8.3699 8.5173,8.3719C8.2877,8.3923 8.0663,8.4711 7.8724,8.6016L7.3942,8.8531V8.6016L9.5433,5.5769H6.5646V8.7156C6.5562,8.9421 6.6133,9.166 6.7284,9.3578C6.7842,9.4414 6.8595,9.5085 6.9472,9.5525C7.0348,9.5966 7.1319,9.6162 7.2288,9.6093C7.4081,9.6055 7.5814,9.5415 7.7233,9.4265C7.8841,9.3029 8.0241,9.1518 8.1373,8.9796C8.1475,8.9495 8.1663,8.9233 8.1912,8.9047C8.2111,8.8866 8.2366,8.8766 8.263,8.8766C8.3147,8.8815 8.3637,8.9034 8.403,8.939C8.4528,8.9974 8.4798,9.0732 8.4789,9.1515C8.4732,9.2042 8.4642,9.2563 8.4521,9.3078C8.3463,9.5765 8.1689,9.8075 7.9412,9.9732C7.7298,10.1233 7.48,10.2029 7.2247,10.2016C6.5798,10.2016 6.133,10.0682 5.8844,9.8016C5.7566,9.6542 5.6581,9.4815 5.5947,9.2937C5.5312,9.1059 5.5042,8.9067 5.515,8.7078V5.5769H4V4.9937H5.5221V3.664L5.1736,3.2982V3H6.1848L6.5646,3.2063V4.9937L10.4993,4.9812L10.8911,5.3937L8.4784,7.9372C8.6241,7.8757 8.7776,7.8368 8.9341,7.8216C9.2437,7.8358 9.5458,7.9263 9.8159,8.0857C10.1287,8.2417 10.3923,8.4885 10.5755,8.7969C10.7396,9.0579 10.8558,9.3488 10.9181,9.6547C10.9692,9.8959 10.9967,10.142 11,10.3891C11.0016,10.8607 10.8997,11.3264 10.7021,11.75C10.5148,12.1602 10.1995,12.491 9.8085,12.6876C9.4082,12.8945 8.9678,13.0014 8.5216,13Z"/>
|
||||
</vector>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="22dp"
|
||||
android:viewportHeight="22" android:viewportWidth="22"
|
||||
android:width="22dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF060A" android:pathData="M11,11m-11,0a11,11 0,1 1,22 0a11,11 0,1 1,-22 0"/>
|
||||
<group>
|
||||
<clip-path android:pathData="M5,6h12v12h-12z"/>
|
||||
<path android:fillColor="#ffffff" android:pathData="M16.5405,9.6149C15.978,9.0955 15.1999,8.3024 14.5662,7.7399L14.5287,7.7137C14.4663,7.6636 14.3959,7.6243 14.3205,7.5974C12.7924,7.3124 5.6805,5.983 5.5418,5.9999C5.5029,6.0054 5.4657,6.0195 5.433,6.0412L5.3974,6.0693C5.3535,6.1138 5.3202,6.1677 5.2999,6.2268L5.2905,6.2512V6.3843V6.4049C6.0911,8.6343 9.2524,15.9374 9.8749,17.6512C9.9124,17.7674 9.9837,17.9887 10.1168,17.9999H10.1468C10.218,17.9999 10.5218,17.5987 10.5218,17.5987C10.5218,17.5987 15.9518,11.0137 16.5012,10.3124C16.5723,10.226 16.635,10.1331 16.6887,10.0349C16.7023,9.9581 16.6959,9.879 16.6699,9.8054C16.644,9.7318 16.5994,9.6662 16.5405,9.6149ZM11.9149,10.3818L14.2324,8.4599L15.5918,9.7124L11.9149,10.3818ZM11.0149,10.2562L7.0249,6.9862L13.4805,8.1768L11.0149,10.2562ZM11.3749,11.113L15.4587,10.4549L10.7899,16.0799L11.3749,11.113ZM6.483,7.3124L10.6812,10.8749L10.0737,16.0837L6.483,7.3124Z"/>
|
||||
</group>
|
||||
</vector>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="16dp"
|
||||
android:viewportHeight="16" android:viewportWidth="16"
|
||||
android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#ffffff" android:pathData="M8,8m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"/>
|
||||
<path android:fillColor="#000000" android:pathData="M8,16C3.5815,16 0,12.4185 0,8C0,3.5815 3.5815,0 8,0C12.4185,0 16,3.5815 16,8C16,12.4185 12.4185,16 8,16ZM11.5355,4C11.5352,4 11.5349,4.0001 11.5346,4.0003L9.248,6.2615C8.9152,6.5899 8.4665,6.7741 7.999,6.7741C7.5315,6.7741 7.0827,6.5899 6.75,6.2615L4.6138,4.1472C4.5185,4.0529 4.3898,4 4.2557,4C3.8009,4 3.5743,4.551 3.8976,4.8709L6.0275,6.9785C6.5533,7.4966 7.2618,7.787 8,7.787C8.7382,7.787 9.4467,7.4966 9.9725,6.9785L11.9537,5.0167C12.331,4.6431 12.0664,4 11.5355,4ZM4.4475,12.2811C4.4475,12.2813 4.4477,12.2813 4.4478,12.2813L6.752,10C7.0848,9.6716 7.5335,9.4874 8.001,9.4874C8.4685,9.4874 8.9172,9.6716 9.25,10L11.4037,12.134C11.499,12.2285 11.6278,12.2815 11.762,12.2815C12.2168,12.2815 12.4433,11.7305 12.1201,11.4106L9.9725,9.285C9.4467,8.7669 8.7382,8.4765 8,8.4765C7.2618,8.4765 6.5533,8.7669 6.0275,9.285L3.7291,11.5595C3.4613,11.8245 3.649,12.281 4.0258,12.281H4.4474C4.4474,12.281 4.4475,12.2811 4.4475,12.2811Z"/>
|
||||
</vector>
|
||||
|
|
@ -191,6 +191,8 @@
|
|||
<string name="common_share">Share</string>
|
||||
<string name="common_copy">Copy</string>
|
||||
<string name="common_success">Erfolg</string>
|
||||
<string name="exchange_send_view_header">You Send</string>
|
||||
<string name="exchange_receive_view_header">You Receive</string>
|
||||
<string name="swapping_permission_header">Give Permission</string>
|
||||
<string name="swapping_permission_subheader">To continue you need to allow 1inch smart contracts to use your %s</string>
|
||||
<string name="swapping_permission_rows_amount">Amount %s</string>
|
||||
|
|
|
|||
|
|
@ -191,6 +191,8 @@
|
|||
<string name="common_share">Share</string>
|
||||
<string name="common_copy">Copy</string>
|
||||
<string name="common_success">Avec succès</string>
|
||||
<string name="exchange_send_view_header">You Send</string>
|
||||
<string name="exchange_receive_view_header">You Receive</string>
|
||||
<string name="swapping_permission_header">Give Permission</string>
|
||||
<string name="swapping_permission_subheader">To continue you need to allow 1inch smart contracts to use your %s</string>
|
||||
<string name="swapping_permission_rows_amount">Amount %s</string>
|
||||
|
|
|
|||
|
|
@ -191,6 +191,8 @@
|
|||
<string name="common_share">Share</string>
|
||||
<string name="common_copy">Copy</string>
|
||||
<string name="common_success">Con successo</string>
|
||||
<string name="exchange_send_view_header">You Send</string>
|
||||
<string name="exchange_receive_view_header">You Receive</string>
|
||||
<string name="swapping_permission_header">Give Permission</string>
|
||||
<string name="swapping_permission_subheader">To continue you need to allow 1inch smart contracts to use your %s</string>
|
||||
<string name="swapping_permission_rows_amount">Amount %s</string>
|
||||
|
|
|
|||
|
|
@ -191,6 +191,8 @@
|
|||
<string name="common_share">Поделиться</string>
|
||||
<string name="common_copy">Копировать</string>
|
||||
<string name="common_success">Успешно</string>
|
||||
<string name="exchange_send_view_header">Вы отправляете</string>
|
||||
<string name="exchange_receive_view_header">Вы получаете</string>
|
||||
<string name="swapping_permission_header">Дать разрешение</string>
|
||||
<string name="swapping_permission_subheader">Чтобы продолжить, вам нужно разрешить смарт-контракту 1inch использовать ваш %s</string>
|
||||
<string name="swapping_permission_rows_amount">Количество %s</string>
|
||||
|
|
|
|||
|
|
@ -191,6 +191,8 @@
|
|||
<string name="common_share">Share</string>
|
||||
<string name="common_copy">Copy</string>
|
||||
<string name="common_success">Success</string>
|
||||
<string name="exchange_send_view_header">You Send</string>
|
||||
<string name="exchange_receive_view_header">You Receive</string>
|
||||
<string name="swapping_permission_header">Give Permission</string>
|
||||
<string name="swapping_permission_subheader">To continue you need to allow 1inch smart contracts to use your %s</string>
|
||||
<string name="swapping_permission_rows_amount">Amount %s</string>
|
||||
|
|
|
|||
|
|
@ -268,10 +268,11 @@ private fun CardInfoBox(
|
|||
if (isLoading) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.size(width = TangemTheme.dimens.size40, height = TangemTheme.dimens.size12)
|
||||
.shimmer()
|
||||
.size(
|
||||
width = TangemTheme.dimens.size80,
|
||||
height = TangemTheme.dimens.size20,
|
||||
.background(
|
||||
color = TangemTheme.colors.button.secondary,
|
||||
shape = RoundedCornerShape(TangemTheme.dimens.radius3),
|
||||
),
|
||||
)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
package com.tangem.core.ui.components
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.tangem.core.ui.res.TangemTheme
|
||||
|
||||
@Composable
|
||||
fun CurrencyPlaceholderIcon(modifier: Modifier = Modifier, id: String) {
|
||||
|
||||
val letterColor: Color = TangemTheme.colors.text.primary2
|
||||
val circleColor: Color = TangemTheme.colors.icon.secondary
|
||||
|
||||
Box(
|
||||
contentAlignment = Alignment.Center,
|
||||
modifier = modifier
|
||||
.background(circleColor, shape = CircleShape),
|
||||
)
|
||||
{
|
||||
Text(
|
||||
text = id.firstOrNull()?.titlecase() ?: "",
|
||||
textAlign = TextAlign.Center,
|
||||
color = letterColor,
|
||||
modifier = Modifier.padding(TangemTheme.dimens.spacing4),
|
||||
fontSize = 20.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// region preview
|
||||
|
||||
@Preview(showBackground = true, heightDp = 40, widthDp = 40)
|
||||
@Composable
|
||||
fun Preview_CurrencyPlaceholderIcon_InLightTheme() {
|
||||
TangemTheme(isDark = false) {
|
||||
CurrencyPlaceholderIcon(id = "DAI")
|
||||
}
|
||||
}
|
||||
|
||||
@Preview(showBackground = true, heightDp = 40, widthDp = 40)
|
||||
@Composable
|
||||
fun Preview_CurrencyPlaceholderIcon_InDarkTheme() {
|
||||
TangemTheme(isDark = true) {
|
||||
CurrencyPlaceholderIcon(id = "DAI")
|
||||
}
|
||||
}
|
||||
|
||||
// endregion preview
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package com.tangem.core.ui.components
|
||||
|
||||
import androidx.compose.material.LocalTextStyle
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.drawWithContent
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.unit.TextUnit
|
||||
import androidx.compose.ui.unit.sp
|
||||
|
||||
@Composable
|
||||
fun ResizableText(
|
||||
text: String,
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = Color.Unspecified,
|
||||
style: TextStyle = LocalTextStyle.current,
|
||||
fontSizeRange: FontSizeRange,
|
||||
) {
|
||||
val fontSizeValue = remember { mutableStateOf(fontSizeRange.max.value) }
|
||||
val readyToDraw = remember { mutableStateOf(false) }
|
||||
|
||||
val textState = remember { mutableStateOf(text) }
|
||||
if (textState.value != text) {
|
||||
readyToDraw.value = false
|
||||
fontSizeValue.value = fontSizeRange.max.value
|
||||
textState.value = text
|
||||
}
|
||||
|
||||
Text(
|
||||
modifier = modifier.drawWithContent { if (readyToDraw.value) drawContent() },
|
||||
text = text,
|
||||
color = color,
|
||||
softWrap = false,
|
||||
style = style,
|
||||
fontSize = fontSizeValue.value.sp,
|
||||
onTextLayout = {
|
||||
if (it.hasVisualOverflow) {
|
||||
val nextFontSizeValue = fontSizeValue.value - fontSizeRange.step.value
|
||||
if (nextFontSizeValue <= fontSizeRange.min.value) {
|
||||
fontSizeValue.value = fontSizeRange.min.value
|
||||
readyToDraw.value = true
|
||||
} else {
|
||||
fontSizeValue.value = nextFontSizeValue * 0.8f
|
||||
}
|
||||
} else {
|
||||
readyToDraw.value = true
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
data class FontSizeRange(
|
||||
val min: TextUnit,
|
||||
val max: TextUnit,
|
||||
val step: TextUnit = DEFAULT_TEXT_STEP,
|
||||
) {
|
||||
init {
|
||||
require(min < max) { "min should be less than max, $this" }
|
||||
require(step.value > 0) { "step should be greater than 0, $this" }
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val DEFAULT_TEXT_STEP = 1.sp
|
||||
}
|
||||
}
|
||||
|
|
@ -44,7 +44,7 @@ fun SuccessScreenContent(
|
|||
modifier = modifier
|
||||
.fillMaxSize()
|
||||
.verticalScroll(rememberScrollState())
|
||||
.background(TangemTheme.colors.background.secondary)
|
||||
.background(TangemTheme.colors.background.primary)
|
||||
.padding(
|
||||
horizontal = TangemTheme.dimens.spacing16,
|
||||
vertical = TangemTheme.dimens.spacing32,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
package com.tangem.core.ui.extensions
|
||||
|
||||
import androidx.annotation.DrawableRes
|
||||
import com.tangem.core.ui.R
|
||||
|
||||
@DrawableRes
|
||||
fun getActiveIconRes(blockchainId: String): Int {
|
||||
return when (blockchainId) {
|
||||
"ARBITRUM-ONE", "ARBITRUM/test" -> R.drawable.img_arbitrum_22
|
||||
"BTC", "BTC/test" -> R.drawable.img_btc_22
|
||||
"BCH" -> R.drawable.img_btc_cash_22
|
||||
"LTC" -> R.drawable.img_litecoin_22
|
||||
"ETH", "ETH/test" -> R.drawable.img_eth_22
|
||||
"ETC", "ETC/test" -> R.drawable.img_eth_classic_22
|
||||
"RSK" -> R.drawable.img_rsk_22
|
||||
"CARDANO", "CARDANO-S" -> R.drawable.img_cardano_22
|
||||
"XTZ" -> R.drawable.img_tezos_22
|
||||
"XRP" -> R.drawable.img_xrp_22
|
||||
"XLM", "XLM/test" -> R.drawable.img_stellar_22
|
||||
"AVALANCHE", "AVALANCHE/test" -> R.drawable.img_avalanche_22
|
||||
"POLYGON", "POLYGON/test" -> R.drawable.img_polygon_22
|
||||
"SOLANA", "SOLANA/test" -> R.drawable.img_solana_22
|
||||
"FTM", "FTM/test" -> R.drawable.img_fantom_22
|
||||
"BSC", "BSC/test", "BINANCE", "BINANCE/test" -> R.drawable.img_bsc_22
|
||||
"DOGE" -> R.drawable.img_dogecoin_22
|
||||
"TRON", "TRON/test" -> R.drawable.img_tron_22
|
||||
"GNO" -> R.drawable.img_gnosis_22
|
||||
"ETH-Pow", "ETH-Pow/test" -> R.drawable.img_eth_pow_22
|
||||
"ETH-Fair" -> R.drawable.img_eth_fair_22
|
||||
"Polkadot", "Polkadot/test" -> R.drawable.img_polkadot_22
|
||||
"Kusama" -> R.drawable.img_kusama_22
|
||||
"OPTIMISM", "OPTIMISM/test" -> R.drawable.img_optimism_22
|
||||
"DASH" -> R.drawable.img_dash_22
|
||||
else -> R.drawable.ic_alert_24
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -20,6 +20,7 @@ data class TangemDimens internal constructor(
|
|||
// endregion Elevation
|
||||
// region Radius
|
||||
val radius2: Dp = 2.dp,
|
||||
val radius3: Dp = 3.dp,
|
||||
val radius4: Dp = 4.dp,
|
||||
val radius6: Dp = 6.dp,
|
||||
val radius8: Dp = 8.dp,
|
||||
|
|
@ -61,6 +62,7 @@ data class TangemDimens internal constructor(
|
|||
val size200: Dp = 200.dp,
|
||||
// endregion Size
|
||||
// region Spacing
|
||||
val spacing0_5: Dp = 0.5.dp,
|
||||
val spacing2: Dp = 2.dp,
|
||||
val spacing4: Dp = 4.dp,
|
||||
val spacing8: Dp = 8.dp,
|
||||
|
|
|
|||
26
core/ui/src/main/res/drawable/img_arbitrum_22.xml
Normal file
26
core/ui/src/main/res/drawable/img_arbitrum_22.xml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#2C374B"
|
||||
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="#24A2EE"
|
||||
android:pathData="M16.549,12.947L13.628,8.469L12.557,10.221L15.38,14.797L16.646,14.212L16.549,12.947Z" />
|
||||
<path
|
||||
android:fillColor="#24A2EE"
|
||||
android:pathData="M15.186,15.38L12.266,10.903L11,12.849L13.336,16.549L14.797,15.965L15.186,15.38Z" />
|
||||
<path
|
||||
android:fillColor="#98BCDC"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M5.646,7.885L11,4.77L16.354,7.885V14.115L11,17.23L7.009,14.991L7,16L10.903,18.398C11,18.496 11.097,18.496 11.195,18.398L17.327,14.894C17.425,14.797 17.522,14.699 17.522,14.602V7.593C17.522,7.496 17.425,7.398 17.327,7.301L11.195,3.797C11.097,3.699 11,3.699 10.903,3.797L4.77,7.204C4.673,7.301 4.575,7.398 4.575,7.496V14.505C4.575,14.602 4.673,14.699 4.77,14.797L6,15.5L6.5,14.5L5.743,14.115V7.885H5.646Z" />
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="M13.336,7.96H11.292L6.522,15.748L8.177,16.721L13.336,7.96Z" />
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="M8.177,8.664C8.664,7.885 10.027,7.885 10.611,7.982L6,15.5C5.805,15.403 5.354,15.186 5.062,14.991C4.673,14.797 4.575,14.797 4.575,14.504V14.115C5.646,12.557 7.69,9.442 8.177,8.664Z" />
|
||||
</vector>
|
||||
14
core/ui/src/main/res/drawable/img_avalanche_22.xml
Normal file
14
core/ui/src/main/res/drawable/img_avalanche_22.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#E74142"
|
||||
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="#ffffff"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M7.886,15.378H5.752C5.303,15.378 5.081,15.378 4.946,15.292C4.8,15.197 4.711,15.041 4.7,14.868C4.692,14.708 4.803,14.514 5.025,14.125L10.296,4.834C10.52,4.439 10.634,4.242 10.777,4.169C10.931,4.09 11.115,4.09 11.269,4.169C11.412,4.242 11.525,4.439 11.75,4.834L12.833,6.725L12.839,6.735C13.081,7.158 13.204,7.373 13.257,7.598C13.317,7.844 13.317,8.103 13.257,8.349C13.203,8.576 13.082,8.792 12.836,9.222L10.067,14.116L10.06,14.129C9.816,14.556 9.693,14.772 9.521,14.935C9.335,15.114 9.111,15.243 8.865,15.316C8.64,15.378 8.389,15.378 7.886,15.378ZM13.278,15.378H16.336C16.788,15.378 17.015,15.378 17.15,15.289C17.296,15.195 17.388,15.035 17.396,14.862C17.404,14.708 17.295,14.521 17.083,14.155C17.076,14.142 17.068,14.129 17.061,14.116L15.528,11.495L15.511,11.466C15.296,11.102 15.187,10.918 15.047,10.847C14.894,10.768 14.712,10.768 14.558,10.847C14.418,10.92 14.304,11.111 14.08,11.498L12.553,14.119L12.548,14.128C12.325,14.514 12.213,14.707 12.221,14.865C12.232,15.038 12.321,15.197 12.467,15.292C12.599,15.378 12.826,15.378 13.278,15.378Z" />
|
||||
</vector>
|
||||
14
core/ui/src/main/res/drawable/img_binance_22.xml
Normal file
14
core/ui/src/main/res/drawable/img_binance_22.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#F3BA2F"
|
||||
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="#ffffff"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M8.33,9.903L11,7.233L13.672,9.905L15.225,8.351L11,4.125L6.775,8.35L8.33,9.903ZM4.124,11.001L5.677,9.447L7.231,11.001L5.677,12.554L4.124,11.001ZM11,14.769L8.329,12.098L6.773,13.65L6.775,13.652L11,17.876L15.225,13.65L15.226,13.649L13.672,12.097L11,14.769ZM14.767,11.001L16.321,9.448L17.875,11.001L16.321,12.555L14.767,11.001ZM11,9.422L12.576,10.999H12.578L12.576,11L11,12.578L9.425,11.003L9.422,10.999L9.425,10.997L9.7,10.721L9.835,10.588L11,9.422Z" />
|
||||
</vector>
|
||||
22
core/ui/src/main/res/drawable/img_bsc_22.xml
Normal file
22
core/ui/src/main/res/drawable/img_bsc_22.xml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
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="#F0B90B"
|
||||
android:pathData="M6.046,11L6.054,13.909L8.525,15.363V17.066L4.607,14.768V10.149L6.046,11ZM6.046,8.091V9.786L4.606,8.935V7.24L6.046,6.388L7.492,7.24L6.046,8.091ZM9.557,7.24L10.997,6.388L12.443,7.24L10.997,8.091L9.557,7.24Z" />
|
||||
<path
|
||||
android:fillColor="#F0B90B"
|
||||
android:pathData="M7.086,13.306V11.603L8.525,12.454V14.149L7.086,13.306ZM9.557,15.973L10.996,16.824L12.443,15.973V17.668L10.996,18.519L9.557,17.668V15.973ZM14.507,7.24L15.946,6.388L17.393,7.24V8.935L15.946,9.786V8.091L14.507,7.24ZM15.946,13.909L15.954,11L17.394,10.149V14.767L13.476,17.065V15.362L15.946,13.909Z" />
|
||||
<path
|
||||
android:fillColor="#F0B90B"
|
||||
android:pathData="M14.914,13.306L13.475,14.149V12.454L14.914,11.603V13.306Z" />
|
||||
<path
|
||||
android:fillColor="#F0B90B"
|
||||
android:pathData="M14.914,8.694L14.922,10.397L12.444,11.851V14.767L11.004,15.611L9.565,14.767V11.851L7.087,10.397V8.694L8.532,7.843L10.996,9.304L13.474,7.843L14.92,8.694H14.914ZM7.086,5.786L10.997,3.481L14.914,5.786L13.475,6.638L10.997,5.177L8.525,6.638L7.086,5.786Z" />
|
||||
</vector>
|
||||
13
core/ui/src/main/res/drawable/img_btc_22.xml
Normal file
13
core/ui/src/main/res/drawable/img_btc_22.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#F7931A"
|
||||
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="#ffffff"
|
||||
android:pathData="M15.85,9.433C16.069,7.969 14.955,7.182 13.431,6.658L13.925,4.675L12.718,4.374L12.237,6.304C11.92,6.225 11.594,6.151 11.27,6.077L11.755,4.134L10.548,3.833L10.053,5.815C9.791,5.755 9.533,5.696 9.283,5.634L9.284,5.628L7.619,5.212L7.298,6.501C7.298,6.501 8.194,6.706 8.175,6.719C8.664,6.841 8.752,7.165 8.737,7.421L8.174,9.68C8.208,9.688 8.252,9.701 8.3,9.72C8.26,9.71 8.217,9.699 8.172,9.688L7.383,12.852C7.323,13.001 7.171,13.224 6.83,13.139C6.842,13.157 5.952,12.92 5.952,12.92L5.353,14.302L6.924,14.693C7.216,14.767 7.503,14.843 7.784,14.915L7.285,16.921L8.491,17.222L8.985,15.237C9.315,15.327 9.634,15.409 9.947,15.487L9.454,17.462L10.661,17.763L11.161,15.761C13.219,16.15 14.767,15.993 15.418,14.132C15.943,12.633 15.392,11.769 14.309,11.205C15.098,11.023 15.692,10.504 15.85,9.433ZM13.092,13.3C12.719,14.799 10.196,13.988 9.378,13.785L10.04,11.128C10.858,11.333 13.482,11.737 13.092,13.3ZM13.466,9.411C13.125,10.775 11.025,10.082 10.344,9.912L10.944,7.502C11.626,7.672 13.82,7.989 13.466,9.411Z" />
|
||||
</vector>
|
||||
13
core/ui/src/main/res/drawable/img_btc_cash_22.xml
Normal file
13
core/ui/src/main/res/drawable/img_btc_cash_22.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#0AC18E"
|
||||
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="#ffffff"
|
||||
android:pathData="M14.685,7.349C14.124,6.086 12.836,5.816 11.259,6.077L10.752,4.125L9.557,4.432L10.056,6.378C9.741,6.457 9.418,6.524 9.099,6.615L8.6,4.679L7.405,4.986L7.912,6.938C7.655,7.011 5.5,7.56 5.5,7.56L5.828,8.831C5.828,8.831 6.706,8.586 6.698,8.606C7.185,8.48 7.414,8.721 7.522,8.949L8.914,14.3C8.931,14.454 8.903,14.719 8.569,14.809C8.589,14.82 7.7,15.031 7.7,15.031L7.83,16.514C7.83,16.514 9.965,15.971 10.245,15.9L10.758,17.875L11.952,17.568L11.44,15.58C11.768,15.504 12.088,15.425 12.4,15.343L12.909,17.321L14.104,17.014L13.592,15.042C15.432,14.598 16.732,13.444 16.465,11.681C16.295,10.617 15.126,9.745 14.155,9.647C14.752,9.121 15.056,8.353 14.685,7.349ZM14.11,12.004C14.348,13.751 11.904,13.965 11.097,14.176L10.395,11.563C11.205,11.352 13.708,10.465 14.11,12.004ZM12.638,8.446C12.89,9.999 10.8,10.179 10.126,10.35L9.486,7.979C10.163,7.813 12.125,7.008 12.638,8.446Z" />
|
||||
</vector>
|
||||
13
core/ui/src/main/res/drawable/img_cardano_22.xml
Normal file
13
core/ui/src/main/res/drawable/img_cardano_22.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#0033AD"
|
||||
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="#ffffff"
|
||||
android:pathData="M10.826,4.491C11.135,4.33 11.511,4.703 11.347,5.011C11.252,5.262 10.892,5.329 10.707,5.138C10.512,4.954 10.576,4.591 10.826,4.491ZM7.511,4.848C7.698,4.771 7.935,4.943 7.916,5.147C7.936,5.369 7.665,5.532 7.474,5.426C7.221,5.328 7.25,4.918 7.511,4.848ZM14.302,5.433C14.009,5.397 13.962,4.937 14.244,4.844C14.463,4.738 14.663,4.938 14.695,5.145C14.649,5.322 14.501,5.484 14.302,5.433ZM8.265,6.26C8.578,6.062 9.025,6.356 8.977,6.72C8.961,7.087 8.473,7.3 8.198,7.052C7.932,6.857 7.972,6.409 8.265,6.26ZM13.044,6.47C13.184,6.11 13.75,6.099 13.909,6.449C14.066,6.722 13.873,7.06 13.593,7.152C13.222,7.221 12.87,6.821 13.044,6.47ZM10.427,7.132C10.424,6.822 10.706,6.592 11,6.571C11.195,6.61 11.408,6.693 11.491,6.89C11.647,7.161 11.509,7.535 11.227,7.66C11.098,7.732 10.946,7.705 10.806,7.696C10.591,7.591 10.41,7.385 10.427,7.132ZM5.497,7.583C5.783,7.407 6.168,7.728 6.06,8.038C6.001,8.307 5.639,8.416 5.433,8.245C5.212,8.084 5.247,7.698 5.497,7.583ZM16.084,7.582C16.327,7.394 16.727,7.61 16.698,7.916C16.715,8.195 16.369,8.406 16.128,8.262C15.863,8.143 15.835,7.735 16.084,7.582ZM11.814,8.138C12.214,7.994 12.69,8.167 12.918,8.523C13.219,8.96 13.059,9.624 12.592,9.875C12.108,10.171 11.401,9.92 11.222,9.379C11.019,8.896 11.315,8.29 11.814,8.138ZM9.465,8.186C9.908,7.976 10.506,8.152 10.72,8.606C10.972,9.048 10.777,9.663 10.326,9.891C9.875,10.148 9.238,9.953 9.019,9.479C8.774,9.02 8.992,8.397 9.465,8.186ZM7.112,8.99C7.146,8.704 7.416,8.518 7.688,8.499C7.981,8.534 8.215,8.762 8.247,9.059C8.228,9.352 8.001,9.639 7.69,9.638C7.347,9.667 7.047,9.326 7.112,8.99ZM14.06,8.561C14.412,8.356 14.9,8.654 14.884,9.058C14.908,9.486 14.368,9.788 14.018,9.537C13.654,9.328 13.683,8.739 14.06,8.561ZM8.509,10.069C8.92,9.956 9.39,10.15 9.592,10.528C9.813,10.908 9.722,11.437 9.379,11.716C8.939,12.125 8.128,11.961 7.893,11.402C7.624,10.89 7.951,10.204 8.509,10.069ZM12.964,10.067C13.364,9.953 13.834,10.107 14.049,10.471C14.333,10.888 14.197,11.509 13.774,11.777C13.331,12.089 12.645,11.925 12.401,11.438C12.105,10.934 12.403,10.221 12.964,10.067ZM5.864,10.542C6.219,10.408 6.613,10.8 6.469,11.152C6.381,11.473 5.929,11.592 5.695,11.355C5.422,11.133 5.523,10.639 5.864,10.542ZM15.492,11.053C15.481,10.759 15.697,10.498 15.998,10.482C16.242,10.521 16.478,10.717 16.459,10.982C16.481,11.332 16.06,11.569 15.762,11.405C15.622,11.334 15.551,11.191 15.492,11.053ZM4.117,10.715C4.331,10.622 4.595,10.807 4.547,11.044C4.535,11.313 4.138,11.416 3.993,11.192C3.864,11.036 3.941,10.795 4.117,10.715ZM17.591,10.71C17.742,10.603 17.983,10.68 18.043,10.855C18.144,11.047 17.959,11.311 17.743,11.278C17.439,11.306 17.341,10.843 17.591,10.71ZM9.669,12C10.232,11.853 10.836,12.322 10.84,12.901C10.876,13.486 10.281,14.005 9.705,13.87C9.261,13.799 8.911,13.37 8.926,12.92C8.925,12.49 9.249,12.091 9.669,12ZM11.896,11.998C12.467,11.839 13.09,12.316 13.08,12.909C13.111,13.483 12.534,13.984 11.97,13.87C11.44,13.802 11.049,13.219 11.197,12.704C11.271,12.361 11.558,12.083 11.896,11.998ZM7.603,12.355C7.998,12.288 8.368,12.728 8.208,13.103C8.091,13.503 7.509,13.611 7.252,13.285C6.951,12.971 7.176,12.398 7.603,12.355ZM14.134,12.373C14.486,12.225 14.918,12.53 14.891,12.912C14.905,13.333 14.371,13.623 14.027,13.377C13.637,13.157 13.708,12.508 14.134,12.373ZM15.959,14.203C15.821,13.946 16.072,13.606 16.357,13.653C16.499,13.651 16.598,13.763 16.689,13.857C16.708,14.009 16.739,14.191 16.613,14.308C16.441,14.525 16.052,14.463 15.959,14.203ZM5.495,13.725C5.762,13.547 6.146,13.812 6.086,14.124C6.054,14.4 5.707,14.557 5.478,14.401C5.232,14.259 5.241,13.854 5.495,13.725ZM10.765,14.302C11.114,14.148 11.559,14.452 11.526,14.837C11.552,15.262 11.002,15.556 10.66,15.301C10.281,15.082 10.344,14.437 10.765,14.302ZM8.324,14.872C8.622,14.715 9.021,14.985 8.994,15.318C9.003,15.592 8.736,15.824 8.466,15.784C8.243,15.779 8.097,15.579 8.026,15.389C8.029,15.181 8.115,14.95 8.324,14.872ZM13.268,14.876C13.574,14.687 14.009,14.959 13.98,15.315C13.988,15.687 13.497,15.925 13.212,15.681C12.936,15.489 12.97,15.029 13.268,14.876ZM14.128,17.002C13.992,16.796 14.152,16.548 14.373,16.501C14.551,16.537 14.739,16.671 14.701,16.877C14.675,17.155 14.268,17.241 14.128,17.002ZM7.303,16.823C7.358,16.66 7.489,16.498 7.681,16.54C7.961,16.56 8.044,16.982 7.799,17.112C7.578,17.261 7.323,17.057 7.303,16.823ZM10.596,17.01C10.649,16.769 10.962,16.652 11.168,16.78C11.304,16.838 11.344,16.99 11.379,17.12C11.36,17.187 11.343,17.255 11.327,17.322C11.243,17.422 11.134,17.522 10.994,17.518C10.733,17.549 10.498,17.254 10.596,17.01Z" />
|
||||
</vector>
|
||||
16
core/ui/src/main/res/drawable/img_dash_22.xml
Normal file
16
core/ui/src/main/res/drawable/img_dash_22.xml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#008DE4"
|
||||
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="#ffffff"
|
||||
android:pathData="M12.97,4.846H7.66L7.22,7.304L12.012,7.311C14.372,7.311 15.07,8.168 15.05,9.588C15.038,10.317 14.724,11.549 14.587,11.948C14.224,13.012 13.477,14.227 10.677,14.223L6.02,14.221L5.578,16.682H10.875C12.743,16.682 13.538,16.464 14.379,16.076C16.245,15.215 17.356,13.373 17.8,10.97C18.462,7.392 17.636,4.846 12.97,4.846Z" />
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="M5.369,9.53C3.979,9.53 3.779,10.436 3.649,10.984C3.476,11.701 3.42,11.991 3.42,11.991H8.856C10.247,11.991 10.446,11.085 10.576,10.537C10.749,9.819 10.805,9.53 10.805,9.53H5.369Z" />
|
||||
</vector>
|
||||
14
core/ui/src/main/res/drawable/img_dogecoin_22.xml
Normal file
14
core/ui/src/main/res/drawable/img_dogecoin_22.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#C2A633"
|
||||
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="#ffffff"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M7.362,16.754H11.16H11.16C11.16,16.754 16.5,17.209 16.5,11.093C16.5,5.213 11.624,5.234 10.681,5.238C10.659,5.238 10.639,5.239 10.622,5.239H7.362V10.368H6.024V11.625H7.362V16.754ZM9.502,7.367H11C11.56,7.367 14.38,7.596 14.384,11.134C14.389,14.63 11.546,14.626 11.089,14.626C11.083,14.626 11.078,14.626 11.073,14.626H9.502V11.625H11.859V10.368H9.502V7.367Z" />
|
||||
</vector>
|
||||
28
core/ui/src/main/res/drawable/img_eth_22.xml
Normal file
28
core/ui/src/main/res/drawable/img_eth_22.xml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#E2E9EC"
|
||||
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="#343434"
|
||||
android:pathData="M10.999,3.85L10.903,4.176V13.629L10.999,13.725L15.398,11.131L10.999,3.85Z" />
|
||||
<path
|
||||
android:fillColor="#8C8C8C"
|
||||
android:pathData="M10.999,3.85L6.6,11.131L10.999,13.725V9.136V3.85Z" />
|
||||
<path
|
||||
android:fillColor="#3C3C3B"
|
||||
android:pathData="M10.999,14.556L10.944,14.622V17.989L10.999,18.147L15.4,11.963L10.999,14.556Z" />
|
||||
<path
|
||||
android:fillColor="#8C8C8C"
|
||||
android:pathData="M10.999,18.147V14.556L6.6,11.963L10.999,18.147Z" />
|
||||
<path
|
||||
android:fillColor="#141414"
|
||||
android:pathData="M10.999,13.725L15.397,11.131L10.999,9.137V13.725Z" />
|
||||
<path
|
||||
android:fillColor="#393939"
|
||||
android:pathData="M6.6,11.131L10.999,13.725V9.137L6.6,11.131Z" />
|
||||
</vector>
|
||||
22
core/ui/src/main/res/drawable/img_eth_classic_22.xml
Normal file
22
core/ui/src/main/res/drawable/img_eth_classic_22.xml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#D2EFD2"
|
||||
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="#3AB83A"
|
||||
android:pathData="M7,11.624C8.41,12.433 9.88,13.28 11.016,13.935L15,11.624C13.558,13.939 12.356,15.867 11.016,18C9.675,15.872 8.193,13.523 7,11.624ZM7.153,10.986L11.021,8.756L14.838,10.969L11.023,13.202L7.153,10.986ZM11.016,8.042L7,10.326L10.999,4L15,10.34L11.016,8.042Z" />
|
||||
<path
|
||||
android:fillColor="#0B8311"
|
||||
android:pathData="M11.016,13.935L15,11.624C13.558,13.939 11.016,18 11.016,18V13.935ZM11.021,8.756L14.838,10.969L11.023,13.202L11.021,8.756ZM11.016,8.042L10.999,4L15,10.34L11.016,8.042Z" />
|
||||
<path
|
||||
android:fillColor="#0B8311"
|
||||
android:pathData="M7.153,10.986L11.021,11.329L14.838,10.972L11.023,13.204L7.153,10.986Z" />
|
||||
<path
|
||||
android:fillColor="#146714"
|
||||
android:pathData="M11.021,11.329L14.838,10.972L11.023,13.204L11.021,11.329Z" />
|
||||
</vector>
|
||||
14
core/ui/src/main/res/drawable/img_fantom_22.xml
Normal file
14
core/ui/src/main/res/drawable/img_fantom_22.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#13B5EC"
|
||||
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="#F8F9F9"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M11.95,8.744L14.425,7.3V10.188L11.95,8.744ZM14.425,14.931L11.125,16.856L7.825,14.931V11.563L11.125,13.488L14.425,11.563V14.931ZM7.825,7.3L10.3,8.744L7.825,10.188V7.3ZM11.538,9.431L14.012,10.875L11.538,12.319V9.431ZM10.712,12.319L8.238,10.875L10.712,9.431V12.319ZM14.012,6.613L11.125,8.262L8.238,6.613L11.125,4.894L14.012,6.613ZM7,6.338V15.344L11.125,17.681L15.25,15.344V6.338L11.125,4L7,6.338Z" />
|
||||
</vector>
|
||||
22
core/ui/src/main/res/drawable/img_gnosis_22.xml
Normal file
22
core/ui/src/main/res/drawable/img_gnosis_22.xml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#3A775B"
|
||||
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="#ffffff"
|
||||
android:pathData="M7.703,12.11C8.163,12.11 8.612,11.957 8.974,11.677L6.058,8.761C5.356,9.669 5.524,10.978 6.432,11.68C6.799,11.957 7.243,12.11 7.703,12.11Z" />
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="M16.376,10.028C16.376,9.568 16.223,9.12 15.942,8.757L13.026,11.673C13.935,12.376 15.24,12.208 15.942,11.299C16.223,10.936 16.376,10.488 16.376,10.028Z" />
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="M17.845,6.854L16.555,8.144C17.594,9.389 17.43,11.243 16.185,12.282C15.094,13.194 13.508,13.194 12.417,12.282L11,13.699L9.587,12.286C8.342,13.325 6.488,13.161 5.449,11.916C4.536,10.824 4.536,9.239 5.449,8.148L4.787,7.486L4.159,6.854C3.4,8.103 3,9.538 3,11C3,15.419 6.581,19 11,19C15.419,19 19,15.419 19,11C19.004,9.538 18.6,8.103 17.845,6.854Z" />
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="M16.787,5.478C13.74,2.282 8.679,2.163 5.482,5.209C5.389,5.299 5.299,5.389 5.213,5.478C5.015,5.688 4.828,5.905 4.652,6.133L11,12.484L17.348,6.133C17.176,5.905 16.985,5.688 16.787,5.478ZM11,4.047C12.869,4.047 14.611,4.768 15.92,6.084L11,11.004L6.08,6.084C7.389,4.768 9.131,4.047 11,4.047Z" />
|
||||
</vector>
|
||||
13
core/ui/src/main/res/drawable/img_kusama_22.xml
Normal file
13
core/ui/src/main/res/drawable/img_kusama_22.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
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="#ffffff"
|
||||
android:pathData="M17.071,7.316C16.864,7.156 16.618,6.937 16.168,6.882C15.747,6.827 15.317,7.105 15.026,7.288C14.736,7.472 14.187,8.012 13.96,8.176C13.733,8.34 13.152,8.492 12.217,9.043C11.283,9.594 7.614,11.908 7.614,11.908L8.569,11.92L4.312,14.074H4.738L4.125,14.531C4.125,14.531 4.666,14.672 5.12,14.39V14.519C5.12,14.519 10.188,12.557 11.167,13.065L10.57,13.237C10.622,13.237 11.585,13.3 11.585,13.3C11.608,13.496 11.675,13.684 11.781,13.851C11.887,14.019 12.029,14.162 12.198,14.269C12.778,14.644 12.79,14.851 12.79,14.851C12.79,14.851 12.488,14.973 12.488,15.125C12.488,15.125 12.934,14.992 13.347,15.004C13.61,15.014 13.87,15.054 14.123,15.125C14.123,15.125 14.091,14.961 13.689,14.851C13.288,14.742 12.89,14.312 12.695,14.078C12.575,13.928 12.498,13.751 12.469,13.563C12.44,13.375 12.462,13.184 12.532,13.007C12.671,12.651 13.156,12.455 14.159,11.947C15.341,11.345 15.611,10.9 15.778,10.552C15.945,10.204 16.192,9.512 16.331,9.188C16.506,8.77 16.721,8.547 16.9,8.414C17.079,8.281 17.875,7.988 17.875,7.988C17.875,7.988 17.266,7.468 17.071,7.316Z" />
|
||||
</vector>
|
||||
13
core/ui/src/main/res/drawable/img_litecoin_22.xml
Normal file
13
core/ui/src/main/res/drawable/img_litecoin_22.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#345D9D"
|
||||
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="#ffffff"
|
||||
android:pathData="M11.186,11.373L10.041,15.235H16.167C16.208,15.233 16.248,15.24 16.286,15.254C16.324,15.269 16.359,15.29 16.389,15.318C16.418,15.345 16.442,15.379 16.459,15.416C16.476,15.453 16.485,15.493 16.487,15.533V15.634L15.954,17.472C15.931,17.559 15.878,17.635 15.806,17.689C15.733,17.742 15.644,17.769 15.554,17.765H6.179L7.751,12.412L5.993,12.944L6.392,11.719L8.15,11.186L10.361,3.676C10.385,3.589 10.438,3.513 10.51,3.46C10.583,3.407 10.671,3.38 10.76,3.383H13.131C13.171,3.381 13.212,3.388 13.25,3.402C13.288,3.416 13.323,3.438 13.352,3.465C13.382,3.493 13.406,3.526 13.423,3.563C13.44,3.6 13.449,3.64 13.45,3.681V3.782L11.586,10.121L13.344,9.588L12.971,10.867L11.186,11.373Z" />
|
||||
</vector>
|
||||
14
core/ui/src/main/res/drawable/img_optimism_22.xml
Normal file
14
core/ui/src/main/res/drawable/img_optimism_22.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#FF0420"
|
||||
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="#ffffff"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M4.044,14.476C4.615,14.896 5.347,15.106 6.24,15.106C7.321,15.106 8.184,14.854 8.829,14.352C9.475,13.841 9.929,13.072 10.191,12.044C10.349,11.413 10.484,10.764 10.597,10.096C10.634,9.856 10.653,9.657 10.653,9.499C10.653,8.974 10.522,8.524 10.259,8.148C9.996,7.766 9.636,7.48 9.178,7.293C8.72,7.098 8.202,7 7.624,7C5.5,7 4.183,8.032 3.673,10.096C3.493,10.854 3.354,11.503 3.256,12.044C3.219,12.284 3.2,12.486 3.2,12.652C3.2,13.44 3.481,14.048 4.044,14.476ZM7.467,13.113C7.174,13.361 6.818,13.485 6.397,13.485C5.677,13.485 5.317,13.139 5.317,12.449C5.317,12.284 5.332,12.126 5.362,11.976C5.497,11.248 5.632,10.633 5.767,10.13C5.894,9.619 6.105,9.24 6.397,8.993C6.698,8.745 7.058,8.621 7.478,8.621C8.191,8.621 8.548,8.963 8.548,9.646C8.548,9.811 8.533,9.972 8.503,10.13C8.413,10.655 8.281,11.271 8.109,11.976C7.981,12.486 7.767,12.866 7.467,13.113ZM10.978,14.915C11.023,14.967 11.087,14.993 11.17,14.993H12.701C12.776,14.993 12.847,14.967 12.915,14.915C12.982,14.862 13.024,14.795 13.039,14.712L13.557,12.246H15.076C16.06,12.246 16.833,12.04 17.396,11.627C17.966,11.214 18.345,10.576 18.533,9.713C18.578,9.511 18.6,9.315 18.6,9.128C18.6,8.475 18.345,7.976 17.835,7.63C17.332,7.285 16.664,7.113 15.831,7.113H12.836C12.761,7.113 12.69,7.139 12.622,7.191C12.555,7.244 12.513,7.311 12.498,7.394L10.945,14.712C10.93,14.787 10.941,14.854 10.978,14.915ZM15.977,10.434C15.744,10.606 15.47,10.693 15.155,10.693H13.861L14.288,8.677H15.639C15.947,8.677 16.165,8.737 16.292,8.858C16.42,8.97 16.484,9.135 16.484,9.353C16.484,9.451 16.472,9.563 16.45,9.691C16.375,10.013 16.217,10.261 15.977,10.434Z" />
|
||||
</vector>
|
||||
14
core/ui/src/main/res/drawable/img_polkadot_22.xml
Normal file
14
core/ui/src/main/res/drawable/img_polkadot_22.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#FEF2F8"
|
||||
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="#E6007A"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M14.163,4.48C14.163,5.436 12.747,6.211 10.999,6.211C9.252,6.211 7.835,5.436 7.835,4.48C7.835,3.525 9.252,2.75 10.999,2.75C12.747,2.75 14.163,3.525 14.163,4.48ZM14.163,17.518C14.163,18.474 12.747,19.249 10.999,19.249C9.252,19.249 7.835,18.474 7.835,17.518C7.835,16.563 9.252,15.788 10.999,15.788C12.747,15.788 14.163,16.563 14.163,17.518ZM6.59,8.606C7.464,7.183 7.458,5.642 6.577,5.164C5.697,4.686 4.274,5.452 3.401,6.875C2.527,8.298 2.532,9.839 3.413,10.317C4.294,10.795 5.716,10.029 6.59,8.606ZM18.585,11.682C19.465,12.16 19.471,13.701 18.597,15.124C17.723,16.547 16.301,17.313 15.421,16.836C14.541,16.358 14.536,14.817 15.41,13.394C16.283,11.971 17.705,11.205 18.585,11.682ZM6.578,16.835C7.458,16.357 7.464,14.816 6.59,13.393C5.717,11.97 4.294,11.204 3.414,11.682C2.533,12.16 2.527,13.701 3.401,15.124C4.275,16.547 5.697,17.313 6.578,16.835ZM18.597,6.876C19.471,8.299 19.466,9.839 18.586,10.317C17.706,10.795 16.284,10.029 15.41,8.606C14.536,7.183 14.542,5.642 15.422,5.164C16.302,4.686 17.724,5.453 18.597,6.876Z" />
|
||||
</vector>
|
||||
13
core/ui/src/main/res/drawable/img_rsk_22.xml
Normal file
13
core/ui/src/main/res/drawable/img_rsk_22.xml
Normal file
File diff suppressed because one or more lines are too long
40
core/ui/src/main/res/drawable/img_solana_22.xml
Normal file
40
core/ui/src/main/res/drawable/img_solana_22.xml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
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="M16.97,14.173L14.979,16.35C14.935,16.397 14.883,16.435 14.825,16.461C14.766,16.487 14.704,16.5 14.64,16.5H5.199C5.154,16.5 5.11,16.487 5.072,16.461C5.034,16.436 5.005,16.4 4.987,16.358C4.969,16.316 4.963,16.27 4.971,16.224C4.979,16.179 4.999,16.137 5.03,16.104L7.023,13.926C7.066,13.879 7.118,13.841 7.176,13.815C7.234,13.79 7.297,13.776 7.36,13.776H16.801C16.846,13.776 16.89,13.79 16.928,13.815C16.965,13.84 16.995,13.876 17.013,13.918C17.031,13.96 17.037,14.007 17.029,14.052C17.021,14.097 17.001,14.139 16.97,14.173ZM14.979,9.788C14.935,9.741 14.883,9.703 14.825,9.677C14.766,9.651 14.704,9.638 14.64,9.638H5.199C5.154,9.638 5.11,9.652 5.072,9.677C5.034,9.702 5.005,9.738 4.987,9.78C4.969,9.822 4.963,9.869 4.971,9.914C4.979,9.959 4.999,10.001 5.03,10.035L7.023,12.212C7.066,12.259 7.118,12.297 7.176,12.323C7.234,12.348 7.297,12.362 7.36,12.362H16.801C16.846,12.362 16.89,12.349 16.928,12.323C16.965,12.298 16.995,12.262 17.013,12.22C17.031,12.178 17.037,12.132 17.029,12.086C17.021,12.041 17.001,11.999 16.97,11.965L14.979,9.788ZM5.199,8.224H14.64C14.704,8.224 14.766,8.211 14.825,8.185C14.883,8.159 14.935,8.121 14.979,8.074L16.97,5.897C17.001,5.863 17.021,5.821 17.029,5.776C17.037,5.73 17.031,5.684 17.013,5.642C16.995,5.6 16.965,5.564 16.928,5.539C16.89,5.513 16.846,5.5 16.801,5.5H7.36C7.297,5.5 7.234,5.513 7.176,5.539C7.118,5.565 7.066,5.603 7.023,5.65L5.03,7.827C5,7.861 4.979,7.903 4.972,7.948C4.964,7.993 4.969,8.04 4.987,8.082C5.005,8.124 5.035,8.16 5.072,8.185C5.11,8.21 5.154,8.224 5.199,8.224Z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="16.101"
|
||||
android:endY="5.578"
|
||||
android:startX="5.986"
|
||||
android:startY="16.762"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#FF9945FF"
|
||||
android:offset="0.08" />
|
||||
<item
|
||||
android:color="#FF8752F3"
|
||||
android:offset="0.3" />
|
||||
<item
|
||||
android:color="#FF5497D5"
|
||||
android:offset="0.5" />
|
||||
<item
|
||||
android:color="#FF43B4CA"
|
||||
android:offset="0.6" />
|
||||
<item
|
||||
android:color="#FF28E0B9"
|
||||
android:offset="0.72" />
|
||||
<item
|
||||
android:color="#FF19FB9B"
|
||||
android:offset="0.97" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
</vector>
|
||||
13
core/ui/src/main/res/drawable/img_stellar_22.xml
Normal file
13
core/ui/src/main/res/drawable/img_stellar_22.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
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="#ffffff"
|
||||
android:pathData="M11.165,5.002C10.374,4.98 9.586,5.119 8.848,5.41C8.11,5.701 7.438,6.14 6.87,6.699C6.303,7.258 5.852,7.927 5.544,8.666C5.235,9.405 5.077,10.199 5.077,11.001C5.077,11.154 5.083,11.306 5.094,11.458C5.11,11.673 5.063,11.887 4.959,12.075C4.855,12.263 4.698,12.415 4.509,12.513L4,12.776V14.002L5.498,13.228L5.983,12.977L6.462,12.731L15.042,8.301L16.007,7.803L18,6.775V5.549L16.024,6.57L14.338,7.441L6.198,11.641C6.171,11.428 6.157,11.214 6.157,10.999C6.158,10.144 6.38,9.303 6.801,8.561C7.221,7.818 7.826,7.2 8.555,6.767C9.283,6.335 10.111,6.102 10.956,6.094C11.801,6.085 12.633,6.299 13.371,6.717L14.335,6.218L14.48,6.144C13.514,5.434 12.358,5.036 11.165,5.002ZM18,8.001L6.949,13.701L5.985,14.2L4,15.225V16.45L5.971,15.432L7.656,14.562L15.806,10.356C15.833,10.57 15.847,10.785 15.846,11.001C15.846,11.858 15.624,12.7 15.203,13.443C14.782,14.186 14.177,14.805 13.447,15.238C12.717,15.671 11.888,15.903 11.042,15.91C10.197,15.918 9.364,15.702 8.626,15.283L8.567,15.315L7.521,15.855C8.405,16.505 9.449,16.895 10.537,16.982C11.626,17.068 12.717,16.848 13.69,16.346C14.663,15.844 15.48,15.078 16.051,14.135C16.621,13.192 16.923,12.108 16.924,11.001C16.924,10.847 16.918,10.693 16.906,10.54C16.89,10.326 16.937,10.111 17.041,9.923C17.146,9.736 17.302,9.583 17.491,9.485L18,9.222V8.001Z" />
|
||||
</vector>
|
||||
13
core/ui/src/main/res/drawable/img_tezos_22.xml
Normal file
13
core/ui/src/main/res/drawable/img_tezos_22.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#2D7DF8"
|
||||
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="#ffffff"
|
||||
android:pathData="M11.717,17.875C10.782,17.875 10.099,17.639 9.669,17.166C9.271,16.766 9.04,16.217 9.026,15.638C9.022,15.462 9.06,15.288 9.139,15.133C9.212,14.999 9.318,14.888 9.446,14.811C9.595,14.733 9.758,14.693 9.924,14.693C10.09,14.693 10.254,14.733 10.403,14.811C10.53,14.888 10.635,14.999 10.708,15.133C10.789,15.288 10.829,15.462 10.825,15.638C10.833,15.849 10.775,16.056 10.661,16.229C10.565,16.37 10.429,16.475 10.271,16.528C10.425,16.733 10.642,16.875 10.886,16.93C11.158,17.013 11.44,17.055 11.723,17.056C12.099,17.06 12.466,16.944 12.778,16.726C13.101,16.486 13.343,16.143 13.466,15.748C13.622,15.278 13.698,14.783 13.691,14.285C13.704,13.766 13.62,13.249 13.446,12.764C13.314,12.375 13.064,12.043 12.735,11.818C12.429,11.615 12.073,11.509 11.711,11.511C11.396,11.539 11.091,11.648 10.825,11.827L10.167,12.173V11.827L13.122,7.668H9.026V11.984C9.015,12.295 9.093,12.603 9.252,12.867C9.328,12.982 9.432,13.074 9.552,13.135C9.673,13.195 9.806,13.222 9.94,13.213C10.186,13.208 10.424,13.12 10.62,12.962C10.841,12.792 11.033,12.584 11.189,12.347C11.203,12.306 11.229,12.269 11.263,12.244C11.29,12.219 11.325,12.205 11.362,12.205C11.433,12.212 11.5,12.242 11.554,12.291C11.623,12.371 11.66,12.476 11.658,12.583C11.651,12.656 11.638,12.727 11.622,12.798C11.476,13.168 11.232,13.485 10.919,13.713C10.628,13.92 10.285,14.029 9.934,14.027C9.047,14.027 8.433,13.844 8.091,13.477C7.915,13.274 7.78,13.037 7.693,12.779C7.605,12.521 7.568,12.247 7.583,11.973V7.668H5.5V6.866H7.593V5.038L7.114,4.535V4.125H8.504L9.026,4.409V6.866L14.437,6.849L14.975,7.416L11.658,10.914C11.858,10.829 12.069,10.776 12.284,10.755C12.71,10.774 13.125,10.899 13.497,11.118C13.927,11.332 14.29,11.672 14.541,12.096C14.767,12.455 14.927,12.855 15.012,13.275C15.083,13.607 15.12,13.945 15.125,14.285C15.127,14.934 14.987,15.574 14.715,16.156C14.458,16.72 14.024,17.175 13.487,17.445C12.936,17.73 12.331,17.877 11.717,17.875Z" />
|
||||
</vector>
|
||||
13
core/ui/src/main/res/drawable/img_tron_22.xml
Normal file
13
core/ui/src/main/res/drawable/img_tron_22.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#FF060A"
|
||||
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="#ffffff"
|
||||
android:pathData="M16.541,9.615C15.978,9.096 15.2,8.303 14.566,7.74L14.529,7.714C14.466,7.664 14.396,7.624 14.321,7.598C12.792,7.313 5.681,5.983 5.542,6C5.503,6.005 5.466,6.02 5.433,6.041L5.398,6.069C5.354,6.114 5.32,6.168 5.3,6.227L5.291,6.251V6.384V6.405C6.091,8.634 9.253,15.938 9.875,17.651C9.913,17.767 9.984,17.989 10.117,18H10.147C10.218,18 10.522,17.599 10.522,17.599C10.522,17.599 15.952,11.014 16.501,10.313C16.572,10.226 16.635,10.133 16.689,10.035C16.702,9.958 16.696,9.879 16.67,9.805C16.644,9.732 16.6,9.666 16.541,9.615ZM11.915,10.382L14.233,8.46L15.592,9.713L11.915,10.382ZM11.015,10.256L7.025,6.986L13.481,8.177L11.015,10.256ZM11.375,11.113L15.459,10.455L10.79,16.08L11.375,11.113ZM6.483,7.313L10.681,10.875L10.074,16.084L6.483,7.313Z" />
|
||||
</vector>
|
||||
13
core/ui/src/main/res/drawable/img_xrp_22.xml
Normal file
13
core/ui/src/main/res/drawable/img_xrp_22.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
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="#ffffff"
|
||||
android:pathData="M16.148,5.5C15.964,5.5 15.787,5.573 15.656,5.702L12.716,8.61C12.259,9.061 11.642,9.314 10.999,9.314C10.356,9.314 9.739,9.061 9.281,8.61L6.344,5.702C6.213,5.573 6.036,5.5 5.852,5.5C5.226,5.5 4.915,6.258 5.359,6.698L8.288,9.595C9.011,10.308 9.985,10.707 11,10.707C12.015,10.707 12.989,10.308 13.712,9.595L16.64,6.696C17.084,6.257 16.773,5.5 16.148,5.5ZM5.827,16.887C6.012,16.887 6.189,16.814 6.32,16.684L9.284,13.75C9.742,13.298 10.358,13.045 11.001,13.045C11.644,13.045 12.261,13.298 12.719,13.75L15.68,16.684C15.811,16.814 15.988,16.887 16.173,16.887C16.798,16.887 17.11,16.129 16.665,15.69L13.712,12.767C12.989,12.054 12.015,11.655 11,11.655C9.985,11.655 9.011,12.054 8.288,12.767L5.335,15.689C4.89,16.129 5.202,16.887 5.827,16.887Z" />
|
||||
</vector>
|
||||
|
|
@ -60,6 +60,7 @@ dependencies {
|
|||
implementation(Compose.foundation)
|
||||
implementation(Compose.material)
|
||||
implementation(Compose.uiTooling)
|
||||
implementation(Compose.coil)
|
||||
|
||||
/** Domain */
|
||||
implementation(project(":features:swap:domain"))
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
package com.tangem.feature.swap.models
|
||||
|
||||
data class SwapPermissionStateHolder(
|
||||
val currency: String,
|
||||
val amount: String,
|
||||
val walletAddress: String,
|
||||
val spenderAddress: String,
|
||||
val fee: String,
|
||||
val approveButton: ApprovePermissionButton,
|
||||
val cancelButton: CancelPermissionButton,
|
||||
)
|
||||
|
||||
data class ApprovePermissionButton(
|
||||
val enabled: Boolean,
|
||||
val loading: Boolean = false,
|
||||
val onClick: () -> Unit,
|
||||
)
|
||||
|
||||
data class CancelPermissionButton(
|
||||
val enabled: Boolean,
|
||||
val onClick: () -> Unit,
|
||||
)
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.tangem.feature.swap.models
|
||||
|
||||
data class SwapSelectTokenStateHolder(
|
||||
val tokens: List<TokenToSelect>,
|
||||
val onSearchEntered: (String) -> Unit,
|
||||
val onTokenSelected: (String) -> Unit,
|
||||
)
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package com.tangem.feature.swap.models
|
||||
|
||||
import androidx.annotation.DrawableRes
|
||||
|
||||
data class SwapStateHolder(
|
||||
val sendCardData: SwapCardData,
|
||||
val receiveCardData: SwapCardData,
|
||||
val networkCurrency: String,
|
||||
val fee: FeeState = FeeState.Loaded(),
|
||||
val warnings: List<SwapWarning> = emptyList(),
|
||||
|
||||
val permissionState: SwapPermissionStateHolder? = null,
|
||||
val successState: SwapSuccessStateHolder? = null,
|
||||
val selectTokenState: SwapSelectTokenStateHolder? = null,
|
||||
|
||||
val swapButton: SwapButton,
|
||||
|
||||
val onRefresh: () -> Unit,
|
||||
val onBackClicked: () -> Unit,
|
||||
val onChangeCardsClicked: () -> Unit,
|
||||
val onSelectTokenClick: (() -> Unit)? = null,
|
||||
val onSuccess: (() -> Unit)? = null,
|
||||
)
|
||||
|
||||
data class TokenToSelect(
|
||||
val id: String,
|
||||
val name: String,
|
||||
val symbol: String,
|
||||
val addedTokenBalanceData: TokenBalanceData? = null,
|
||||
)
|
||||
|
||||
data class TokenBalanceData(
|
||||
val amount: String?,
|
||||
val amountEquivalent: String?,
|
||||
)
|
||||
|
||||
data class SwapCardData(
|
||||
val type: TransactionCardType,
|
||||
val amount: String?,
|
||||
val amountEquivalent: String?,
|
||||
val tokenIconUrl: String,
|
||||
val tokenCurrency: String,
|
||||
@DrawableRes val networkIconRes: Int? = null,
|
||||
val canSelectAnotherToken: Boolean = false,
|
||||
)
|
||||
|
||||
data class SwapButton(
|
||||
val enabled: Boolean,
|
||||
val loading: Boolean = false,
|
||||
val onClick: () -> Unit,
|
||||
)
|
||||
|
||||
sealed interface FeeState {
|
||||
data class Loaded(
|
||||
val fee: String = "",
|
||||
) : FeeState
|
||||
|
||||
object Loading : FeeState
|
||||
|
||||
data class NotEnoughFundsWarning(val fee: String) : FeeState
|
||||
}
|
||||
|
||||
sealed interface TransactionCardType {
|
||||
|
||||
data class SendCard(
|
||||
val balance: String,
|
||||
val permissionIsGiven: Boolean,
|
||||
) : TransactionCardType
|
||||
|
||||
data class ReceiveCard(
|
||||
val highPriceImpact: String? = null,
|
||||
) : TransactionCardType
|
||||
}
|
||||
|
||||
sealed interface SwapWarning {
|
||||
data class PermissionNeeded(val tokenCurrency: String) : SwapWarning
|
||||
// data class RateExpired(val onClick: () -> Unit) : SwapWarning
|
||||
// object HighPriceImpact : SwapWarning
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
package com.tangem.feature.swap.models
|
||||
|
||||
data class SwapSuccessStateHolder(
|
||||
val message: String,
|
||||
)
|
||||
|
|
@ -1,16 +1,21 @@
|
|||
package com.tangem.feature.swap.presentation
|
||||
|
||||
import android.os.Bundle
|
||||
import android.transition.TransitionInflater
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.compose.animation.Crossfade
|
||||
import androidx.compose.ui.platform.ComposeView
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.viewModels
|
||||
import com.tangem.feature.swap.router.SwapRouter
|
||||
import com.tangem.feature.swap.router.SwapScreen
|
||||
import com.tangem.feature.swap.ui.SwapScreen
|
||||
import com.tangem.feature.swap.ui.SwapSuccessScreen
|
||||
import com.tangem.feature.swap.viewmodels.SwapViewModel
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import java.lang.ref.WeakReference
|
||||
|
||||
@AndroidEntryPoint
|
||||
class SwapFragment : Fragment() {
|
||||
|
|
@ -19,10 +24,24 @@ class SwapFragment : Fragment() {
|
|||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
||||
activity?.window?.let { WindowCompat.setDecorFitsSystemWindows(it, true) }
|
||||
viewModel
|
||||
viewModel.setRouter(SwapRouter(fragmentManager = WeakReference(parentFragmentManager)))
|
||||
return ComposeView(inflater.context).apply {
|
||||
setContent {
|
||||
//todo add compose screen here
|
||||
Crossfade(targetState = viewModel.currentScreen) { screen ->
|
||||
when (screen) {
|
||||
SwapScreen.Main -> SwapScreen(stateHolder = viewModel.uiState)
|
||||
SwapScreen.Success -> {
|
||||
val successState = viewModel.uiState.successState
|
||||
if (successState != null) {
|
||||
SwapSuccessScreen(state = successState, viewModel.uiState.onBackClicked)
|
||||
} else {
|
||||
SwapScreen(stateHolder = viewModel.uiState)
|
||||
}
|
||||
}
|
||||
SwapScreen.SelectToken -> SwapScreen(stateHolder = viewModel.uiState)// TODO: use proper screen
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
package com.tangem.feature.swap.router
|
||||
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import java.lang.ref.WeakReference
|
||||
|
||||
internal class SwapRouter(
|
||||
private val fragmentManager: WeakReference<FragmentManager>,
|
||||
) {
|
||||
|
||||
var currentScreen by mutableStateOf(SwapScreen.Main)
|
||||
private set
|
||||
|
||||
fun openScreen(screen: SwapScreen) {
|
||||
currentScreen = screen
|
||||
}
|
||||
|
||||
fun back() {
|
||||
if (currentScreen == SwapScreen.SelectToken) {
|
||||
currentScreen = SwapScreen.Main
|
||||
} else {
|
||||
fragmentManager.get()?.popBackStack()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum class SwapScreen {
|
||||
Main, Success, SelectToken
|
||||
}
|
||||
|
|
@ -0,0 +1,219 @@
|
|||
package com.tangem.feature.swap.ui
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material.Divider
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.tangem.core.ui.components.PrimaryButtonIconRight
|
||||
import com.tangem.core.ui.components.SecondaryButton
|
||||
import com.tangem.core.ui.components.SpacerH10
|
||||
import com.tangem.core.ui.components.SpacerH12
|
||||
import com.tangem.core.ui.components.SpacerH16
|
||||
import com.tangem.core.ui.components.SpacerH28
|
||||
import com.tangem.core.ui.components.SpacerH32
|
||||
import com.tangem.core.ui.components.atoms.Hand
|
||||
import com.tangem.core.ui.res.TangemTheme
|
||||
import com.tangem.feature.swap.models.ApprovePermissionButton
|
||||
import com.tangem.feature.swap.models.CancelPermissionButton
|
||||
import com.tangem.feature.swap.models.SwapPermissionStateHolder
|
||||
import com.tangem.feature.swap.presentation.R
|
||||
|
||||
@Composable
|
||||
fun SwapPermissionBottomSheetContent(
|
||||
data: SwapPermissionStateHolder,
|
||||
onCancel: () -> Unit,
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.background(color = TangemTheme.colors.background.primary)
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = TangemTheme.dimens.spacing16),
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
) {
|
||||
Hand()
|
||||
|
||||
SpacerH10()
|
||||
|
||||
Text(
|
||||
text = stringResource(id = R.string.swapping_permission_header),
|
||||
color = TangemTheme.colors.text.primary1,
|
||||
style = TangemTheme.typography.subtitle1,
|
||||
)
|
||||
|
||||
SpacerH10()
|
||||
|
||||
Text(
|
||||
text = stringResource(id = R.string.swapping_permission_subheader, data.currency),
|
||||
color = TangemTheme.colors.text.secondary,
|
||||
style = TangemTheme.typography.body2,
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier.padding(horizontal = TangemTheme.dimens.spacing8),
|
||||
)
|
||||
|
||||
SpacerH16()
|
||||
|
||||
ApprovalBottomSheetInfo(
|
||||
currency = data.currency,
|
||||
amount = data.amount,
|
||||
walletAddress = data.walletAddress,
|
||||
spenderAddress = data.spenderAddress,
|
||||
fee = data.fee,
|
||||
)
|
||||
|
||||
SpacerH28()
|
||||
|
||||
PrimaryButtonIconRight(
|
||||
text = stringResource(id = R.string.swapping_permission_buttons_approve),
|
||||
icon = painterResource(id = R.drawable.ic_tangem_24),
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
onClick = data.approveButton.onClick,
|
||||
)
|
||||
|
||||
SpacerH12()
|
||||
|
||||
SecondaryButton(
|
||||
text = stringResource(id = R.string.common_cancel),
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
) {
|
||||
data.cancelButton.onClick()
|
||||
onCancel()
|
||||
}
|
||||
|
||||
SpacerH32()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun ApprovalBottomSheetInfo(
|
||||
currency: String, amount: String, walletAddress: String, spenderAddress: String, fee: String,
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.background(color = TangemTheme.colors.background.primary)
|
||||
.fillMaxWidth()
|
||||
.padding(
|
||||
start = TangemTheme.dimens.spacing12,
|
||||
end = TangemTheme.dimens.spacing16,
|
||||
),
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
) {
|
||||
|
||||
AmountItem(currency = currency, amount = amount)
|
||||
DividerBottomSheet()
|
||||
WalletAddressItem(walletAddress = walletAddress)
|
||||
DividerBottomSheet()
|
||||
SpenderItem(spenderAddress = spenderAddress)
|
||||
DividerBottomSheet()
|
||||
FeeItem(fee = fee)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun DividerBottomSheet() {
|
||||
Divider(
|
||||
color = TangemTheme.colors.stroke.primary,
|
||||
thickness = TangemTheme.dimens.size0_5,
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun InformationItem(subtitle: String, value: String) {
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(TangemTheme.dimens.spacing16),
|
||||
) {
|
||||
|
||||
Text(
|
||||
text = subtitle,
|
||||
color = TangemTheme.colors.text.primary1,
|
||||
style = TangemTheme.typography.subtitle1,
|
||||
maxLines = 1,
|
||||
)
|
||||
|
||||
SpacerH16()
|
||||
|
||||
Text(
|
||||
text = value,
|
||||
color = TangemTheme.colors.text.tertiary,
|
||||
style = TangemTheme.typography.body2,
|
||||
maxLines = 1,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun AmountItem(currency: String, amount: String) {
|
||||
InformationItem(
|
||||
subtitle = stringResource(id = R.string.swapping_permission_rows_amount, currency),
|
||||
value = amount,
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun WalletAddressItem(walletAddress: String) {
|
||||
InformationItem(
|
||||
subtitle = stringResource(id = R.string.swapping_permission_rows_your_wallet),
|
||||
value = walletAddress,
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun SpenderItem(spenderAddress: String) {
|
||||
InformationItem(
|
||||
subtitle = stringResource(id = R.string.swapping_permission_rows_spender),
|
||||
value = spenderAddress,
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun FeeItem(fee: String) {
|
||||
InformationItem(
|
||||
subtitle = stringResource(id = R.string.send_fee_label),
|
||||
value = fee,
|
||||
)
|
||||
}
|
||||
|
||||
// region preview
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
fun Preview_AgreementBottomSheet_InLightTheme() {
|
||||
TangemTheme(isDark = false) {
|
||||
SwapPermissionBottomSheetContent(data = previewData) {}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
fun Preview_AgreementBottomSheet_InDarkTheme() {
|
||||
TangemTheme(isDark = true) {
|
||||
SwapPermissionBottomSheetContent(data = previewData) {}
|
||||
}
|
||||
}
|
||||
|
||||
private val previewData = SwapPermissionStateHolder(
|
||||
currency = "DAI",
|
||||
amount = "∞",
|
||||
walletAddress = "",
|
||||
spenderAddress = "",
|
||||
fee = "2,14$",
|
||||
approveButton = ApprovePermissionButton(true) {},
|
||||
cancelButton = CancelPermissionButton(true) {},
|
||||
)
|
||||
|
||||
//endregion preview
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.tangem.feature.swap.ui
|
||||
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.BottomSheetScaffold
|
||||
import androidx.compose.material.BottomSheetState
|
||||
import androidx.compose.material.BottomSheetValue
|
||||
import androidx.compose.material.ExperimentalMaterialApi
|
||||
import androidx.compose.material.rememberBottomSheetScaffoldState
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.rememberCoroutineScope
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import com.tangem.core.ui.components.appbar.AppBarWithBackButton
|
||||
import com.tangem.core.ui.res.TangemTheme
|
||||
import com.tangem.feature.swap.models.SwapStateHolder
|
||||
import com.tangem.feature.swap.presentation.R
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@OptIn(ExperimentalMaterialApi::class)
|
||||
@Composable
|
||||
internal fun SwapScreen(stateHolder: SwapStateHolder) {
|
||||
val coroutineScope = rememberCoroutineScope()
|
||||
val bottomSheetScaffoldState = rememberBottomSheetScaffoldState(
|
||||
bottomSheetState = BottomSheetState(BottomSheetValue.Collapsed),
|
||||
)
|
||||
|
||||
TangemTheme {
|
||||
BottomSheetScaffold(
|
||||
topBar = {
|
||||
AppBarWithBackButton(
|
||||
text = stringResource(R.string.swapping_swap),
|
||||
onBackClick = stateHolder.onBackClicked,
|
||||
iconRes = R.drawable.ic_close_24,
|
||||
)
|
||||
},
|
||||
sheetContent = {
|
||||
if (stateHolder.permissionState != null) {
|
||||
SwapPermissionBottomSheetContent(
|
||||
data = stateHolder.permissionState,
|
||||
onCancel = { coroutineScope.launch { bottomSheetScaffoldState.bottomSheetState.collapse() } },
|
||||
)
|
||||
}
|
||||
},
|
||||
scaffoldState = bottomSheetScaffoldState,
|
||||
sheetShape = RoundedCornerShape(
|
||||
topStart = TangemTheme.dimens.radius16,
|
||||
topEnd = TangemTheme.dimens.radius16,
|
||||
),
|
||||
sheetElevation = TangemTheme.dimens.elevation24,
|
||||
sheetPeekHeight = TangemTheme.dimens.size0,
|
||||
content = {
|
||||
SwapScreenContent(
|
||||
state = stateHolder,
|
||||
onPermissionWarningClick = {
|
||||
coroutineScope.launch {
|
||||
if (bottomSheetScaffoldState.bottomSheetState.isCollapsed) {
|
||||
bottomSheetScaffoldState.bottomSheetState.expand()
|
||||
} else {
|
||||
bottomSheetScaffoldState.bottomSheetState.collapse()
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,226 @@
|
|||
package com.tangem.feature.swap.ui
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material.Card
|
||||
import androidx.compose.material.ExperimentalMaterialApi
|
||||
import androidx.compose.material.Icon
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.tangem.core.ui.components.ClickableWarningCard
|
||||
import com.tangem.core.ui.components.PrimaryButtonIconRight
|
||||
import com.tangem.core.ui.components.SmallInfoCard
|
||||
import com.tangem.core.ui.components.SmallInfoCardWithWarning
|
||||
import com.tangem.core.ui.components.SpacerH16
|
||||
import com.tangem.core.ui.res.TangemTheme
|
||||
import com.tangem.feature.swap.models.FeeState
|
||||
import com.tangem.feature.swap.models.SwapButton
|
||||
import com.tangem.feature.swap.models.SwapCardData
|
||||
import com.tangem.feature.swap.models.SwapStateHolder
|
||||
import com.tangem.feature.swap.models.SwapWarning
|
||||
import com.tangem.feature.swap.models.TransactionCardType
|
||||
import com.tangem.feature.swap.presentation.R
|
||||
|
||||
@Composable
|
||||
internal fun SwapScreenContent(
|
||||
modifier: Modifier = Modifier,
|
||||
state: SwapStateHolder,
|
||||
onPermissionWarningClick: () -> Unit,
|
||||
) {
|
||||
Column(
|
||||
modifier = modifier
|
||||
.fillMaxWidth()
|
||||
.background(color = TangemTheme.colors.background.primary)
|
||||
.verticalScroll(rememberScrollState())
|
||||
.padding(
|
||||
start = TangemTheme.dimens.spacing16,
|
||||
end = TangemTheme.dimens.spacing16,
|
||||
top = TangemTheme.dimens.spacing16,
|
||||
bottom = TangemTheme.dimens.spacing32,
|
||||
),
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.spacedBy(TangemTheme.dimens.spacing16),
|
||||
) {
|
||||
|
||||
MainInfo(state)
|
||||
|
||||
FeeItem(feeState = state.fee, currency = state.networkCurrency)
|
||||
|
||||
if (state.warnings.isNotEmpty()) {
|
||||
SwapWarnings(
|
||||
warnings = state.warnings,
|
||||
onApproveWarningClick = onPermissionWarningClick,
|
||||
)
|
||||
}
|
||||
|
||||
PrimaryButtonIconRight(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
text = stringResource(id = R.string.swapping_swap),
|
||||
icon = painterResource(id = R.drawable.ic_tangem_24),
|
||||
enabled = state.swapButton.enabled,
|
||||
showProgress = state.swapButton.loading,
|
||||
onClick = state.swapButton.onClick,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalMaterialApi::class)
|
||||
@Composable
|
||||
private fun MainInfo(state: SwapStateHolder) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth(),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
Column {
|
||||
TransactionCard(
|
||||
type = state.sendCardData.type,
|
||||
amount = state.sendCardData.amount,
|
||||
amountEquivalent = state.sendCardData.amountEquivalent,
|
||||
tokenIconUrl = state.sendCardData.tokenIconUrl,
|
||||
tokenCurrency = state.sendCardData.tokenCurrency,
|
||||
networkIconRes = state.sendCardData.networkIconRes,
|
||||
onChangeTokenClick = if (state.sendCardData.canSelectAnotherToken) state.onSelectTokenClick else null,
|
||||
)
|
||||
SpacerH16()
|
||||
TransactionCard(
|
||||
type = state.receiveCardData.type,
|
||||
amount = state.receiveCardData.amount,
|
||||
amountEquivalent = state.receiveCardData.amountEquivalent,
|
||||
tokenIconUrl = state.receiveCardData.tokenIconUrl,
|
||||
tokenCurrency = state.receiveCardData.tokenCurrency,
|
||||
networkIconRes = state.receiveCardData.networkIconRes,
|
||||
onChangeTokenClick = if (state.receiveCardData.canSelectAnotherToken) state.onSelectTokenClick else null,
|
||||
)
|
||||
}
|
||||
Card(
|
||||
elevation = TangemTheme.dimens.elevation3,
|
||||
shape = CircleShape,
|
||||
backgroundColor = TangemTheme.colors.background.plain,
|
||||
contentColor = TangemTheme.colors.text.primary1,
|
||||
modifier = Modifier
|
||||
.size(TangemTheme.dimens.size48),
|
||||
onClick = state.onChangeCardsClicked,
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = com.tangem.core.ui.R.drawable.ic_exchange_vertical_24),
|
||||
contentDescription = null,
|
||||
tint = TangemTheme.colors.text.primary1,
|
||||
modifier = Modifier
|
||||
.padding(TangemTheme.dimens.spacing12),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun FeeItem(feeState: FeeState, currency: String) {
|
||||
|
||||
val titleString = stringResource(id = R.string.send_fee_label)
|
||||
when (feeState) {
|
||||
is FeeState.Loaded -> {
|
||||
SmallInfoCard(startText = titleString, endText = feeState.fee, isLoading = false)
|
||||
}
|
||||
FeeState.Loading -> {
|
||||
SmallInfoCard(startText = titleString, endText = "", isLoading = true)
|
||||
}
|
||||
is FeeState.NotEnoughFundsWarning -> {
|
||||
SmallInfoCardWithWarning(
|
||||
startText = titleString,
|
||||
endText = feeState.fee,
|
||||
warningText = stringResource(id = R.string.token_details_send_blocked_fee_format, currency),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun SwapWarnings(
|
||||
warnings: List<SwapWarning>, onApproveWarningClick: () -> Unit,
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.background(color = MaterialTheme.colors.primary)
|
||||
.fillMaxWidth(),
|
||||
) {
|
||||
warnings.forEach { warning ->
|
||||
when (warning) {
|
||||
// SwapWarning.HighPriceImpact -> {
|
||||
// WarningCard(title = stringResource(id = R.string.), description = stringResource(id = R.string.))
|
||||
// }
|
||||
is SwapWarning.PermissionNeeded -> {
|
||||
ClickableWarningCard(
|
||||
title = stringResource(id = R.string.swapping_permission_header),
|
||||
description = stringResource(
|
||||
id = R.string.swapping_permission_subheader,
|
||||
warning.tokenCurrency,
|
||||
),
|
||||
onClick = onApproveWarningClick,
|
||||
)
|
||||
}
|
||||
// is SwapWarning.RateExpired -> {
|
||||
// RefreshableWaringCard(
|
||||
// title = stringResource(id = R.string.),
|
||||
// description = stringResource(id = R.string.),
|
||||
// onClick = warning.onClick,
|
||||
// )
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// region preview
|
||||
|
||||
private val sendCard = SwapCardData(
|
||||
type = TransactionCardType.SendCard("123", false),
|
||||
amount = "1 000 000",
|
||||
amountEquivalent = "1 000 000",
|
||||
tokenIconUrl = "",
|
||||
tokenCurrency = "DAI",
|
||||
networkIconRes = R.drawable.img_polygon_22,
|
||||
canSelectAnotherToken = false,
|
||||
)
|
||||
|
||||
private val receiveCard = SwapCardData(
|
||||
type = TransactionCardType.ReceiveCard(),
|
||||
amount = "1 000 000",
|
||||
amountEquivalent = "1 000 000",
|
||||
tokenIconUrl = "",
|
||||
tokenCurrency = "DAI",
|
||||
networkIconRes = R.drawable.img_polygon_22,
|
||||
canSelectAnotherToken = true,
|
||||
)
|
||||
|
||||
private val state = SwapStateHolder(
|
||||
sendCardData = sendCard,
|
||||
receiveCardData = receiveCard,
|
||||
fee = FeeState.Loaded(fee = "0.155 MATIC (0.14 $)"),
|
||||
warnings = emptyList(),
|
||||
networkCurrency = "MATIC",
|
||||
swapButton = SwapButton(enabled = true, loading = false, onClick = {}),
|
||||
onRefresh = {}, onBackClicked = {}, onChangeCardsClicked = {},
|
||||
)
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
fun SwapScreenContentPreview() {
|
||||
TangemTheme(isDark = false) {
|
||||
SwapScreenContent(state = state) {}
|
||||
}
|
||||
}
|
||||
|
||||
// endregion preview
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.tangem.feature.swap.ui
|
||||
|
||||
import androidx.compose.material.Scaffold
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import com.tangem.core.ui.components.SuccessScreenContent
|
||||
import com.tangem.core.ui.components.appbar.AppBarWithBackButton
|
||||
import com.tangem.core.ui.res.TangemTheme
|
||||
import com.tangem.feature.swap.models.SwapSuccessStateHolder
|
||||
import com.tangem.feature.swap.presentation.R
|
||||
|
||||
@Composable
|
||||
fun SwapSuccessScreen(state: SwapSuccessStateHolder, onBack: () -> Unit) {
|
||||
TangemTheme {
|
||||
Scaffold(
|
||||
content = {
|
||||
SuccessScreenContent(
|
||||
successMessage = state.message,
|
||||
onButtonClick = onBack,
|
||||
)
|
||||
},
|
||||
topBar = {
|
||||
AppBarWithBackButton(
|
||||
text = stringResource(R.string.swapping_swap),
|
||||
onBackClick = onBack,
|
||||
iconRes = R.drawable.ic_close_24,
|
||||
)
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,378 @@
|
|||
package com.tangem.feature.swap.ui
|
||||
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.defaultMinSize
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.Card
|
||||
import androidx.compose.material.ExperimentalMaterialApi
|
||||
import androidx.compose.material.Icon
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.dimensionResource
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import coil.compose.SubcomposeAsyncImage
|
||||
import coil.request.ImageRequest
|
||||
import com.tangem.core.ui.R
|
||||
import com.tangem.core.ui.components.CurrencyPlaceholderIcon
|
||||
import com.tangem.core.ui.components.FontSizeRange
|
||||
import com.tangem.core.ui.components.ResizableText
|
||||
import com.tangem.core.ui.components.SpacerH4
|
||||
import com.tangem.core.ui.components.SpacerW12
|
||||
import com.tangem.core.ui.res.TangemTheme
|
||||
import com.tangem.feature.swap.models.TransactionCardType
|
||||
import com.valentinilk.shimmer.shimmer
|
||||
|
||||
@OptIn(ExperimentalMaterialApi::class)
|
||||
@Composable
|
||||
fun TransactionCard(
|
||||
type: TransactionCardType,
|
||||
amount: String?,
|
||||
amountEquivalent: String?,
|
||||
tokenIconUrl: String,
|
||||
tokenCurrency: String,
|
||||
@DrawableRes networkIconRes: Int? = null,
|
||||
onChangeTokenClick: (() -> Unit)? = null,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
Card(
|
||||
modifier = modifier,
|
||||
shape = RoundedCornerShape(TangemTheme.dimens.radius12),
|
||||
backgroundColor = TangemTheme.colors.background.primary,
|
||||
elevation = TangemTheme.dimens.elevation2,
|
||||
onClick = onChangeTokenClick ?: {},
|
||||
enabled = onChangeTokenClick != null,
|
||||
) {
|
||||
Box(modifier = Modifier.fillMaxSize()) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(TangemTheme.dimens.size116),
|
||||
verticalArrangement = Arrangement.SpaceBetween,
|
||||
horizontalAlignment = Alignment.Start,
|
||||
) {
|
||||
|
||||
Header(type = type)
|
||||
|
||||
Content(
|
||||
type = type,
|
||||
amount = amount,
|
||||
amountEquivalent = amountEquivalent,
|
||||
)
|
||||
}
|
||||
|
||||
Box(modifier = Modifier.align(Alignment.BottomEnd)) {
|
||||
Token(
|
||||
tokenIconUrl = tokenIconUrl,
|
||||
tokenCurrency = tokenCurrency,
|
||||
networkIconRes = networkIconRes,
|
||||
)
|
||||
}
|
||||
|
||||
if (onChangeTokenClick != null) {
|
||||
Box(modifier = Modifier.align(Alignment.CenterEnd)) {
|
||||
ChangeTokenSelector()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun Header(
|
||||
type: TransactionCardType,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
Row(
|
||||
modifier = modifier
|
||||
.fillMaxWidth()
|
||||
.padding(
|
||||
bottom = dimensionResource(id = R.dimen.spacing8),
|
||||
start = TangemTheme.dimens.spacing16,
|
||||
end = TangemTheme.dimens.spacing16,
|
||||
),
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
val title = when (type) {
|
||||
is TransactionCardType.ReceiveCard -> R.string.exchange_receive_view_header
|
||||
is TransactionCardType.SendCard -> R.string.exchange_send_view_header
|
||||
}
|
||||
Text(
|
||||
text = stringResource(id = title),
|
||||
color = TangemTheme.colors.text.tertiary,
|
||||
maxLines = 1,
|
||||
style = MaterialTheme.typography.subtitle2,
|
||||
modifier = Modifier.padding(top = TangemTheme.dimens.spacing12),
|
||||
)
|
||||
if (type is TransactionCardType.SendCard) {
|
||||
Text(
|
||||
text = stringResource(R.string.common_balance, type.balance),
|
||||
color = TangemTheme.colors.text.tertiary,
|
||||
maxLines = 1,
|
||||
style = MaterialTheme.typography.body2,
|
||||
modifier = Modifier.padding(top = TangemTheme.dimens.spacing12),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun Content(
|
||||
type: TransactionCardType,
|
||||
amount: String?,
|
||||
amountEquivalent: String?,
|
||||
) {
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.padding(
|
||||
top = TangemTheme.dimens.spacing8,
|
||||
start = TangemTheme.dimens.spacing16,
|
||||
bottom = TangemTheme.dimens.spacing16,
|
||||
),
|
||||
horizontalArrangement = Arrangement.Start,
|
||||
verticalAlignment = Alignment.Bottom,
|
||||
) {
|
||||
|
||||
if (type is TransactionCardType.SendCard && !type.permissionIsGiven) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.size(TangemTheme.dimens.size56)
|
||||
.background(
|
||||
color = TangemTheme.colors.button.secondary,
|
||||
shape = RoundedCornerShape(TangemTheme.dimens.size12),
|
||||
),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.ic_locked_24),
|
||||
contentDescription = null,
|
||||
tint = TangemTheme.colors.icon.primary1,
|
||||
)
|
||||
}
|
||||
|
||||
SpacerW12()
|
||||
}
|
||||
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.padding(
|
||||
end = TangemTheme.dimens.spacing92,
|
||||
),
|
||||
verticalArrangement = Arrangement.SpaceBetween,
|
||||
horizontalAlignment = Alignment.Start,
|
||||
) {
|
||||
|
||||
if (amount != null) {
|
||||
ResizableText(
|
||||
text = amount,
|
||||
color = TangemTheme.colors.text.primary1,
|
||||
style = TangemTheme.typography.h2,
|
||||
fontSizeRange =
|
||||
FontSizeRange(min = 16.sp, max = TangemTheme.typography.h2.fontSize),
|
||||
)
|
||||
} else {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.size(width = TangemTheme.dimens.size102, height = TangemTheme.dimens.size24)
|
||||
.shimmer()
|
||||
.background(
|
||||
color = TangemTheme.colors.button.secondary,
|
||||
shape = RoundedCornerShape(TangemTheme.dimens.radius6),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
Spacer(
|
||||
modifier = Modifier
|
||||
.size(TangemTheme.dimens.size4)
|
||||
.weight(1f),
|
||||
)
|
||||
|
||||
if (amountEquivalent != null) {
|
||||
Text(
|
||||
text = amountEquivalent,
|
||||
color = TangemTheme.colors.text.tertiary,
|
||||
maxLines = 1,
|
||||
style = TangemTheme.typography.body2,
|
||||
)
|
||||
} else {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.size(width = TangemTheme.dimens.size40, height = TangemTheme.dimens.size12)
|
||||
.shimmer()
|
||||
.background(
|
||||
color = TangemTheme.colors.button.secondary,
|
||||
shape = RoundedCornerShape(TangemTheme.dimens.radius3),
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun Token(
|
||||
tokenIconUrl: String,
|
||||
tokenCurrency: String,
|
||||
@DrawableRes networkIconRes: Int? = null,
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.padding(
|
||||
end = TangemTheme.dimens.spacing12,
|
||||
bottom = TangemTheme.dimens.spacing12,
|
||||
),
|
||||
verticalArrangement = Arrangement.Bottom,
|
||||
horizontalAlignment = Alignment.End,
|
||||
) {
|
||||
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.padding(
|
||||
end = TangemTheme.dimens.spacing16,
|
||||
)
|
||||
.size(TangemTheme.dimens.size42),
|
||||
) {
|
||||
val tokenImageModifier = Modifier
|
||||
.align(Alignment.BottomStart)
|
||||
.size(TangemTheme.dimens.size36)
|
||||
|
||||
SubcomposeAsyncImage(
|
||||
modifier = tokenImageModifier,
|
||||
model = ImageRequest.Builder(LocalContext.current)
|
||||
.data(tokenIconUrl)
|
||||
.crossfade(true)
|
||||
.build(),
|
||||
loading = { TokenImageShimmer(modifier = tokenImageModifier) },
|
||||
error = { CurrencyPlaceholderIcon(modifier = tokenImageModifier, tokenCurrency) },
|
||||
contentDescription = null,
|
||||
)
|
||||
|
||||
if (networkIconRes != null) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.align(Alignment.TopEnd)
|
||||
.size(TangemTheme.dimens.size18)
|
||||
.background(
|
||||
color = Color.White,
|
||||
shape = CircleShape,
|
||||
),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
Image(
|
||||
modifier = Modifier.padding(all = (0.5).dp),
|
||||
painter = painterResource(id = networkIconRes),
|
||||
contentDescription = null,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SpacerH4()
|
||||
|
||||
Text(
|
||||
text = tokenCurrency,
|
||||
color = TangemTheme.colors.text.primary1,
|
||||
maxLines = 1,
|
||||
style = TangemTheme.typography.subtitle2,
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier
|
||||
.defaultMinSize(minWidth = TangemTheme.dimens.size80),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun ChangeTokenSelector() {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxHeight()
|
||||
.padding(
|
||||
top = TangemTheme.dimens.spacing12,
|
||||
start = TangemTheme.dimens.spacing24,
|
||||
end = TangemTheme.dimens.spacing12,
|
||||
),
|
||||
contentAlignment = Alignment.CenterEnd,
|
||||
) {
|
||||
Icon(
|
||||
modifier = Modifier.size(TangemTheme.dimens.size20),
|
||||
painter = painterResource(id = R.drawable.ic_chevron_24),
|
||||
contentDescription = null,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun TokenImageShimmer(
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
Box(modifier = modifier.shimmer()) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.matchParentSize()
|
||||
.background(
|
||||
color = TangemTheme.colors.button.secondary,
|
||||
shape = CircleShape,
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// region preview
|
||||
|
||||
@Preview(widthDp = 328, heightDp = 116, showBackground = true)
|
||||
@Composable
|
||||
fun Preview_SwapMainCard_InLightTheme() {
|
||||
TangemTheme(isDark = false) {
|
||||
TransactionCardPreview()
|
||||
}
|
||||
}
|
||||
|
||||
@Preview(widthDp = 328, heightDp = 116, showBackground = true)
|
||||
@Composable
|
||||
fun Preview_SwapMainCard_InDarkTheme() {
|
||||
TangemTheme(isDark = true) {
|
||||
TransactionCardPreview()
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun TransactionCardPreview() {
|
||||
TransactionCard(
|
||||
type = TransactionCardType.SendCard("123", false),
|
||||
amount = "1 000 000",
|
||||
amountEquivalent = "1 000 000",
|
||||
tokenIconUrl = "",
|
||||
tokenCurrency = "DAI",
|
||||
networkIconRes = R.drawable.img_polygon_22,
|
||||
onChangeTokenClick = {},
|
||||
)
|
||||
}
|
||||
|
||||
// endregion preview
|
||||
|
|
@ -1,14 +1,31 @@
|
|||
package com.tangem.feature.swap.viewmodels
|
||||
|
||||
import android.util.Log
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.tangem.feature.swap.domain.SwapInteractor
|
||||
import com.tangem.feature.swap.domain.models.data.Currency
|
||||
import com.tangem.feature.swap.models.ApprovePermissionButton
|
||||
import com.tangem.feature.swap.models.CancelPermissionButton
|
||||
import com.tangem.feature.swap.models.FeeState
|
||||
import com.tangem.feature.swap.models.SwapButton
|
||||
import com.tangem.feature.swap.models.SwapCardData
|
||||
import com.tangem.feature.swap.models.SwapPermissionStateHolder
|
||||
import com.tangem.feature.swap.models.SwapStateHolder
|
||||
import com.tangem.feature.swap.models.SwapSuccessStateHolder
|
||||
import com.tangem.feature.swap.models.SwapWarning
|
||||
import com.tangem.feature.swap.models.TransactionCardType
|
||||
import com.tangem.feature.swap.presentation.R
|
||||
import com.tangem.feature.swap.router.SwapRouter
|
||||
import com.tangem.feature.swap.router.SwapScreen
|
||||
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import kotlinx.coroutines.launch
|
||||
import javax.inject.Inject
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
@HiltViewModel
|
||||
internal class SwapViewModel @Inject constructor(
|
||||
|
|
@ -16,6 +33,27 @@ internal class SwapViewModel @Inject constructor(
|
|||
private val dispatchers: CoroutineDispatcherProvider,
|
||||
) : ViewModel() {
|
||||
|
||||
var uiState: SwapStateHolder by mutableStateOf(createInitialUiState())
|
||||
private set
|
||||
|
||||
private var swapRouter: SwapRouter by Delegates.notNull()
|
||||
|
||||
var currentScreen = SwapScreen.Main
|
||||
get() = swapRouter.currentScreen
|
||||
|
||||
fun setRouter(router: SwapRouter) {
|
||||
swapRouter = router
|
||||
uiState = uiState.copy(
|
||||
onBackClicked = router::back,
|
||||
onSelectTokenClick = { router.openScreen(SwapScreen.Success) },
|
||||
onSuccess = { router.openScreen(SwapScreen.Success) },
|
||||
)
|
||||
}
|
||||
|
||||
private fun createInitialUiState(): SwapStateHolder { // TODO: create using real state
|
||||
return createTestUiState()
|
||||
}
|
||||
|
||||
// region temp for test
|
||||
init {
|
||||
viewModelScope.launch {
|
||||
|
|
@ -39,5 +77,48 @@ internal class SwapViewModel @Inject constructor(
|
|||
"1",
|
||||
)
|
||||
}
|
||||
|
||||
private fun createTestUiState(): SwapStateHolder {
|
||||
val sendCard = SwapCardData(
|
||||
type = TransactionCardType.SendCard("123", false),
|
||||
amount = "1 000 000 000 000 000 000",
|
||||
amountEquivalent = "1 000 000 000 000 000 000",
|
||||
tokenIconUrl = "",
|
||||
tokenCurrency = "DAI",
|
||||
networkIconRes = R.drawable.img_polygon_22,
|
||||
)
|
||||
|
||||
val receiveCard = SwapCardData(
|
||||
type = TransactionCardType.ReceiveCard(),
|
||||
amount = "1 000 000",
|
||||
amountEquivalent = "1 000 000",
|
||||
tokenIconUrl = "",
|
||||
tokenCurrency = "DAI",
|
||||
networkIconRes = R.drawable.img_polygon_22,
|
||||
canSelectAnotherToken = true,
|
||||
)
|
||||
|
||||
val permissionState = SwapPermissionStateHolder(
|
||||
currency = "DAI",
|
||||
amount = "∞",
|
||||
walletAddress = "",
|
||||
spenderAddress = "",
|
||||
fee = "2,14$",
|
||||
approveButton = ApprovePermissionButton(true) {},
|
||||
cancelButton = CancelPermissionButton(true) {},
|
||||
)
|
||||
|
||||
return SwapStateHolder(
|
||||
sendCardData = sendCard,
|
||||
receiveCardData = receiveCard,
|
||||
fee = FeeState.Loaded(fee = "0.155 MATIC (0.14 $)"),
|
||||
warnings = listOf(SwapWarning.PermissionNeeded("DAI")),
|
||||
networkCurrency = "MATIC",
|
||||
swapButton = SwapButton(enabled = true, loading = false, onClick = {}),
|
||||
onRefresh = {}, onBackClicked = {}, onChangeCardsClicked = {},
|
||||
permissionState = permissionState,
|
||||
successState = SwapSuccessStateHolder("Success"),
|
||||
)
|
||||
}
|
||||
// endregion temp for test
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue