Updated on 2026-08-14
This commit is contained in:
commit
94fdbd9e0b
13 changed files with 44853 additions and 17102 deletions
|
|
@ -38,7 +38,7 @@ android {
|
|||
}
|
||||
debug_beta {
|
||||
initWith release
|
||||
debuggable false
|
||||
debuggable true
|
||||
versionNameSuffix "-beta"
|
||||
applicationIdSuffix ".debug"
|
||||
buildConfigField 'String', 'CONFIG_ENVIRONMENT', '\"prod\"'
|
||||
|
|
@ -80,8 +80,8 @@ dependencies {
|
|||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
|
||||
|
||||
implementation 'com.tangem:blockchain:develop-64'
|
||||
implementation 'com.tangem.tangem-sdk-kotlin:core:develop-134'
|
||||
implementation 'com.tangem.tangem-sdk-kotlin:android:develop-134'
|
||||
implementation 'com.tangem.tangem-sdk-kotlin:core:develop-137'
|
||||
implementation 'com.tangem.tangem-sdk-kotlin:android:develop-137'
|
||||
|
||||
// WebView
|
||||
implementation "androidx.browser:browser:1.3.0"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -71,7 +71,7 @@ class WalletCardsWidget(
|
|||
)
|
||||
leapfrogWidget.fold {
|
||||
animator.doOnEnd {
|
||||
// leapfrogWidget.initViews()
|
||||
leapfrogWidget.initViews()
|
||||
leapfrogWidget.unfold()
|
||||
}
|
||||
animator.start()
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import com.tangem.common.CompletionResult
|
|||
import com.tangem.common.core.TangemSdkError
|
||||
import com.tangem.common.extensions.isZero
|
||||
import com.tangem.common.services.Result
|
||||
import com.tangem.operations.attestation.Attestation
|
||||
import com.tangem.operations.attestation.OnlineCardVerifier
|
||||
import com.tangem.tap.common.analytics.Analytics
|
||||
import com.tangem.tap.common.extensions.*
|
||||
|
|
@ -147,6 +148,9 @@ class WalletMiddleware {
|
|||
store.dispatch(NavigationAction.PopBackTo(AppScreen.Home))
|
||||
}
|
||||
is WalletAction.LoadCardInfo -> {
|
||||
val attestationFailed = action.card.attestation.status == Attestation.Status.Failed
|
||||
store.dispatchOnMain(GlobalAction.SetIfCardVerifiedOnline(!attestationFailed))
|
||||
|
||||
scope.launch {
|
||||
val response = OnlineCardVerifier().getCardInfo(
|
||||
action.card.cardId, action.card.cardPublicKey
|
||||
|
|
@ -156,13 +160,9 @@ class WalletMiddleware {
|
|||
val actionList = listOf(
|
||||
WalletAction.SetArtworkId(response.data.artwork?.id),
|
||||
WalletAction.LoadArtwork(action.card, response.data.artwork?.id),
|
||||
GlobalAction.SetIfCardVerifiedOnline(response.data.passed)
|
||||
)
|
||||
withMainContext { actionList.forEach { store.dispatch(it) } }
|
||||
}
|
||||
is Result.Failure -> {
|
||||
store.dispatchOnMain(GlobalAction.SetIfCardVerifiedOnline(false))
|
||||
}
|
||||
}
|
||||
store.dispatchOnMain(WalletAction.Warnings.CheckIfNeeded)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ class SingleWalletView : WalletView {
|
|||
val btnConfirm = if (state.tradeCryptoState.sellingAllowed ||
|
||||
state.tradeCryptoState.buyingAllowed
|
||||
) {
|
||||
lButtonsShort.btnConfirmShort
|
||||
lButtonsShort.btnConfirm
|
||||
} else {
|
||||
lButtonsLong.btnConfirmLong
|
||||
}
|
||||
|
|
@ -136,7 +136,7 @@ class SingleWalletView : WalletView {
|
|||
val btnScan = if (state.tradeCryptoState.sellingAllowed ||
|
||||
state.tradeCryptoState.buyingAllowed
|
||||
) {
|
||||
lButtonsShort.btnScanShort
|
||||
lButtonsShort.btnScan
|
||||
} else {
|
||||
lButtonsLong.btnScanLong
|
||||
}
|
||||
|
|
@ -175,14 +175,14 @@ class SingleWalletView : WalletView {
|
|||
else -> R.string.wallet_button_trade
|
||||
}
|
||||
val icon = when {
|
||||
allowedToBuy && !allowedToSell -> R.drawable.ic_arrow_up_short_btn
|
||||
!allowedToBuy && allowedToSell -> R.drawable.ic_arrow_down_short_button
|
||||
allowedToBuy && allowedToSell -> R.drawable.ic_arrows_up_down_short_btn
|
||||
allowedToBuy && !allowedToSell -> R.drawable.ic_arrow_up
|
||||
!allowedToBuy && allowedToSell -> R.drawable.ic_arrow_down
|
||||
allowedToBuy && allowedToSell -> R.drawable.ic_arrows_up_down
|
||||
else -> null
|
||||
}
|
||||
with(binding) {
|
||||
lButtonsShort.btnTrade.text = fragment?.getText(text)
|
||||
lButtonsShort.btnTrade.setCompoundDrawablesWithIntrinsicBounds(0, icon ?: 0, 0, 0)
|
||||
icon?.let { lButtonsShort.btnTrade.setIconResource(it) }
|
||||
lButtonsShort.btnTrade.setOnClickListener { if (action != null) store.dispatch(action) }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,58 +6,57 @@
|
|||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_scan_short"
|
||||
style="@style/TapBlackButton"
|
||||
android:id="@+id/btn_trade"
|
||||
style="@style/TapButtonWithIcon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginBottom="33dp"
|
||||
android:drawableTop="@drawable/ic_group_1243"
|
||||
android:gravity="bottom|center_horizontal"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingTop="7dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/wallet_button_scan"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/btn_trade"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintVertical_bias="1" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_trade"
|
||||
style="@style/TapButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginBottom="33dp"
|
||||
android:drawableTop="@drawable/ic_arrows_up_down_short_btn"
|
||||
android:gravity="bottom|center_horizontal"
|
||||
android:paddingTop="1dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/wallet_button_trade"
|
||||
app:drawableTint="@android:color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/btn_confirm_short"
|
||||
app:layout_constraintStart_toEndOf="@+id/btn_scan_short"
|
||||
app:icon="@drawable/ic_arrows_up_down"
|
||||
app:layout_constraintBottom_toTopOf="@id/btn_scan"
|
||||
app:layout_constraintEnd_toStartOf="@id/btn_confirm"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:iconGravity="textEnd"
|
||||
android:textAlignment="center"
|
||||
app:layout_constraintVertical_bias="1" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_confirm_short"
|
||||
style="@style/TapButton"
|
||||
android:id="@+id/btn_confirm"
|
||||
style="@style/TapButtonWithIcon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="33dp"
|
||||
android:drawableTop="@drawable/ic_send_short_btn"
|
||||
android:gravity="bottom|center_horizontal"
|
||||
android:paddingTop="2dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/wallet_button_send"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:icon="@drawable/ic_send"
|
||||
app:iconGravity="textEnd"
|
||||
android:textAlignment="center"
|
||||
app:layout_constraintBottom_toTopOf="@id/btn_scan"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/btn_trade"
|
||||
app:layout_constraintStart_toEndOf="@id/btn_trade"
|
||||
app:layout_constraintVertical_bias="1" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_scan"
|
||||
style="@style/TapBlackButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginBottom="33dp"
|
||||
android:gravity="center"
|
||||
android:paddingTop="7dp"
|
||||
android:text="@string/wallet_button_scan"
|
||||
app:icon="@drawable/ic_scan"
|
||||
app:iconGravity="textEnd"
|
||||
android:textAlignment="center"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintVertical_bias="1" />
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
<string name="story_web3_description">Обменивайте, покупайте NFT, получайте займы и делайте вклады в более чем 100 различных децентрализованных сервисах</string>
|
||||
<string name="story_finish_title">Кошелек для каждого</string>
|
||||
<string name="story_finish_description">Используйте его на ходу, в любом месте, в любое время. Без проводов и батареек. Как только понадобится крипта, просто приложите карту к телефону.</string>
|
||||
<string name="home_button_order">Заказать карту</string>
|
||||
<string name="home_button_order">Купить</string>
|
||||
<string name="home_button_search_tokens">Поиск токенов</string>
|
||||
<string name="search_tokens_title">Поиск токенов</string>
|
||||
<string name="alert_demo_message">Приложение работает в демонстрационном режиме. Средства на всех счетах ненастоящие.</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue