Updated on 2026-08-14

This commit is contained in:
Tangem 2022-01-28 11:07:42 +00:00
commit b881339f57
10 changed files with 24 additions and 16 deletions

View file

@ -73,7 +73,10 @@ class DetailsFragment : Fragment(R.layout.fragment_details), StoreSubscriber<Det
}
tv_card_id.text = cardId
tv_issuer.text = state.cardInfo.issuer
tv_signed_hashes.text = state.cardInfo.signedHashes.toString()
tv_signed_hashes.text = getString(
R.string.details_row_subtitle_signed_hashes_format,
state.cardInfo.signedHashes.toString()
)
}
tv_signed_hashes.show(!state.isTangemTwins)

View file

@ -237,11 +237,13 @@ private fun handleBackupAction(action: BackupAction) {
AccessCodeError.CodeTooShort
))
} else {
store.dispatch(BackupAction.SetAccessCodeError(null))
store.dispatch(BackupAction.SaveFirstAccessCode(action.accessCode))
}
}
is BackupAction.SaveAccessCodeConfirmation -> {
if (action.accessCodeConfirmation == backupState.accessCode) {
store.dispatch(BackupAction.SetAccessCodeError(null))
backupService.setAccessCode(action.accessCodeConfirmation)
store.dispatch(BackupAction.PrepareToWritePrimaryCard)
} else {

View file

@ -60,7 +60,7 @@ class BackupReducer {
state.copy(backupStep = BackupStep.SetAccessCode)
}
BackupAction.ShowEnterAccessCodeScreen -> {
state.copy(backupStep = BackupStep.EnterAccessCode)
state.copy(backupStep = BackupStep.EnterAccessCode, accessCodeError = null)
}
is BackupAction.SaveFirstAccessCode -> {
state.copy(

View file

@ -13,10 +13,8 @@ import com.squareup.picasso.Picasso
import com.tangem.common.CardIdFormatter
import com.tangem.common.core.CardIdDisplayFormat
import com.tangem.tangem_sdk_new.ui.widget.leapfrogWidget.LeapfrogWidget
import com.tangem.tap.common.extensions.dispatchOpenUrl
import com.tangem.tap.common.extensions.hide
import com.tangem.tap.common.extensions.show
import com.tangem.tap.common.postUi
import com.tangem.tap.features.FragmentOnBackPressedHandler
import com.tangem.tap.features.addBackPressHandler
import com.tangem.tap.features.onboarding.products.wallet.redux.*
@ -254,15 +252,11 @@ class OnboardingWalletFragment : Fragment(R.layout.fragment_onboarding_wallet),
private fun showEnterAccessCode(state: BackupState) {
accessCodeDialog?.showEnterAccessCode()
accessCodeDialog?.showError(state.accessCodeError)
postUi(2000) { store.dispatch(BackupAction.SetAccessCodeError(null)) }
}
private fun showReenterAccessCode(state: BackupState) {
accessCodeDialog?.showReenterAccessCode()
accessCodeDialog?.showError(state.accessCodeError)
postUi(2000) { store.dispatch(BackupAction.SetAccessCodeError(null)) }
}
private fun showWritePrimaryCard(state: BackupState) {
@ -326,7 +320,7 @@ class OnboardingWalletFragment : Fragment(R.layout.fragment_onboarding_wallet),
tv_header.text =
getString(R.string.onboarding_title_backup_card_format, cardNumber)
tv_body.text = getString(
R.string.onboarding_subtitle_scan_primary_card_format,
R.string.onboarding_subtitle_scan_backup_card_format,
cardIdFormatter.getFormattedCardId(state.backupCardIds[cardNumber - 1])
)
btn_main_action.text = getString(
@ -351,7 +345,7 @@ class OnboardingWalletFragment : Fragment(R.layout.fragment_onboarding_wallet),
tab_layout_backup_info.hide()
tv_body.text = text
btn_main_action.text = getText(R.string.common_continue)
btn_main_action.text = getText(R.string.onboarding_button_continue_wallet)
btn_alternative_action.hide()
btn_main_action.setOnClickListener {
lav_confetti.cancelAnimation()

View file

@ -137,6 +137,11 @@ class SendStateSubscriber(fragment: BaseStoreFragment) : FragmentStateSubscriber
adapter.submitList(state.sendWarningsList)
rv.show(state.sendWarningsList.isNotEmpty())
fg.toolbar.title = fg.getString(
R.string.send_title_currency_format,
state.amountState.mainCurrency.currencySymbol
)
}
private fun handleAddressPayIdState(fg: BaseStoreFragment, state: AddressPayIdState) {

View file

@ -32,7 +32,7 @@ class TokensMiddleware {
{ next ->
{ action ->
when (action) {
is TokensAction.LoadCurrencies -> handleLoadCurrencies(action)
is TokensAction.LoadCurrencies -> handleLoadCurrencies()
is TokensAction.SaveChanges -> handleSaveChanges(action)
}
next(action)
@ -40,7 +40,7 @@ class TokensMiddleware {
}
}
private fun handleLoadCurrencies(action: TokensAction.LoadCurrencies) {
private fun handleLoadCurrencies() {
val scanResponse = store.state.globalState.scanResponse ?: return
val isTestcard = scanResponse.card.isTestCard
@ -48,7 +48,7 @@ class TokensMiddleware {
val blockchains = currenciesRepository.getBlockchains(
cardFirmware = scanResponse.card.firmwareVersion,
isTestNet = isTestcard
)
).sortedBy { it.fullName }
val currencies =
CurrencyListItem.createListOfCurrencies(blockchains, tokens).toMutableList()
store.dispatch(TokensAction.LoadCurrencies.Success(currencies))

View file

@ -192,6 +192,7 @@
app:tabBackground="@drawable/selector_tabs_dots"
app:tabIndicator="@null"
app:tabPaddingStart="8dp"
android:layout_marginBottom="16dp"
app:tabPaddingEnd="8dp"
app:tabGravity="center"/>

View file

@ -122,7 +122,7 @@
android:layout_marginStart="78dp"
android:layout_marginEnd="78dp"
android:layout_marginBottom="92dp"
android:text="@string/common_create"
android:text="@string/common_continue"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -27,7 +27,7 @@
android:layout_marginTop="44dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="40dp"
android:hint="Access code"
android:hint="@string/onboarding_wallet_info_title_third"
app:boxStrokeColor="@color/selector_edit_text"
app:boxStrokeWidth="1dp"
app:endIconDrawable="@drawable/selector_password_toggle"
@ -53,6 +53,9 @@
android:layout_marginStart="78dp"
android:layout_marginEnd="78dp"
android:layout_marginBottom="92dp"
android:layout_marginTop="32dp"
app:layout_constraintTop_toTopOf="@id/til_access_code"
app:layout_constraintVertical_bias="1"
android:text="@string/common_create"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent" />

View file

@ -27,7 +27,7 @@
<string name="twins_recreate_title_preparing" translatable="false">Preparing card</string>
<string name="twins_recreate_title_creating_wallet" translatable="false">Creating wallet</string>
<string name="twins_recreate_subtitle" translatable="false">The wallet creation procedure consists of three steps. You must complete it to the end, otherwise you will have to start from the beginning.</string>
<string name="twins_recreate_button_format" translatable="false">Tap the card #%s</string>
<string name="twins_recreate_button_format" translatable="false">Scan the card #%s</string>
<string name="twins_recreate_alert" translatable="false">You have already started the process of recreating twin wallet. If you interrupt it, you won\'t be able to use your twin cards until you start it again and complete recreating the wallet.</string>
<string name="twins_wrong_card_error" translatable="false">You\'ve tapped the same card. To create twin wallet you need to tap a second twin card.</string>