#1675 Integrations screen disclaimer & Flexa version bump (#1684)

* Flexa version bump

* [#1675] Integrations screen disclaimer

Closes #1675

* Code  cleanup

* Documentation update

* Fix review comment

---------

Co-authored-by: Honza <rychnovsky.honza@gmail.com>
This commit is contained in:
Milan 2024-11-20 07:58:49 +01:00 committed by GitHub
parent 6129b6c6f5
commit 3ea088e752
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 97 additions and 23 deletions

View File

@ -6,6 +6,10 @@ and this application adheres to [Semantic Versioning](https://semver.org/spec/v2
## [Unreleased]
### Added
- Flexa feature has been turned on
- Disclaimer added to integrations screen
## [1.2.2 (789)] - 2024-11-18
### Added

View File

@ -9,6 +9,10 @@ directly impact users rather than highlighting other key architectural updates.*
## [Unreleased]
### Added
- Flexa feature has been turned on
- Disclaimer added to integrations screen
## [1.2.2 (789)] - 2024-11-18
### Added

View File

@ -9,6 +9,10 @@ directly impact users rather than highlighting other key architectural updates.*
## [Unreleased]
### Added
- Flexa feature has been turned on
- Disclaimer added to integrations screen
## [1.2.2 (789)] - 2024-11-18
### Agregado

View File

@ -217,7 +217,7 @@ ZXING_VERSION=3.5.3
ZIP_321_VERSION = 0.0.6
ZCASH_BIP39_VERSION=1.0.8
FLEXA_VERSION=1.0.5
FLEXA_VERSION=1.0.6
# WARNING: Ensure a non-snapshot version is used before releasing to production
ZCASH_SDK_VERSION=2.2.6

Binary file not shown.

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.flexa</groupId>
<artifactId>core</artifactId>
<version>1.0.5</version>
<version>1.0.6</version>
<packaging>aar</packaging>
<dependencies>
<dependency>

View File

@ -3,11 +3,11 @@
<groupId>com.flexa</groupId>
<artifactId>core</artifactId>
<versioning>
<latest>1.0.5</latest>
<release>1.0.5</release>
<latest>1.0.6</latest>
<release>1.0.6</release>
<versions>
<version>1.0.5</version>
<version>1.0.6</version>
</versions>
<lastUpdated>20241030092850</lastUpdated>
<lastUpdated>20241115103837</lastUpdated>
</versioning>
</metadata>

Binary file not shown.

View File

@ -3,13 +3,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.flexa</groupId>
<artifactId>spend</artifactId>
<version>1.0.5</version>
<version>1.0.6</version>
<packaging>aar</packaging>
<dependencies>
<dependency>
<groupId>com.flexa</groupId>
<artifactId>core</artifactId>
<version>1.0.5</version>
<version>1.0.6</version>
</dependency>
<dependency>
<groupId>androidx.core</groupId>
@ -99,7 +99,7 @@
<dependency>
<groupId>com.flexa</groupId>
<artifactId>core</artifactId>
<version>1.0.5</version>
<version>1.0.6</version>
</dependency>
</dependencies>
</project>

View File

@ -3,11 +3,11 @@
<groupId>com.flexa</groupId>
<artifactId>spend</artifactId>
<versioning>
<latest>1.0.5</latest>
<release>1.0.5</release>
<latest>1.0.6</latest>
<release>1.0.6</release>
<versions>
<version>1.0.5</version>
<version>1.0.6</version>
</versions>
<lastUpdated>20241030092854</lastUpdated>
<lastUpdated>20241115103856</lastUpdated>
</versioning>
</metadata>

View File

@ -0,0 +1,32 @@
package co.electriccoin.zcash.ui.design.component
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import co.electriccoin.zcash.ui.design.theme.colors.ZashiColors
@Composable
fun ZashiCard(
modifier: Modifier = Modifier,
content: @Composable ColumnScope.() -> Unit,
) {
Card(
modifier = modifier,
colors =
CardDefaults.cardColors(
containerColor = ZashiColors.Surfaces.bgSecondary,
contentColor = ZashiColors.Text.textTertiary
),
) {
Column(
Modifier.padding(24.dp)
) {
content()
}
}
}

View File

@ -11,5 +11,5 @@ object ConfigurationEntries {
*/
val IS_RESCAN_ENABLED = BooleanConfigurationEntry(ConfigKey("is_rescan_enabled"), true)
val IS_FLEXA_AVAILABLE = BooleanConfigurationEntry(ConfigKey("is_flexa_available"), false)
val IS_FLEXA_AVAILABLE = BooleanConfigurationEntry(ConfigKey("is_flexa_available"), true)
}

View File

@ -5,7 +5,6 @@ import co.electriccoin.zcash.ui.design.util.StringResource
import kotlinx.collections.immutable.ImmutableList
data class IntegrationsState(
val version: StringResource,
val disabledInfo: StringResource?,
val onBack: () -> Unit,
val items: ImmutableList<ZashiSettingsListItemState>,

View File

@ -20,21 +20,23 @@ import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import co.electriccoin.zcash.ui.R
import co.electriccoin.zcash.ui.common.model.TopAppBarSubTitleState
import co.electriccoin.zcash.ui.design.component.BlankBgScaffold
import co.electriccoin.zcash.ui.design.component.ZashiCard
import co.electriccoin.zcash.ui.design.component.ZashiHorizontalDivider
import co.electriccoin.zcash.ui.design.component.ZashiSettingsListItem
import co.electriccoin.zcash.ui.design.component.ZashiSettingsListItemState
import co.electriccoin.zcash.ui.design.component.ZashiSmallTopAppBar
import co.electriccoin.zcash.ui.design.component.ZashiTopAppBarBackNavigation
import co.electriccoin.zcash.ui.design.component.ZashiVersion
import co.electriccoin.zcash.ui.design.newcomponent.PreviewScreens
import co.electriccoin.zcash.ui.design.theme.ZcashTheme
import co.electriccoin.zcash.ui.design.theme.colors.ZashiColors
import co.electriccoin.zcash.ui.design.theme.dimensions.ZashiDimensions
import co.electriccoin.zcash.ui.design.theme.typography.ZashiTypography
import co.electriccoin.zcash.ui.design.util.StringResource
import co.electriccoin.zcash.ui.design.util.getValue
import co.electriccoin.zcash.ui.design.util.stringRes
@ -78,7 +80,23 @@ fun Integrations(
Spacer(modifier = Modifier.height(ZashiDimensions.Spacing.spacingXl))
Spacer(modifier = Modifier.weight(1f))
ZashiVersion(modifier = Modifier.align(CenterHorizontally), version = state.version)
ZashiCard(
modifier = Modifier.padding(horizontal = 20.dp).fillMaxWidth(),
) {
Image(
modifier = Modifier.align(CenterHorizontally),
painter = painterResource(R.drawable.ic_integrations_info),
contentDescription = "",
colorFilter = ColorFilter.tint(ZashiColors.Text.textSecondary)
)
Spacer(Modifier.height(16.dp))
Text(
modifier = Modifier.fillMaxWidth(),
text = stringResource(id = R.string.integrations_info),
textAlign = TextAlign.Center,
style = ZashiTypography.textMd
)
}
}
}
}
@ -134,7 +152,6 @@ private fun IntegrationSettings() =
Integrations(
state =
IntegrationsState(
version = stringRes("Version 1.2"),
onBack = {},
disabledInfo = stringRes("Disabled info"),
items =

View File

@ -75,7 +75,6 @@ class IntegrationsViewModel(
val state =
combine(observeIsFlexaAvailableUseCase(), isEnabled) { isFlexaAvailable, isEnabled ->
IntegrationsState(
version = stringRes(R.string.integrations_version, versionInfo.versionName),
disabledInfo = stringRes(R.string.integrations_disabled_info).takeIf { isEnabled.not() },
onBack = ::onBack,
items =

View File

@ -243,7 +243,7 @@ private fun SeedSecret(
) {
Image(
painter = painterResource(id = R.drawable.ic_zashi_tooltip),
contentDescription = "",
contentDescription = null,
colorFilter = ColorFilter.tint(ZashiColors.Inputs.Default.icon)
)
}
@ -306,7 +306,7 @@ private fun SecretContent(state: SeedSecretState) {
) {
Image(
painter = painterResource(R.drawable.ic_reveal),
contentDescription = "",
contentDescription = null,
colorFilter = ColorFilter.tint(ZashiColors.Text.textPrimary)
)

View File

@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="39dp"
android:height="60dp"
android:viewportWidth="39"
android:viewportHeight="60">
<path
android:pathData="M34.347,0C27.207,0 20.107,1.055 12.967,1.055C12.636,1.055 12.33,1.289 12.238,1.61C9.797,10.152 6.841,18.556 3.36,26.731C2.382,29.03 1.362,31.313 0.307,33.581C0.119,33.988 0.241,34.585 0.756,34.687C4.048,35.354 7.407,35.365 10.704,34.722L9.751,33.994C9.639,41.399 8.808,48.778 6.821,55.924C6.581,56.795 7.718,57.167 8.197,56.505C14.914,47.265 21.565,37.969 28.251,28.703C30.157,26.063 32.069,23.424 33.98,20.794C34.25,20.427 33.98,19.759 33.531,19.688C29.057,18.949 24.526,18.607 19.99,18.689L20.642,19.825C25.158,13.501 29.897,7.334 34.856,1.345C35.473,0.601 34.408,-0.469 33.791,0.28C28.756,6.366 23.935,12.634 19.343,19.066C19.006,19.54 19.46,20.208 19.995,20.202C24.393,20.126 28.792,20.432 33.134,21.15L32.685,20.045C25.968,29.284 19.317,38.58 12.631,47.846C10.724,50.486 8.813,53.126 6.902,55.756L8.278,56.337C10.302,49.069 11.148,41.536 11.26,34.004C11.27,33.484 10.776,33.188 10.307,33.275C7.284,33.861 4.176,33.846 1.158,33.239L1.607,34.345C5.399,26.206 8.701,17.843 11.469,9.301C12.253,6.885 12.992,4.454 13.691,2.008L12.962,2.564C20.102,2.564 27.201,1.509 34.342,1.509C35.32,1.509 35.32,0 34.347,0Z"
android:fillColor="#5E594E"/>
<path
android:pathData="M8.64,55.287C16.886,42.571 24.857,32.455 34.53,20.789C30.213,20.106 25.902,19.423 21.585,18.74C25.999,12.854 30.417,6.972 34.831,1.086L36.951,1.657L37.053,1.519C33.19,6.83 29.322,12.14 25.458,17.446C29.597,16.931 33.832,17.191 37.879,18.21C28.776,32.429 20.821,44.89 11.718,59.11C10.261,58.034 10.169,57.835 8.13,55.797"
android:fillColor="#5E594E"/>
<path
android:pathData="M9.415,55.736C15.449,46.44 22.064,37.551 29.021,28.923C31.049,26.405 33.103,23.908 35.167,21.416C35.544,20.957 35.504,20.04 34.775,19.923C30.458,19.24 26.147,18.557 21.83,17.874L22.365,19.184C26.778,13.297 31.197,7.416 35.611,1.529L34.602,1.942L36.722,2.513C37.145,2.625 37.486,2.426 37.731,2.1L37.833,1.962L36.289,1.06C32.425,6.371 28.557,11.682 24.694,16.987C24.317,17.502 24.816,18.409 25.464,18.332C29.541,17.838 33.659,18.073 37.644,19.066L37.109,17.757C30.346,28.316 23.598,38.882 16.84,49.441C14.878,52.515 12.911,55.583 10.944,58.651L12.167,58.33C10.913,57.397 9.858,56.261 8.757,55.155C7.942,54.339 6.678,55.603 7.493,56.418C8.711,57.637 9.879,58.844 11.265,59.869C11.662,60.164 12.248,59.92 12.488,59.548C19.251,48.988 25.999,38.423 32.757,27.863C34.719,24.79 36.686,21.722 38.653,18.653C38.959,18.174 38.664,17.476 38.118,17.344C33.985,16.314 29.694,16.034 25.464,16.549L26.233,17.894C30.096,12.584 33.965,7.273 37.828,1.968C38.113,1.575 37.894,0.974 37.507,0.744C37.048,0.469 36.574,0.683 36.284,1.066L36.182,1.203L37.191,0.79L35.07,0.219C34.653,0.107 34.306,0.306 34.061,0.632C29.648,6.519 25.229,12.4 20.816,18.287C20.49,18.72 20.816,19.515 21.351,19.596C25.667,20.279 29.979,20.962 34.296,21.645L33.903,20.152C26.758,28.77 19.766,37.516 13.349,46.694C11.474,49.375 9.649,52.086 7.871,54.833C7.244,55.802 8.788,56.699 9.415,55.736Z"
android:fillColor="#5E594E"/>
</vector>

View File

@ -3,7 +3,7 @@
<string name="integrations_title">Integraciones</string>
<string name="integrations_coinbase">Compra <xliff:g id="currency" example="ZEC">%1$s</xliff:g> con Coinbase</string>
<string name="integrations_coinbase_subtitle">Una forma sencilla de comprar <xliff:g id="currency" example="ZEC">%1$s</xliff:g> y recibirlo directamente en tu billetera Zashi.</string>
<string name="integrations_version">Versión <xliff:g id="version" example="1.2.1">%1$s</xliff:g></string>
<string name="integrations_info">Zashi integrations provide access to third party services. Features and information shared with them are outside of our control and subject to their privacy policies.</string>
<string name="integrations_disabled_info">Durante el proceso de restauración, no es posible utilizar integraciones de pago.</string>
<string name="integrations_flexa">Paga con Flexa</string>
<string name="integrations_flexa_subtitle">Paga con clips de pago de Flexa y explora una nueva forma de gastar Zcash.</string>

View File

@ -3,7 +3,7 @@
<string name="integrations_title">Integrations</string>
<string name="integrations_coinbase">Buy <xliff:g id="currency" example="ZEC">%1$s</xliff:g> with Coinbase</string>
<string name="integrations_coinbase_subtitle">A hassle-free way to buy <xliff:g id="currency" example="ZEC">%1$s</xliff:g> and get it directly into your Zashi wallet.</string>
<string name="integrations_version">Version <xliff:g id="version" example="1.2.1">%1$s</xliff:g></string>
<string name="integrations_info">Zashi integrations provide access to third party services. Features and information shared with them are outside of our control and subject to their privacy policies.</string>
<string name="integrations_disabled_info">During the Restore process, it is not possible to use payment integrations.</string>
<string name="integrations_flexa">Pay with Flexa</string>
<string name="integrations_flexa_subtitle">Pay with Flexa payment clips and explore a new way of spending Zcash.</string>