Updated on 2026-08-14
This commit is contained in:
commit
808cd4a301
503 changed files with 12306 additions and 3036 deletions
|
|
@ -18,16 +18,16 @@ internal class DefaultFeeSelectorReloadTrigger @Inject constructor() :
|
|||
FeeSelectorCheckReloadListener {
|
||||
|
||||
override val reloadTriggerFlow: SharedFlow<FeeSelectorData>
|
||||
field = MutableSharedFlow()
|
||||
field = MutableSharedFlow()
|
||||
|
||||
override val loadingStateTriggerFlow: SharedFlow<Unit>
|
||||
field = MutableSharedFlow()
|
||||
field = MutableSharedFlow()
|
||||
|
||||
override val checkReloadTriggerFlow: SharedFlow<Unit>
|
||||
field = MutableSharedFlow()
|
||||
field = MutableSharedFlow()
|
||||
|
||||
override val checkReloadResultFlow: SharedFlow<Boolean>
|
||||
field = MutableSharedFlow()
|
||||
field = MutableSharedFlow()
|
||||
|
||||
override suspend fun triggerUpdate(feeData: FeeSelectorData) {
|
||||
reloadTriggerFlow.emit(feeData)
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ internal class FeeSelectorModel @Inject constructor(
|
|||
val feeSelectorBottomSheet = SlotNavigation<Unit>()
|
||||
|
||||
val uiState: StateFlow<FeeSelectorUM>
|
||||
field = MutableStateFlow<FeeSelectorUM>(params.state)
|
||||
field = MutableStateFlow<FeeSelectorUM>(params.state)
|
||||
|
||||
init {
|
||||
initAppCurrency()
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ internal class SendConfirmModel @Inject constructor(
|
|||
val uiState = _uiState.asStateFlow()
|
||||
|
||||
val isBalanceHiddenFlow: StateFlow<Boolean>
|
||||
field = MutableStateFlow(false)
|
||||
field = MutableStateFlow(false)
|
||||
|
||||
private val amountState
|
||||
get() = uiState.value.amountUM as? AmountState.Data
|
||||
|
|
@ -317,7 +317,7 @@ internal class SendConfirmModel @Inject constructor(
|
|||
null
|
||||
}
|
||||
|
||||
val amount = receivingAmount?.convertToSdkAmount(cryptoCurrency)
|
||||
val amount = receivingAmount?.convertToSdkAmount(cryptoCurrencyStatus)
|
||||
|
||||
saveBlockchainErrorUseCase(
|
||||
error = BlockchainErrorInfo(
|
||||
|
|
@ -331,7 +331,7 @@ internal class SendConfirmModel @Inject constructor(
|
|||
""
|
||||
},
|
||||
amount = amount?.value?.stripZeroPlainString() ?: "unknown",
|
||||
fee = feeValue?.convertToSdkAmount(cryptoCurrency)
|
||||
fee = feeValue?.convertToSdkAmount(cryptoCurrencyStatus)
|
||||
?.value?.stripZeroPlainString() ?: "unknown",
|
||||
),
|
||||
)
|
||||
|
|
@ -424,7 +424,7 @@ internal class SendConfirmModel @Inject constructor(
|
|||
|
||||
modelScope.launch {
|
||||
createTransferTransactionUseCase(
|
||||
amount = receivingAmount.convertToSdkAmount(cryptoCurrency),
|
||||
amount = receivingAmount.convertToSdkAmount(cryptoCurrencyStatus),
|
||||
fee = fee,
|
||||
memo = memo,
|
||||
nonce = nonce,
|
||||
|
|
|
|||
|
|
@ -106,10 +106,10 @@ internal class SendModel @Inject constructor(
|
|||
val analyticCategoryName = CommonSendAnalyticEvents.SEND_CATEGORY
|
||||
|
||||
val uiState: StateFlow<SendUM>
|
||||
field = MutableStateFlow(initialState())
|
||||
field = MutableStateFlow(initialState())
|
||||
|
||||
val isBalanceHiddenFlow: StateFlow<Boolean>
|
||||
field = MutableStateFlow(false)
|
||||
field = MutableStateFlow(false)
|
||||
|
||||
val initialRoute = if (params.amount == null) {
|
||||
if (uiState.value.isRedesignEnabled) {
|
||||
|
|
@ -260,10 +260,11 @@ internal class SendModel @Inject constructor(
|
|||
|
||||
suspend fun loadFee(): Either<GetFeeError, TransactionFee> {
|
||||
val predefinedValues = predefinedValues
|
||||
val cryptoCurrencyStatus = cryptoCurrencyStatusFlow.value
|
||||
val transferTransaction = if (predefinedValues is PredefinedValues.Content.Deeplink) {
|
||||
val predefinedAmount = predefinedValues.amount.parseBigDecimalOrNull()?.convertToSdkAmount(cryptoCurrency)
|
||||
val predefinedAmount = predefinedValues.amount.parseBigDecimalOrNull()
|
||||
createTransferTransactionUseCase(
|
||||
amount = predefinedAmount ?: error("Invalid amount"),
|
||||
amount = predefinedAmount?.convertToSdkAmount(cryptoCurrencyStatus) ?: error("Invalid amount"),
|
||||
memo = predefinedValues.memo,
|
||||
destination = predefinedValues.address,
|
||||
userWalletId = userWallet.walletId,
|
||||
|
|
@ -277,7 +278,7 @@ internal class SendModel @Inject constructor(
|
|||
val enteredAmount = amountUM.amountTextField.cryptoAmount.value ?: error("Invalid amount")
|
||||
|
||||
createTransferTransactionUseCase(
|
||||
amount = enteredAmount.convertToSdkAmount(cryptoCurrency),
|
||||
amount = enteredAmount.convertToSdkAmount(cryptoCurrencyStatus),
|
||||
memo = enteredMemo,
|
||||
destination = enteredDestinationAddress,
|
||||
userWalletId = userWallet.walletId,
|
||||
|
|
|
|||
|
|
@ -88,10 +88,10 @@ internal class NFTSendModel @Inject constructor(
|
|||
private val nftAsset = params.nftAsset
|
||||
|
||||
val uiState: StateFlow<NFTSendUM>
|
||||
field = MutableStateFlow(initialState())
|
||||
field = MutableStateFlow(initialState())
|
||||
|
||||
val isBalanceHiddenFlow: StateFlow<Boolean>
|
||||
field = MutableStateFlow(false)
|
||||
field = MutableStateFlow(false)
|
||||
|
||||
var cryptoCurrency: CryptoCurrency by Delegates.notNull()
|
||||
var userWallet: UserWallet by Delegates.notNull()
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ internal class SendAmountModel @Inject constructor(
|
|||
|
||||
private var isAvailableForSwap: Boolean = false
|
||||
val isSendWithSwapAvailable: StateFlow<Boolean>
|
||||
field = MutableStateFlow(false)
|
||||
field = MutableStateFlow(false)
|
||||
|
||||
private val analyticsCategoryName = params.analyticsCategoryName
|
||||
private var cryptoCurrencyStatus: CryptoCurrencyStatus = CryptoCurrencyStatus(
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ internal class NotificationsModel @Inject constructor(
|
|||
) {
|
||||
val validationError = validateTransactionUseCase(
|
||||
userWalletId = userWalletId,
|
||||
amount = enteredAmount.convertToSdkAmount(currency),
|
||||
amount = enteredAmount.convertToSdkAmount(cryptoCurrencyStatus),
|
||||
fee = fee,
|
||||
memo = memo,
|
||||
destination = destinationAddress,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue