Skip to content

Commit

Permalink
Add unknown type of ton transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
abdrasulov committed Nov 27, 2023
1 parent 7595507 commit 54df6d4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ dependencies {
debugImplementation leakCanary

// Wallet kits
implementation 'com.github.horizontalsystems:ton-kit-kmm:cf26cc4'
implementation 'com.github.horizontalsystems:ton-kit-kmm:53225e6'
implementation 'com.github.horizontalsystems:bitcoin-kit-android:16bfb76'
implementation 'com.github.horizontalsystems:ethereum-kit-android:3a02f3a'
implementation 'com.github.horizontalsystems:blockchain-fee-rate-kit-android:1d3bd49'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ class TonAdapter(
val type = when (transaction.type) {
TransactionType.Incoming.name -> TonTransactionRecord.Type.Incoming
TransactionType.Outgoing.name -> TonTransactionRecord.Type.Outgoing
else -> TonTransactionRecord.Type.Incoming
TransactionType.Unknown.name -> TonTransactionRecord.Type.Unknown
else -> TonTransactionRecord.Type.Unknown
}

return TonTransactionRecord(
Expand Down Expand Up @@ -246,6 +247,6 @@ class TonTransactionRecord(
source,
) {
enum class Type {
Incoming, Outgoing
Incoming, Outgoing, Unknown
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ class TransactionInfoViewItemFactory(
)
)
}
TonTransactionRecord.Type.Unknown -> {
}
}
}
is EvmIncomingTransactionRecord ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import io.horizontalsystems.bankwallet.core.App
import io.horizontalsystems.bankwallet.core.adapters.TonTransactionRecord
import io.horizontalsystems.bankwallet.core.adapters.TonTransactionRecord.Type.Incoming
import io.horizontalsystems.bankwallet.core.adapters.TonTransactionRecord.Type.Outgoing
import io.horizontalsystems.bankwallet.core.adapters.TonTransactionRecord.Type.Unknown
import io.horizontalsystems.bankwallet.core.managers.BalanceHiddenManager
import io.horizontalsystems.bankwallet.core.managers.EvmLabelManager
import io.horizontalsystems.bankwallet.core.providers.Translator
Expand Down Expand Up @@ -465,6 +466,11 @@ class TransactionViewItemFactory(
}
primaryValue = getColoredValue(record.mainValue, ColorName.Lucian)
}
Unknown -> {
title = Translator.getString(R.string.Transactions_Unknown)
subtitle = Translator.getString(R.string.Transactions_Unknown_Description)
primaryValue = null
}
}

return TransactionViewItem(
Expand Down

0 comments on commit 54df6d4

Please sign in to comment.