Updated on 2026-08-14
This commit is contained in:
parent
2413e9a3b7
commit
6fb8e4e2ea
197 changed files with 39 additions and 75 deletions
|
|
@ -342,7 +342,7 @@ internal class AddCustomTokenHub : BaseStoreHub<AddCustomTokenState>("AddCustomT
|
|||
|
||||
private suspend fun requestInfoAboutToken(
|
||||
contractAddress: String,
|
||||
): List<com.tangem.datasource.api.tangemTech.CoinsResponse.Coin> {
|
||||
): List<CoinsResponse.Coin> {
|
||||
val tangemTechServiceManager = requireNotNull(hubState.tangemTechServiceManager)
|
||||
dispatchOnMain(Screen.UpdateTokenFields(listOf(ContractAddress to ViewStates.TokenField(isLoading = true))))
|
||||
|
||||
|
|
@ -432,8 +432,8 @@ internal class AddCustomTokenHub : BaseStoreHub<AddCustomTokenState>("AddCustomT
|
|||
)
|
||||
|
||||
private suspend fun fillTokenFields(
|
||||
token: com.tangem.datasource.api.tangemTech.CoinsResponse.Coin,
|
||||
coinNetwork: com.tangem.datasource.api.tangemTech.CoinsResponse.Coin.Network,
|
||||
token: CoinsResponse.Coin,
|
||||
coinNetwork: CoinsResponse.Coin.Network,
|
||||
) {
|
||||
val blockchain = Blockchain.fromNetworkId(coinNetwork.networkId) ?: Blockchain.Unknown
|
||||
Network.setFieldValue(Field.Data(blockchain, false))
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ data class AddCustomTokenState(
|
|||
val form: Form = Form(listOf()),
|
||||
val formValidators: Map<CustomTokenFieldId, CustomTokenValidator<out Any>> = createFormValidators(),
|
||||
val formErrors: Map<CustomTokenFieldId, AddCustomTokenError> = emptyMap(),
|
||||
val foundToken: com.tangem.datasource.api.tangemTech.CoinsResponse.Coin? = null,
|
||||
val foundToken: CoinsResponse.Coin? = null,
|
||||
val warnings: Set<AddCustomTokenError.Warning> = emptySet(),
|
||||
val screenState: ScreenState = createInitialScreenState(),
|
||||
val tangemTechServiceManager: AddCustomTokenService? = null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue