diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 2db33eb80..034dcfa89 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -50,11 +50,9 @@
-
-
diff --git a/apps/wallet/instance/app/build.gradle.kts b/apps/wallet/instance/app/build.gradle.kts
index d225f7743..1a80f3b46 100644
--- a/apps/wallet/instance/app/build.gradle.kts
+++ b/apps/wallet/instance/app/build.gradle.kts
@@ -35,8 +35,6 @@ android {
}
dependencies {
- coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.2")
-
implementation(Dependence.Koin.core)
implementation(Dependence.Koin.workmanager)
implementation(Dependence.KotlinX.datetime)
diff --git a/apps/wallet/instance/app/src/main/AndroidManifest.xml b/apps/wallet/instance/app/src/main/AndroidManifest.xml
index a92911cff..bf01d8104 100644
--- a/apps/wallet/instance/app/src/main/AndroidManifest.xml
+++ b/apps/wallet/instance/app/src/main/AndroidManifest.xml
@@ -9,6 +9,14 @@
+
+
+
@@ -19,6 +27,11 @@
+
+
+
+
+
@@ -58,6 +71,103 @@
tools:targetApi="31"
tools:replace="android:allowBackup"
android:localeConfig="@xml/locales_config">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
diff --git a/apps/wallet/instance/app/src/main/ic_black_launcher-playstore.png b/apps/wallet/instance/app/src/main/ic_black_launcher-playstore.png
new file mode 100644
index 000000000..14528e04d
Binary files /dev/null and b/apps/wallet/instance/app/src/main/ic_black_launcher-playstore.png differ
diff --git a/apps/wallet/instance/app/src/main/ic_blue_launcher-playstore.png b/apps/wallet/instance/app/src/main/ic_blue_launcher-playstore.png
new file mode 100644
index 000000000..a9a57176b
Binary files /dev/null and b/apps/wallet/instance/app/src/main/ic_blue_launcher-playstore.png differ
diff --git a/apps/wallet/instance/app/src/main/ic_green_launcher-playstore.png b/apps/wallet/instance/app/src/main/ic_green_launcher-playstore.png
new file mode 100644
index 000000000..1665c0ef2
Binary files /dev/null and b/apps/wallet/instance/app/src/main/ic_green_launcher-playstore.png differ
diff --git a/apps/wallet/instance/app/src/main/ic_orange_launcher-playstore.png b/apps/wallet/instance/app/src/main/ic_orange_launcher-playstore.png
new file mode 100644
index 000000000..ee32428ee
Binary files /dev/null and b/apps/wallet/instance/app/src/main/ic_orange_launcher-playstore.png differ
diff --git a/apps/wallet/instance/app/src/main/ic_purple_launcher-playstore.png b/apps/wallet/instance/app/src/main/ic_purple_launcher-playstore.png
new file mode 100644
index 000000000..2f356bf0a
Binary files /dev/null and b/apps/wallet/instance/app/src/main/ic_purple_launcher-playstore.png differ
diff --git a/apps/wallet/instance/app/src/main/ic_red_launcher-playstore.png b/apps/wallet/instance/app/src/main/ic_red_launcher-playstore.png
new file mode 100644
index 000000000..091118fd7
Binary files /dev/null and b/apps/wallet/instance/app/src/main/ic_red_launcher-playstore.png differ
diff --git a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/AppConfig.kt b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/AppConfig.kt
index dda081b02..355ef9e93 100644
--- a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/AppConfig.kt
+++ b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/AppConfig.kt
@@ -3,6 +3,7 @@ package com.tonapps.tonkeeper
import android.app.ActivityManager
import android.content.Context
import android.os.BatteryManager
+import com.tonapps.tonkeeper.core.DevSettings
val Context.batteryLevel: Int
get() {
@@ -17,4 +18,4 @@ val Context.isLowDevice: Boolean
}
val Context.isBlurDisabled: Boolean
- get() = isLowDevice && 20 >= batteryLevel
\ No newline at end of file
+ get() = !DevSettings.blurEnabled || (isLowDevice && 20 >= batteryLevel)
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/Environment.kt b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/Environment.kt
index 1fbb6d69d..a31b33409 100644
--- a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/Environment.kt
+++ b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/Environment.kt
@@ -15,8 +15,4 @@ class Environment(context: Context) {
val resultCode = googleApiAvailability.isGooglePlayServicesAvailable(context)
resultCode == ConnectionResult.SUCCESS
}
-
- val isGooglePlayAvailable: Boolean by lazy {
- installerSource == AppInstall.Source.GOOGLE_PLAY && isGooglePlayServicesAvailable
- }
}
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/billing/BillingManager.kt b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/billing/BillingManager.kt
index 1dacb92a8..e8f2624c3 100644
--- a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/billing/BillingManager.kt
+++ b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/billing/BillingManager.kt
@@ -14,6 +14,7 @@ import com.android.billingclient.api.PurchasesUpdatedListener
import com.android.billingclient.api.QueryProductDetailsParams
import com.android.billingclient.api.QueryPurchasesParams
import com.android.billingclient.api.consumePurchase
+import com.google.firebase.crashlytics.FirebaseCrashlytics
import com.tonapps.extensions.MutableEffectFlow
import com.tonapps.extensions.filterList
import com.tonapps.wallet.data.account.entities.WalletEntity
@@ -53,6 +54,10 @@ class BillingManager(
val purchasesUpdatedFlow = _purchasesUpdatedFlow.shareIn(scope, SharingStarted.Lazily, 0).distinctUntilChanged()
override fun onPurchasesUpdated(result: BillingResult, purchases: MutableList?) {
+ if (!result.isSuccess) {
+ log("Purchases updated", BillingException(result))
+ }
+
if (result.isSuccess && !purchases.isNullOrEmpty()) {
_purchasesUpdatedFlow.tryEmit(PurchasesUpdated(result, purchases))
}
@@ -95,7 +100,6 @@ class BillingManager(
if (productIds.isEmpty()) {
return@ready emptyList()
}
-
try {
val productList = productIds.map { productId ->
QueryProductDetailsParams.Product.newBuilder()
@@ -110,15 +114,32 @@ class BillingManager(
getProductDetails(client, params)
} catch (e: Throwable) {
+ log("Failed to get products", e)
+ FirebaseCrashlytics.getInstance().recordException(e)
emptyList()
}
}
+ private fun log(msg: String, e: Throwable? = null) {
+ if (e == null) {
+ Log.d("BillingManager", msg)
+ } else {
+ Log.e("BillingManager", e.message ?: msg)
+ Log.e("BillingManager", msg, e)
+ FirebaseCrashlytics.getInstance().recordException(e)
+ }
+ }
+
private suspend fun getPendingPurchases(client: BillingClient): List {
- val params = QueryPurchasesParams.newBuilder()
- .setProductType(ProductType.INAPP)
+ try {
+ val params = QueryPurchasesParams.newBuilder()
+ .setProductType(ProductType.INAPP)
- return queryPurchases(client, params.build()).filter { !it.isAcknowledged }
+ return queryPurchases(client, params.build()).filter { !it.isAcknowledged }
+ } catch (e: Throwable) {
+ log("Failed to get pending purchases", e)
+ return emptyList()
+ }
}
private suspend fun queryPurchases(client: BillingClient, params: QueryPurchasesParams): List = suspendCancellableCoroutine { continuation ->
@@ -141,12 +162,13 @@ class BillingManager(
.build()
val billingFlowParams = BillingFlowParams.newBuilder()
- .setObfuscatedAccountId(wallet.accountId)
- .setObfuscatedProfileId(wallet.accountId)
.setProductDetailsParamsList(listOf(productDetailsParams))
.build()
- client.launchBillingFlow(activity, billingFlowParams)
+ val result = client.launchBillingFlow(activity, billingFlowParams)
+ if (result.responseCode != BillingClient.BillingResponseCode.OK) {
+ log("Failed to launch billing flow", BillingException(result))
+ }
Unit
}
diff --git a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/core/DevSettings.kt b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/core/DevSettings.kt
new file mode 100644
index 000000000..86fb5c56b
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/core/DevSettings.kt
@@ -0,0 +1,17 @@
+package com.tonapps.tonkeeper.core
+
+import com.tonapps.tonkeeper.App
+
+object DevSettings {
+
+ private val prefs = App.instance.getSharedPreferences("dev_settings", 0)
+
+ var blurEnabled: Boolean = prefs.getBoolean("blur_enabled", true)
+ set(value) {
+ if (field != value) {
+ field = value
+ prefs.edit().putBoolean("blur_enabled", value).apply()
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/core/LauncherIcon.kt b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/core/LauncherIcon.kt
new file mode 100644
index 000000000..ff7805c60
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/core/LauncherIcon.kt
@@ -0,0 +1,54 @@
+package com.tonapps.tonkeeper.core
+
+import android.content.ComponentName
+import android.content.Context
+import android.content.pm.PackageManager
+import androidx.annotation.DrawableRes
+import androidx.webkit.internal.ApiFeature.T
+import com.google.firebase.crashlytics.FirebaseCrashlytics
+import com.tonapps.tonkeeperx.R
+
+enum class LauncherIcon(val type: String, @DrawableRes val iconRes: Int) {
+ Default("Default", R.mipmap.ic_launcher),
+ Green("Green", R.mipmap.ic_green_launcher),
+ Red("Red", R.mipmap.ic_red_launcher),
+ Orange("Orange", R.mipmap.ic_orange_launcher),
+ Purple("Purple", R.mipmap.ic_purple_launcher),
+ Blue("Blue", R.mipmap.ic_blue_launcher),
+ Black("Black", R.mipmap.ic_black_launcher);
+
+ fun getComponent(context: Context): ComponentName {
+ return ComponentName(context.packageName, "com.tonapps.tonkeeper.${type}LauncherIcon")
+ }
+
+ fun isEnabled(context: Context): Boolean {
+ val enableState = context.packageManager.getComponentEnabledSetting(getComponent(context))
+ return enableState == PackageManager.COMPONENT_ENABLED_STATE_ENABLED || enableState == PackageManager.COMPONENT_ENABLED_STATE_DEFAULT && this == Default
+ }
+
+ companion object {
+
+ fun setEnable(context: Context, newIcon: LauncherIcon): Boolean {
+ try {
+ if (newIcon.isEnabled(context)) {
+ return false
+ }
+
+ val packageManager = context.packageManager
+ for (icon in entries) {
+ val component = icon.getComponent(context)
+ val newState = if (icon == newIcon) {
+ PackageManager.COMPONENT_ENABLED_STATE_ENABLED
+ } else {
+ PackageManager.COMPONENT_ENABLED_STATE_DISABLED
+ }
+ packageManager.setComponentEnabledSetting(component, newState, PackageManager.DONT_KILL_APP)
+ }
+ return true
+ } catch (e: Throwable) {
+ FirebaseCrashlytics.getInstance().recordException(e)
+ return false
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/manager/tonconnect/TonConnectManager.kt b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/manager/tonconnect/TonConnectManager.kt
index 3465f77ed..bbe2f5535 100644
--- a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/manager/tonconnect/TonConnectManager.kt
+++ b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/manager/tonconnect/TonConnectManager.kt
@@ -92,7 +92,7 @@ class TonConnectManager(
bridgeConnected.set(true)
bridgeJob = scope.launch(Dispatchers.IO) {
- val connections = dAppsRepository.getConnections().chunked(50)
+ val connections = dAppsRepository.getConnections().chunked(20)
if (connections.isEmpty()) {
return@launch
}
diff --git a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/component/coin/CoinEditText.kt b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/component/coin/CoinEditText.kt
index 110a4b403..d6c12e5e6 100644
--- a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/component/coin/CoinEditText.kt
+++ b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/component/coin/CoinEditText.kt
@@ -1,8 +1,13 @@
package com.tonapps.tonkeeper.ui.component.coin
import android.content.Context
+import android.content.res.Configuration
import android.util.AttributeSet
+import android.util.Log
+import android.util.TypedValue
+import android.view.View
import androidx.appcompat.R
+import androidx.core.widget.TextViewCompat
import androidx.core.widget.doAfterTextChanged
import com.tonapps.icu.Coins
import com.tonapps.icu.CurrencyFormatter
@@ -13,9 +18,12 @@ import com.tonapps.tonkeeper.ui.component.coin.format.CoinFormattingFilter
import com.tonapps.tonkeeper.ui.component.coin.format.CoinFormattingTextWatcher
import uikit.extensions.dp
import uikit.extensions.replaceAll
+import uikit.extensions.scale
import uikit.extensions.setRightDrawable
+import uikit.extensions.sp
import uikit.widget.input.InputTextView
import java.math.BigDecimal
+import kotlin.properties.Delegates
class CoinEditText @JvmOverloads constructor(
context: Context,
@@ -26,6 +34,17 @@ class CoinEditText @JvmOverloads constructor(
private val suffixDrawable = SuffixDrawable(context)
private lateinit var formattingConfig: CoinFormattingConfig
+ private val initTextSize: Float by lazy { textSize }
+ private var initMeasuredHeight: Int = 0
+ private val availableWidth: Float by lazy {
+ val parentView = parent as? View ?: return@lazy 0f
+ val parentWidth = parentView.width - parentView.paddingStart - parentView.paddingEnd
+ val suffixWidth = suffixDrawable.intrinsicWidth + compoundDrawablePadding
+ (parentWidth - suffixWidth) * 0.6f
+ }
+
+ private var isAdjustingTextSize = false
+ private val minTextSize = 12f.sp
var doOnValueChange: ((Double) -> Unit)? = null
@@ -33,23 +52,64 @@ class CoinEditText @JvmOverloads constructor(
get() = suffixDrawable.text
set(value) {
suffixDrawable.text = value
+ updatePadding()
invalidate()
}
init {
- setMaxLength(24)
+ setMaxLength(18)
setRightDrawable(suffixDrawable)
- compoundDrawablePadding = 38.dp
+ compoundDrawablePadding = 8.dp
setDecimals(9)
doAfterTextChanged {
val value = getValue()
doOnValueChange?.invoke(value)
+ adjustTextSize()
}
}
val decimals: Int
get() = formattingConfig.decimals
+ private fun adjustTextSize() {
+ if (isAdjustingTextSize) return
+ isAdjustingTextSize = true
+
+ try {
+ val textStr = text.toString()
+ if (textStr.isEmpty()) return
+
+ val maxTextSize = initTextSize
+ val paint = paint
+ val availableWidth = this.availableWidth
+
+ var low = minTextSize
+ var high = maxTextSize
+ var bestSize = low
+
+ while (low <= high) {
+ val midSize = (low + high) / 2f
+ paint.textSize = midSize
+ val textWidth = paint.measureText(textStr)
+
+ if (textWidth <= availableWidth) {
+ bestSize = midSize
+ low = midSize + 0.5f
+ } else {
+ high = midSize - 0.5f
+ }
+ }
+
+ // Only set the text size if it has changed
+ if (textSize != bestSize) {
+ setTextSize(TypedValue.COMPLEX_UNIT_PX, bestSize)
+ suffixDrawable.textSize = bestSize
+ }
+ } finally {
+ isAdjustingTextSize = false
+ }
+ }
+
fun setDecimals(decimals: Int) {
formattingConfig = CoinFormattingConfig(decimals = decimals)
setFormattingTextWatcher(CoinFormattingTextWatcher(formattingConfig))
@@ -71,19 +131,45 @@ class CoinEditText @JvmOverloads constructor(
} else {
editable.replaceAll(value.toString().removeSuffix(".0"))
}
+ adjustTextSize()
}
fun setValue(value: BigDecimal) {
setBigDecimal(value)
+ adjustTextSize()
}
fun clear() {
text?.clear()
}
+ private fun updatePadding() {
+ val suffixWidth = suffixDrawable.intrinsicWidth
+ val paddingRight = suffixWidth + compoundDrawablePadding
+ setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom)
+ if (0 >= initMeasuredHeight) {
+ initMeasuredHeight = measuredHeight
+ }
+ }
+
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
- super.onMeasure(widthMeasureSpec, heightMeasureSpec)
- val width = measuredWidth + suffixDrawable.intrinsicWidth
- setMeasuredDimension(width, measuredHeight)
+ if (initMeasuredHeight > 0) {
+ val heightMode = MeasureSpec.getMode(heightMeasureSpec)
+ val heightSize = MeasureSpec.getSize(heightMeasureSpec)
+ val height = when (heightMode) {
+ MeasureSpec.EXACTLY -> heightSize
+ MeasureSpec.AT_MOST -> heightSize.coerceAtMost(initMeasuredHeight)
+ else -> initMeasuredHeight
+ }
+ super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY))
+ } else {
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec)
+ }
+ updatePadding()
+ }
+
+ override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
+ super.onSizeChanged(w, h, oldw, oldh)
+ adjustTextSize()
}
}
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/component/coin/drawable/SuffixDrawable.kt b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/component/coin/drawable/SuffixDrawable.kt
index 28231da5e..a392c1e84 100644
--- a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/component/coin/drawable/SuffixDrawable.kt
+++ b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/component/coin/drawable/SuffixDrawable.kt
@@ -4,6 +4,7 @@ import android.content.Context
import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.PixelFormat
+import android.graphics.Rect
import android.text.TextPaint
import androidx.core.content.res.ResourcesCompat
import com.tonapps.uikit.color.textSecondaryColor
@@ -12,16 +13,25 @@ import uikit.extensions.dp
class SuffixDrawable(
context: Context,
- private val textPaint: TextPaint = TextPaint(TextPaint.ANTI_ALIAS_FLAG).apply {
+ private val textPaint: TextPaint = TextPaint(Paint.ANTI_ALIAS_FLAG).apply {
textSize = 28f.dp
typeface = ResourcesCompat.getFont(context, uikit.R.font.montserrat_semi_bold)
- textAlign = Paint.Align.RIGHT
+ textAlign = Paint.Align.LEFT
color = context.textSecondaryColor
}
-): BaseDrawable() {
+) : BaseDrawable() {
private var textWidth = 0f
private var textHeight = 0f
+ private val textBounds = Rect()
+
+ var textSize: Float
+ get() = textPaint.textSize
+ set(value) {
+ textPaint.textSize = value
+ calculateTextSize(text ?: return)
+ invalidateSelf()
+ }
var text: String? = null
set(value) {
@@ -37,16 +47,17 @@ class SuffixDrawable(
override fun draw(canvas: Canvas) {
val string = text ?: return
- val centerY = bounds.height() / 2f - textHeight / 2f
+ val centerY = bounds.height() / 2f - textBounds.centerY()
canvas.drawText(string, 0f, centerY, textPaint)
}
private fun calculateTextSize(text: String) {
- textHeight = textPaint.descent() + textPaint.ascent()
+ textPaint.getTextBounds(text, 0, text.length, textBounds)
+ textHeight = textBounds.height().toFloat()
textWidth = textPaint.measureText(text)
}
- override fun getOpacity() = PixelFormat.OPAQUE
+ override fun getOpacity() = PixelFormat.TRANSLUCENT
override fun getIntrinsicHeight() = textHeight.toInt()
diff --git a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/battery/refill/BatteryRefillViewModel.kt b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/battery/refill/BatteryRefillViewModel.kt
index d9dedc978..3b71fb0ff 100644
--- a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/battery/refill/BatteryRefillViewModel.kt
+++ b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/battery/refill/BatteryRefillViewModel.kt
@@ -94,7 +94,7 @@ class BatteryRefillViewModel(
uiItems.add(Item.Space)
}
- if (environment.isGooglePlayAvailable && !api.config.disableBatteryIapModule) {
+ if (environment.isGooglePlayServicesAvailable && !api.config.disableBatteryIapModule) {
val tonPriceInUsd =
ratesRepository.getTONRates(WalletCurrency.USD).getRate(TokenEntity.TON.address)
@@ -139,7 +139,7 @@ class BatteryRefillViewModel(
init {
viewModelScope.launch(Dispatchers.IO) {
- if (environment.isGooglePlayAvailable) {
+ if (environment.isGooglePlayServicesAvailable) {
billingManager.loadProducts(api.config.iapPackages.map { it.productId })
} else {
billingManager.setEmptyProducts()
diff --git a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/dev/DevScreen.kt b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/dev/DevScreen.kt
index 79a961085..a1c63cff9 100644
--- a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/dev/DevScreen.kt
+++ b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/dev/DevScreen.kt
@@ -2,53 +2,63 @@ package com.tonapps.tonkeeper.ui.screen.dev
import android.os.Bundle
import android.view.View
+import androidx.appcompat.widget.AppCompatTextView
+import androidx.recyclerview.widget.RecyclerView
import com.tonapps.extensions.locale
import com.tonapps.security.Security
+import com.tonapps.tonkeeper.core.DevSettings
+import com.tonapps.tonkeeper.extensions.showToast
import com.tonapps.tonkeeper.ui.base.BaseWalletScreen
import com.tonapps.tonkeeper.ui.base.ScreenContext
+import com.tonapps.tonkeeper.ui.screen.dev.list.launcher.LauncherAdapter
import com.tonapps.tonkeeper.view.TransactionDetailView
import com.tonapps.tonkeeperx.R
+import com.tonapps.uikit.list.LinearLayoutManager
import com.tonapps.uikit.list.ListCell
import org.koin.androidx.viewmodel.ext.android.viewModel
import uikit.base.BaseFragment
import uikit.widget.HeaderView
+import uikit.widget.item.ItemSwitchView
class DevScreen: BaseWalletScreen(R.layout.fragment_dev, ScreenContext.None), BaseFragment.BottomSheet {
override val viewModel: DevViewModel by viewModel()
+ private lateinit var iconsView: RecyclerView
+ private lateinit var blurView: ItemSwitchView
+
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
val headerView = view.findViewById(R.id.header)
headerView.doOnCloseClick = { finish() }
- setData(view, R.id.locale, requireContext().locale.language, ListCell.Position.FIRST)
- setData(view, R.id.android_version, "${android.os.Build.VERSION.RELEASE} (API level ${android.os.Build.VERSION.SDK_INT})")
- setData(view, R.id.device_model, android.os.Build.MODEL)
- setData(view, R.id.screen_size, "${resources.displayMetrics.widthPixels}x${resources.displayMetrics.heightPixels}")
- setData(view, R.id.device_root, Security.isDeviceRooted())
- setData(view, R.id.device_strongbox, Security.isSupportStrongBox(requireContext()))
- setData(view, R.id.device_adb, Security.isAdbEnabled(requireContext()), ListCell.Position.LAST)
- }
+ val deviceView = view.findViewById(R.id.device)
+ deviceView.text = getDeviceLines().joinToString("\n")
+
+ iconsView = view.findViewById(R.id.icons)
+ iconsView.layoutManager = LinearLayoutManager(requireContext(), RecyclerView.HORIZONTAL)
+ iconsView.adapter = LauncherAdapter()
- private fun setData(
- view: View,
- id: Int,
- data: String,
- position: ListCell.Position = ListCell.Position.MIDDLE
- ) {
- val itemView = view.findViewById(id)
- itemView.position = position
- itemView.setData(data, null)
+ blurView = view.findViewById(R.id.blur)
+ blurView.setChecked(DevSettings.blurEnabled, false)
+ blurView.doOnCheckedChanged = { isChecked, byUser ->
+ if (byUser) {
+ DevSettings.blurEnabled = isChecked
+ requireContext().showToast("Restart app to apply changes")
+ }
+ }
}
- private fun setData(
- view: View,
- id: Int,
- data: Boolean,
- position: ListCell.Position = ListCell.Position.MIDDLE
- ) {
- setData(view, id, booleanToYesOrNo(data), position)
+ private fun getDeviceLines(): List {
+ val list = mutableListOf()
+ list.add("Context locale: ${requireContext().locale.language}")
+ list.add("Android version: ${android.os.Build.VERSION.RELEASE} (API level ${android.os.Build.VERSION.SDK_INT})")
+ list.add("Device model: ${android.os.Build.MODEL}")
+ list.add("Screen size: ${resources.displayMetrics.widthPixels}x${resources.displayMetrics.heightPixels}")
+ list.add("Device rooted: ${booleanToYesOrNo(Security.isDeviceRooted())}")
+ list.add("Device strongbox: ${booleanToYesOrNo(Security.isSupportStrongBox(requireContext()))}")
+ list.add("ADB enabled: ${booleanToYesOrNo(Security.isAdbEnabled(requireContext()))}")
+ return list
}
private fun booleanToYesOrNo(value: Boolean): String {
diff --git a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/dev/list/DeleteMe.kt b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/dev/list/DeleteMe.kt
new file mode 100644
index 000000000..feb460889
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/dev/list/DeleteMe.kt
@@ -0,0 +1,2 @@
+package com.tonapps.tonkeeper.ui.screen.dev.list
+
diff --git a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/dev/list/launcher/Holder.kt b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/dev/list/launcher/Holder.kt
new file mode 100644
index 000000000..7bfde9696
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/dev/list/launcher/Holder.kt
@@ -0,0 +1,35 @@
+package com.tonapps.tonkeeper.ui.screen.dev.list.launcher
+
+import android.view.View
+import android.view.ViewGroup
+import androidx.appcompat.widget.AppCompatImageView
+import androidx.appcompat.widget.AppCompatTextView
+import com.tonapps.tonkeeperx.R
+import com.tonapps.uikit.list.BaseListHolder
+import uikit.widget.RadioView
+
+class Holder(
+ parent: ViewGroup,
+ private val callback: (View, Int) -> Unit
+): BaseListHolder- (parent, R.layout.view_launcher_icon) {
+
+ private val iconView = findViewById(R.id.icon)
+ private val titleView = findViewById(R.id.title)
+ private val radio = findViewById(R.id.radio)
+
+ init {
+ itemView.setOnClickListener { radio.toggle() }
+ }
+
+ override fun onBind(item: Item) {
+ iconView.setImageResource(item.iconRes)
+ titleView.text = item.title
+ radio.checked = item.isEnabled(context)
+ radio.doOnCheckedChanged = { checked ->
+ if (checked && !item.isEnabled(context)) {
+ callback(radio, bindingAdapterPosition)
+ }
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/dev/list/launcher/Item.kt b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/dev/list/launcher/Item.kt
new file mode 100644
index 000000000..0893607fc
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/dev/list/launcher/Item.kt
@@ -0,0 +1,20 @@
+package com.tonapps.tonkeeper.ui.screen.dev.list.launcher
+
+import android.content.Context
+import androidx.annotation.DrawableRes
+import com.tonapps.tonkeeper.core.LauncherIcon
+import com.tonapps.uikit.list.BaseListItem
+
+data class Item(val icon: LauncherIcon): BaseListItem() {
+
+ @get:DrawableRes
+ val iconRes: Int
+ get() = icon.iconRes
+
+ val title: String
+ get() = icon.type
+
+ fun isEnabled(context: Context): Boolean {
+ return icon.isEnabled(context)
+ }
+}
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/dev/list/launcher/LauncherAdapter.kt b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/dev/list/launcher/LauncherAdapter.kt
new file mode 100644
index 000000000..dca28cc4b
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/dev/list/launcher/LauncherAdapter.kt
@@ -0,0 +1,36 @@
+package com.tonapps.tonkeeper.ui.screen.dev.list.launcher
+
+import android.view.View
+import android.view.ViewGroup
+import androidx.recyclerview.widget.RecyclerView
+import com.tonapps.tonkeeper.core.LauncherIcon
+import com.tonapps.tonkeeper.extensions.showToast
+import com.tonapps.uikit.list.BaseListAdapter
+import com.tonapps.uikit.list.BaseListHolder
+import com.tonapps.uikit.list.BaseListItem
+
+class LauncherAdapter: BaseListAdapter() {
+
+ init {
+ submitList(LauncherIcon.entries.map { Item(it) })
+ }
+
+ override fun createHolder(parent: ViewGroup, viewType: Int): BaseListHolder {
+ return Holder(parent, ::enableIcon)
+ }
+
+ private fun enableIcon(view: View, position: Int) {
+ val icon = LauncherIcon.entries[position]
+ if (LauncherIcon.setEnable(view.context, icon)) {
+ view.context.showToast("Icon changed")
+ view.postOnAnimation {
+ notifyDataSetChanged()
+ }
+ }
+ }
+
+ override fun onAttachedToRecyclerView(recyclerView: RecyclerView) {
+ super.onAttachedToRecyclerView(recyclerView)
+ recyclerView.isNestedScrollingEnabled = true
+ }
+}
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/root/RootViewModel.kt b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/root/RootViewModel.kt
index 3d68cd9fe..e6e1b43df 100644
--- a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/root/RootViewModel.kt
+++ b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/root/RootViewModel.kt
@@ -185,7 +185,7 @@ class RootViewModel(
viewModelScope.launch(Dispatchers.IO) {
- if (environment.isGooglePlayAvailable) {
+ if (environment.isGooglePlayServicesAvailable) {
delay(2000)
checkAppUpdate()
}
diff --git a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/settings/main/SettingsViewModel.kt b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/settings/main/SettingsViewModel.kt
index d5ff498f2..ca365c036 100644
--- a/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/settings/main/SettingsViewModel.kt
+++ b/apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/settings/main/SettingsViewModel.kt
@@ -193,7 +193,7 @@ class SettingsViewModel(
uiItems.add(Item.Support(ListCell.Position.MIDDLE, getSupportUrl()))
uiItems.add(Item.News(ListCell.Position.MIDDLE, api.config.tonkeeperNewsUrl))
uiItems.add(Item.Contact(ListCell.Position.MIDDLE, api.config.supportLink))
- if (environment.isGooglePlayAvailable) {
+ if (environment.isGooglePlayServicesAvailable) {
uiItems.add(Item.Rate(ListCell.Position.MIDDLE))
}
uiItems.add(Item.Legal(ListCell.Position.LAST))
diff --git a/apps/wallet/instance/app/src/main/res/drawable/ic_black_launcher_foreground.xml b/apps/wallet/instance/app/src/main/res/drawable/ic_black_launcher_foreground.xml
new file mode 100644
index 000000000..d8be277bd
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/drawable/ic_black_launcher_foreground.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
diff --git a/apps/wallet/instance/app/src/main/res/drawable/ic_blue_launcher_foreground.xml b/apps/wallet/instance/app/src/main/res/drawable/ic_blue_launcher_foreground.xml
new file mode 100644
index 000000000..d8be277bd
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/drawable/ic_blue_launcher_foreground.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
diff --git a/apps/wallet/instance/app/src/main/res/drawable/ic_green_launcher_foreground.xml b/apps/wallet/instance/app/src/main/res/drawable/ic_green_launcher_foreground.xml
new file mode 100644
index 000000000..d8be277bd
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/drawable/ic_green_launcher_foreground.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
diff --git a/apps/wallet/instance/app/src/main/res/drawable/ic_orange_launcher_foreground.xml b/apps/wallet/instance/app/src/main/res/drawable/ic_orange_launcher_foreground.xml
new file mode 100644
index 000000000..d8be277bd
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/drawable/ic_orange_launcher_foreground.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
diff --git a/apps/wallet/instance/app/src/main/res/drawable/ic_purple_launcher_foreground.xml b/apps/wallet/instance/app/src/main/res/drawable/ic_purple_launcher_foreground.xml
new file mode 100644
index 000000000..d8be277bd
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/drawable/ic_purple_launcher_foreground.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
diff --git a/apps/wallet/instance/app/src/main/res/drawable/ic_red_launcher_foreground.xml b/apps/wallet/instance/app/src/main/res/drawable/ic_red_launcher_foreground.xml
new file mode 100644
index 000000000..d8be277bd
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/drawable/ic_red_launcher_foreground.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
diff --git a/apps/wallet/instance/app/src/main/res/layout/fragment_dev.xml b/apps/wallet/instance/app/src/main/res/layout/fragment_dev.xml
index 63b1b1650..7e856f1b8 100644
--- a/apps/wallet/instance/app/src/main/res/layout/fragment_dev.xml
+++ b/apps/wallet/instance/app/src/main/res/layout/fragment_dev.xml
@@ -21,54 +21,30 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:padding="@dimen/offsetMedium"
+ android:layout_marginHorizontal="@dimen/offsetMedium"
+ android:background="@drawable/bg_content"
+ android:textColor="?attr/textPrimaryColor"
+ android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
+
+
-
+
diff --git a/apps/wallet/instance/app/src/main/res/layout/fragment_stake_amount.xml b/apps/wallet/instance/app/src/main/res/layout/fragment_stake_amount.xml
index b41fd59c9..7bfdfc3a8 100644
--- a/apps/wallet/instance/app/src/main/res/layout/fragment_stake_amount.xml
+++ b/apps/wallet/instance/app/src/main/res/layout/fragment_stake_amount.xml
@@ -174,7 +174,6 @@
android:layout_gravity="bottom"
android:layout_margin="@dimen/offsetMedium"
android:textAppearance="@style/TextAppearance.Label1"
- android:textColor="?attr/textPrimaryColor"
android:enabled="false"
android:text="@string/continue_action"/>
diff --git a/apps/wallet/instance/app/src/main/res/layout/fragment_stake_confirm.xml b/apps/wallet/instance/app/src/main/res/layout/fragment_stake_confirm.xml
index 1df819a1f..3fbc5df38 100644
--- a/apps/wallet/instance/app/src/main/res/layout/fragment_stake_confirm.xml
+++ b/apps/wallet/instance/app/src/main/res/layout/fragment_stake_confirm.xml
@@ -108,7 +108,6 @@
android:layout_marginBottom="@dimen/offsetMedium"
android:enabled="false"
android:textAppearance="@style/TextAppearance.Label1"
- android:textColor="?attr/textPrimaryColor"
android:text="@string/staking_confirm"/>
diff --git a/apps/wallet/instance/app/src/main/res/layout/fragment_stake_details.xml b/apps/wallet/instance/app/src/main/res/layout/fragment_stake_details.xml
index 71678b2bb..396942019 100644
--- a/apps/wallet/instance/app/src/main/res/layout/fragment_stake_details.xml
+++ b/apps/wallet/instance/app/src/main/res/layout/fragment_stake_details.xml
@@ -118,6 +118,5 @@
android:layout_gravity="bottom"
android:layout_margin="@dimen/offsetMedium"
android:textAppearance="@style/TextAppearance.Label1"
- android:textColor="?attr/textPrimaryColor"
android:text="@string/staking_choose"/>
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/layout/fragment_unstake_amount.xml b/apps/wallet/instance/app/src/main/res/layout/fragment_unstake_amount.xml
index a89c00093..65105a469 100644
--- a/apps/wallet/instance/app/src/main/res/layout/fragment_unstake_amount.xml
+++ b/apps/wallet/instance/app/src/main/res/layout/fragment_unstake_amount.xml
@@ -112,7 +112,6 @@
android:layout_gravity="bottom"
android:layout_margin="@dimen/offsetMedium"
android:textAppearance="@style/TextAppearance.Label1"
- android:textColor="?attr/textPrimaryColor"
android:enabled="false"
android:text="@string/continue_action"/>
diff --git a/apps/wallet/instance/app/src/main/res/layout/fragment_unstake_confirm.xml b/apps/wallet/instance/app/src/main/res/layout/fragment_unstake_confirm.xml
index 40169bbc1..116c3b797 100644
--- a/apps/wallet/instance/app/src/main/res/layout/fragment_unstake_confirm.xml
+++ b/apps/wallet/instance/app/src/main/res/layout/fragment_unstake_confirm.xml
@@ -102,7 +102,6 @@
android:layout_marginBottom="@dimen/offsetMedium"
android:enabled="false"
android:textAppearance="@style/TextAppearance.Label1"
- android:textColor="?attr/textPrimaryColor"
android:text="@string/unstake_confirm"/>
diff --git a/apps/wallet/instance/app/src/main/res/layout/view_launcher_icon.xml b/apps/wallet/instance/app/src/main/res/layout/view_launcher_icon.xml
new file mode 100644
index 000000000..3b7c195a4
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/layout/view_launcher_icon.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_black_launcher.xml b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_black_launcher.xml
new file mode 100644
index 000000000..b812b180a
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_black_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_black_launcher_round.xml b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_black_launcher_round.xml
new file mode 100644
index 000000000..b812b180a
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_black_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_blue_launcher.xml b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_blue_launcher.xml
new file mode 100644
index 000000000..88faf2861
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_blue_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_blue_launcher_round.xml b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_blue_launcher_round.xml
new file mode 100644
index 000000000..88faf2861
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_blue_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_green_launcher.xml b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_green_launcher.xml
new file mode 100644
index 000000000..cf8d90537
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_green_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_green_launcher_round.xml b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_green_launcher_round.xml
new file mode 100644
index 000000000..cf8d90537
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_green_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_orange_launcher.xml b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_orange_launcher.xml
new file mode 100644
index 000000000..0da926f80
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_orange_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_orange_launcher_round.xml b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_orange_launcher_round.xml
new file mode 100644
index 000000000..0da926f80
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_orange_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_purple_launcher.xml b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_purple_launcher.xml
new file mode 100644
index 000000000..73f95212e
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_purple_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_purple_launcher_round.xml b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_purple_launcher_round.xml
new file mode 100644
index 000000000..73f95212e
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_purple_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_red_launcher.xml b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_red_launcher.xml
new file mode 100644
index 000000000..576dd6004
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_red_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_red_launcher_round.xml b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_red_launcher_round.xml
new file mode 100644
index 000000000..576dd6004
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/mipmap-anydpi-v26/ic_red_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_black_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_black_launcher.webp
new file mode 100644
index 000000000..2e327e8b8
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_black_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_black_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_black_launcher_round.webp
new file mode 100644
index 000000000..61a86ee16
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_black_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_blue_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_blue_launcher.webp
new file mode 100644
index 000000000..af1cc6b5b
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_blue_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_blue_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_blue_launcher_round.webp
new file mode 100644
index 000000000..e501ba6e5
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_blue_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_green_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_green_launcher.webp
new file mode 100644
index 000000000..b1300029b
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_green_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_green_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_green_launcher_round.webp
new file mode 100644
index 000000000..fd7697da9
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_green_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_orange_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_orange_launcher.webp
new file mode 100644
index 000000000..cfdb31330
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_orange_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_orange_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_orange_launcher_round.webp
new file mode 100644
index 000000000..b8413814e
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_orange_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_purple_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_purple_launcher.webp
new file mode 100644
index 000000000..323408fd3
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_purple_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_purple_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_purple_launcher_round.webp
new file mode 100644
index 000000000..60ab6ee47
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_purple_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_red_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_red_launcher.webp
new file mode 100644
index 000000000..366f262a0
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_red_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_red_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_red_launcher_round.webp
new file mode 100644
index 000000000..04326548e
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-hdpi/ic_red_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_black_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_black_launcher.webp
new file mode 100644
index 000000000..52b58f232
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_black_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_black_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_black_launcher_round.webp
new file mode 100644
index 000000000..12ade3af1
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_black_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_blue_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_blue_launcher.webp
new file mode 100644
index 000000000..9515254a7
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_blue_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_blue_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_blue_launcher_round.webp
new file mode 100644
index 000000000..8aacd6e83
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_blue_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_green_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_green_launcher.webp
new file mode 100644
index 000000000..9c0331f5c
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_green_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_green_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_green_launcher_round.webp
new file mode 100644
index 000000000..9321a79ba
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_green_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_orange_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_orange_launcher.webp
new file mode 100644
index 000000000..445e54ebb
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_orange_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_orange_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_orange_launcher_round.webp
new file mode 100644
index 000000000..83a9487c4
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_orange_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_purple_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_purple_launcher.webp
new file mode 100644
index 000000000..29e3b98f4
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_purple_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_purple_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_purple_launcher_round.webp
new file mode 100644
index 000000000..f3158e6ba
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_purple_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_red_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_red_launcher.webp
new file mode 100644
index 000000000..3641d2d35
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_red_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_red_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_red_launcher_round.webp
new file mode 100644
index 000000000..48106b52b
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-mdpi/ic_red_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_black_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_black_launcher.webp
new file mode 100644
index 000000000..79205f0be
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_black_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_black_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_black_launcher_round.webp
new file mode 100644
index 000000000..4267ed36e
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_black_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_blue_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_blue_launcher.webp
new file mode 100644
index 000000000..1d191a2bb
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_blue_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_blue_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_blue_launcher_round.webp
new file mode 100644
index 000000000..ffc8ff5cf
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_blue_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_green_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_green_launcher.webp
new file mode 100644
index 000000000..318372a72
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_green_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_green_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_green_launcher_round.webp
new file mode 100644
index 000000000..68d3a11c8
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_green_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_orange_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_orange_launcher.webp
new file mode 100644
index 000000000..4aa652d9b
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_orange_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_orange_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_orange_launcher_round.webp
new file mode 100644
index 000000000..2445f3218
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_orange_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_purple_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_purple_launcher.webp
new file mode 100644
index 000000000..b16e2252a
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_purple_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_purple_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_purple_launcher_round.webp
new file mode 100644
index 000000000..5c4b96527
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_purple_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_red_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_red_launcher.webp
new file mode 100644
index 000000000..110f34540
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_red_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_red_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_red_launcher_round.webp
new file mode 100644
index 000000000..3df1a5dd4
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xhdpi/ic_red_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_black_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_black_launcher.webp
new file mode 100644
index 000000000..a79739516
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_black_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_black_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_black_launcher_round.webp
new file mode 100644
index 000000000..a0e41a3da
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_black_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_blue_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_blue_launcher.webp
new file mode 100644
index 000000000..278b5d302
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_blue_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_blue_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_blue_launcher_round.webp
new file mode 100644
index 000000000..00ac5671e
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_blue_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_green_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_green_launcher.webp
new file mode 100644
index 000000000..daa1a72ae
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_green_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_green_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_green_launcher_round.webp
new file mode 100644
index 000000000..9c95f14f1
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_green_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_orange_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_orange_launcher.webp
new file mode 100644
index 000000000..cb5f0deff
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_orange_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_orange_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_orange_launcher_round.webp
new file mode 100644
index 000000000..36fb77336
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_orange_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_purple_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_purple_launcher.webp
new file mode 100644
index 000000000..598b58ad5
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_purple_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_purple_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_purple_launcher_round.webp
new file mode 100644
index 000000000..378eac820
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_purple_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_red_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_red_launcher.webp
new file mode 100644
index 000000000..7af8aadc4
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_red_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_red_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_red_launcher_round.webp
new file mode 100644
index 000000000..13b7502b9
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxhdpi/ic_red_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_black_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_black_launcher.webp
new file mode 100644
index 000000000..5b8eee179
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_black_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_black_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_black_launcher_round.webp
new file mode 100644
index 000000000..ce2739edc
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_black_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_blue_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_blue_launcher.webp
new file mode 100644
index 000000000..cca860963
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_blue_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_blue_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_blue_launcher_round.webp
new file mode 100644
index 000000000..0320e17e8
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_blue_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_green_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_green_launcher.webp
new file mode 100644
index 000000000..ece4e3b94
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_green_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_green_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_green_launcher_round.webp
new file mode 100644
index 000000000..1fd35fe91
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_green_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_orange_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_orange_launcher.webp
new file mode 100644
index 000000000..84f268c46
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_orange_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_orange_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_orange_launcher_round.webp
new file mode 100644
index 000000000..9efda2f98
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_orange_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_purple_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_purple_launcher.webp
new file mode 100644
index 000000000..8b03db5d7
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_purple_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_purple_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_purple_launcher_round.webp
new file mode 100644
index 000000000..14aa44c84
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_purple_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_red_launcher.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_red_launcher.webp
new file mode 100644
index 000000000..f8b1e2c48
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_red_launcher.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_red_launcher_round.webp b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_red_launcher_round.webp
new file mode 100644
index 000000000..2e18a795e
Binary files /dev/null and b/apps/wallet/instance/app/src/main/res/mipmap-xxxhdpi/ic_red_launcher_round.webp differ
diff --git a/apps/wallet/instance/app/src/main/res/values/ic_black_launcher_background.xml b/apps/wallet/instance/app/src/main/res/values/ic_black_launcher_background.xml
new file mode 100644
index 000000000..42b5d7fd4
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/values/ic_black_launcher_background.xml
@@ -0,0 +1,4 @@
+
+
+ #000000
+
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/values/ic_blue_launcher_background.xml b/apps/wallet/instance/app/src/main/res/values/ic_blue_launcher_background.xml
new file mode 100644
index 000000000..6d73db2b2
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/values/ic_blue_launcher_background.xml
@@ -0,0 +1,4 @@
+
+
+ #10161F
+
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/values/ic_green_launcher_background.xml b/apps/wallet/instance/app/src/main/res/values/ic_green_launcher_background.xml
new file mode 100644
index 000000000..caee64fd0
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/values/ic_green_launcher_background.xml
@@ -0,0 +1,4 @@
+
+
+ #39CC83
+
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/values/ic_orange_launcher_background.xml b/apps/wallet/instance/app/src/main/res/values/ic_orange_launcher_background.xml
new file mode 100644
index 000000000..7cb487f1a
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/values/ic_orange_launcher_background.xml
@@ -0,0 +1,4 @@
+
+
+ #F5A73B
+
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/values/ic_purple_launcher_background.xml b/apps/wallet/instance/app/src/main/res/values/ic_purple_launcher_background.xml
new file mode 100644
index 000000000..9ba5ca6d6
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/values/ic_purple_launcher_background.xml
@@ -0,0 +1,4 @@
+
+
+ #7665E5
+
\ No newline at end of file
diff --git a/apps/wallet/instance/app/src/main/res/values/ic_red_launcher_background.xml b/apps/wallet/instance/app/src/main/res/values/ic_red_launcher_background.xml
new file mode 100644
index 000000000..b8e08abf5
--- /dev/null
+++ b/apps/wallet/instance/app/src/main/res/values/ic_red_launcher_background.xml
@@ -0,0 +1,4 @@
+
+
+ #FF4766
+
\ No newline at end of file
diff --git a/apps/wallet/instance/main/build.gradle.kts b/apps/wallet/instance/main/build.gradle.kts
index 523106280..6de338294 100644
--- a/apps/wallet/instance/main/build.gradle.kts
+++ b/apps/wallet/instance/main/build.gradle.kts
@@ -56,6 +56,7 @@ android {
experimentalProperties["android.experimental.r8.dex-startup-optimization"] = true
compileOptions {
+ isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
@@ -77,6 +78,7 @@ baselineProfile {
}
dependencies {
+ coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.2")
implementation(project(Dependence.Wallet.app))
testImplementation("junit:junit:4.13.2")
diff --git a/apps/wallet/instance/x/.gitignore b/apps/wallet/instance/x/.gitignore
deleted file mode 100644
index 09f71f911..000000000
--- a/apps/wallet/instance/x/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/build
-/release
-/benchmarkRelease
\ No newline at end of file
diff --git a/apps/wallet/instance/x/build.gradle.kts b/apps/wallet/instance/x/build.gradle.kts
deleted file mode 100644
index 662dc7a53..000000000
--- a/apps/wallet/instance/x/build.gradle.kts
+++ /dev/null
@@ -1,56 +0,0 @@
-plugins {
- id("com.android.application")
- id("org.jetbrains.kotlin.android")
- id("com.google.gms.google-services")
- id("com.google.firebase.crashlytics")
- id("kotlin-parcelize")
- id("kotlinx-serialization")
- id("kotlin-kapt")
- id("androidx.baselineprofile")
-}
-
-android {
- namespace = Build.namespacePrefix("tonkeeperx")
- compileSdk = Build.compileSdkVersion
-
- defaultConfig {
- applicationId = "com.tonapps.tonkeeperx"
- minSdk = Build.minSdkVersion
- targetSdk = 34
- versionCode = 49
- versionName = "0.0.49"
- }
-
- buildFeatures {
- buildConfig = true
- }
-
- buildTypes {
- release {
- isMinifyEnabled = true
- isShrinkResources = true
- proguardFiles(
- getDefaultProguardFile("proguard-android-optimize.txt"),
- "proguard-rules.pro"
- )
- }
-
- debug {
- applicationIdSuffix = ".debug"
- versionNameSuffix = "-debug"
- }
- }
-
- compileOptions {
- sourceCompatibility = JavaVersion.VERSION_1_8
- targetCompatibility = JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = "1.8"
- }
-}
-
-dependencies {
- "baselineProfile"(project(":baselineprofile:x"))
- implementation(project(Dependence.Wallet.app))
-}
\ No newline at end of file
diff --git a/apps/wallet/instance/x/google-services.json b/apps/wallet/instance/x/google-services.json
deleted file mode 100644
index de7d7525c..000000000
--- a/apps/wallet/instance/x/google-services.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "project_info": {
- "project_number": "442467545995",
- "project_id": "tonkeeper-ios",
- "storage_bucket": "tonkeeper-ios.appspot.com"
- },
- "client": [
- {
- "client_info": {
- "mobilesdk_app_id": "1:442467545995:android:485487cc77be03a4bab58e",
- "android_client_info": {
- "package_name": "com.tonapps.tonkeeperx"
- }
- },
- "oauth_client": [],
- "api_key": [
- {
- "current_key": "AIzaSyCL1uKbSRL6-XGyOO9gaY3WxcmLxncjT2U"
- }
- ],
- "services": {
- "appinvite_service": {
- "other_platform_oauth_client": []
- }
- }
- },
- {
- "client_info": {
- "mobilesdk_app_id": "1:442467545995:android:70aa8a04105a0ed2bab58e",
- "android_client_info": {
- "package_name": "com.tonapps.tonkeeperx.debug"
- }
- },
- "oauth_client": [],
- "api_key": [
- {
- "current_key": "AIzaSyCL1uKbSRL6-XGyOO9gaY3WxcmLxncjT2U"
- }
- ],
- "services": {
- "appinvite_service": {
- "other_platform_oauth_client": []
- }
- }
- }
- ],
- "configuration_version": "1"
-}
\ No newline at end of file
diff --git a/apps/wallet/instance/x/proguard-rules.pro b/apps/wallet/instance/x/proguard-rules.pro
deleted file mode 100644
index 5faa682dc..000000000
--- a/apps/wallet/instance/x/proguard-rules.pro
+++ /dev/null
@@ -1,30 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
-
--keepattributes *Annotation*
--keepclassmembers class com.tonapps.tonkeeperx.** {
- @org.jetbrains.annotations.** ;
- @org.jetbrains.annotations.** ;
-}
-
--keep class io.tonapi.** { *; }
-
diff --git a/apps/wallet/instance/x/src/main/AndroidManifest.xml b/apps/wallet/instance/x/src/main/AndroidManifest.xml
deleted file mode 100644
index 227314eeb..000000000
--- a/apps/wallet/instance/x/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/baselineprofile/x/.gitignore b/baselineprofile/x/.gitignore
deleted file mode 100644
index 42afabfd2..000000000
--- a/baselineprofile/x/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
\ No newline at end of file
diff --git a/baselineprofile/x/build.gradle.kts b/baselineprofile/x/build.gradle.kts
deleted file mode 100644
index 29aea0d67..000000000
--- a/baselineprofile/x/build.gradle.kts
+++ /dev/null
@@ -1,33 +0,0 @@
-plugins {
- id("com.android.test")
- id("org.jetbrains.kotlin.android")
- id("androidx.baselineprofile")
-}
-
-android {
- namespace = Build.namespacePrefix("x.baselineprofile")
- compileSdk = Build.compileSdkVersion
-
- defaultConfig {
- minSdk = 28
-
- testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
- }
-
- compileOptions {
- sourceCompatibility = JavaVersion.VERSION_1_8
- targetCompatibility = JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = "1.8"
- }
-
- targetProjectPath = ":apps:wallet:instance:x"
-}
-
-dependencies {
- implementation("androidx.test.ext:junit:1.1.5")
- implementation("androidx.test.espresso:espresso-core:3.5.1")
- implementation("androidx.test.uiautomator:uiautomator:2.2.0")
- implementation("androidx.benchmark:benchmark-macro-junit4:1.2.2")
-}
\ No newline at end of file
diff --git a/baselineprofile/x/src/main/AndroidManifest.xml b/baselineprofile/x/src/main/AndroidManifest.xml
deleted file mode 100644
index 227314eeb..000000000
--- a/baselineprofile/x/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/baselineprofile/x/src/main/java/com/baselineprofile/BaselineProfileGenerator.kt b/baselineprofile/x/src/main/java/com/baselineprofile/BaselineProfileGenerator.kt
deleted file mode 100644
index ce9911142..000000000
--- a/baselineprofile/x/src/main/java/com/baselineprofile/BaselineProfileGenerator.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.baselineprofile
-
-import androidx.benchmark.macro.junit4.BaselineProfileRule
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import androidx.test.filters.LargeTest
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-
-@RunWith(AndroidJUnit4::class)
-@LargeTest
-class BaselineProfileGenerator {
-
- @get:Rule
- val rule = BaselineProfileRule()
-
- @Test
- fun generate() {
- rule.collect("com.tonapps.tonkeeperx") {
- pressHome()
- startActivityAndWait()
- }
- }
-}
\ No newline at end of file
diff --git a/baselineprofile/x/src/main/java/com/baselineprofile/StartupBenchmarks.kt b/baselineprofile/x/src/main/java/com/baselineprofile/StartupBenchmarks.kt
deleted file mode 100644
index eabd72bbc..000000000
--- a/baselineprofile/x/src/main/java/com/baselineprofile/StartupBenchmarks.kt
+++ /dev/null
@@ -1,44 +0,0 @@
-package com.baselineprofile
-
-import androidx.benchmark.macro.BaselineProfileMode
-import androidx.benchmark.macro.CompilationMode
-import androidx.benchmark.macro.StartupMode
-import androidx.benchmark.macro.StartupTimingMetric
-import androidx.benchmark.macro.junit4.MacrobenchmarkRule
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import androidx.test.filters.LargeTest
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-
-@RunWith(AndroidJUnit4::class)
-@LargeTest
-class StartupBenchmarks {
-
- @get:Rule
- val rule = MacrobenchmarkRule()
-
- @Test
- fun startupCompilationNone() =
- benchmark(CompilationMode.None())
-
- @Test
- fun startupCompilationBaselineProfiles() =
- benchmark(CompilationMode.Partial(BaselineProfileMode.Require))
-
- private fun benchmark(compilationMode: CompilationMode) {
- rule.measureRepeated(
- packageName = "com.tonapps.tonkeeperx",
- metrics = listOf(StartupTimingMetric()),
- compilationMode = compilationMode,
- startupMode = StartupMode.COLD,
- iterations = 10,
- setupBlock = {
- pressHome()
- },
- measureBlock = {
- startActivityAndWait()
- }
- )
- }
-}
\ No newline at end of file
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 8d3aefe61..9c633c6fc 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -25,7 +25,6 @@ include(":apps:signer")
include(":baselineprofile:main")
-include(":baselineprofile:x")
include(":tonapi")
@@ -53,7 +52,6 @@ include(":lib:ur")
include(":apps:wallet:instance:app")
include(":apps:wallet:instance:main")
-include(":apps:wallet:instance:x")
include(":apps:wallet:localization")
include(":apps:wallet:api")
diff --git a/ui/uikit/core/src/main/java/uikit/widget/ToastView.kt b/ui/uikit/core/src/main/java/uikit/widget/ToastView.kt
index ab2c86430..8ddd1bee6 100644
--- a/ui/uikit/core/src/main/java/uikit/widget/ToastView.kt
+++ b/ui/uikit/core/src/main/java/uikit/widget/ToastView.kt
@@ -47,7 +47,10 @@ class ToastView @JvmOverloads constructor(
private val textView: AppCompatTextView
private val animator: ValueAnimator by lazy {
- val valueAnimator = ValueAnimator.ofFloat(-measuredHeight.toFloat(), statusBarHeight + 24f.dp)
+ val startY = -height.toFloat()
+ val endY = statusBarHeight + 24f.dp
+
+ val valueAnimator = ValueAnimator.ofFloat(startY, endY)
valueAnimator.duration = 200L
valueAnimator.addListener(this@ToastView)
valueAnimator.addUpdateListener(this@ToastView)
@@ -66,17 +69,13 @@ class ToastView @JvmOverloads constructor(
textView = findViewById(R.id.toast_text)
}
- fun setText(text: CharSequence) {
- textView.text = text
- }
-
fun show(text: CharSequence, loading: Boolean, color: Int = context.backgroundContentTintColor) {
val data = createData(loading, text, color)
run(data)
}
private fun run(data: Data) {
- val cancelCurrent = currentData != null && currentData?.text == data.text && currentData?.color == data.color
+ /*val cancelCurrent = currentData != null && currentData?.text == data.text && currentData?.color == data.color
postOnAnimation {
if (cancelCurrent) {
hide()
@@ -85,6 +84,13 @@ class ToastView @JvmOverloads constructor(
} else {
dataQueue.add(data)
}
+ }*/
+ postOnAnimation {
+ if (currentData == null) {
+ currentData = data
+ } else {
+ dataQueue.add(data)
+ }
}
}
@@ -101,13 +107,13 @@ class ToastView @JvmOverloads constructor(
}
private fun nextQueue() {
- currentData = dataQueue.removeLastOrNull()
+ currentData = dataQueue.removeFirstOrNull()
}
private fun runData() {
val data = currentData ?: return
hapticConfirm()
- setText(data.text)
+ textView.text = data.text
background.setTint(data.color)
visibility = View.VISIBLE
@@ -156,7 +162,7 @@ class ToastView @JvmOverloads constructor(
}
override fun onAnimationEnd(animation: Animator) {
- if (0 > translationY) {
+ if (translationY <= -height.toFloat() + 1) {
loaderView.visibility = View.GONE
visibility = View.GONE
nextQueue()