Updated on 2026-08-14
This commit is contained in:
parent
3d887a5574
commit
06b13f2227
15 changed files with 491 additions and 243 deletions
|
|
@ -18,7 +18,25 @@ sealed interface TransactionState {
|
|||
open val address: String,
|
||||
open val amount: String,
|
||||
open val timestamp: String,
|
||||
) : TransactionState
|
||||
) : TransactionState {
|
||||
|
||||
fun copySealed(
|
||||
address: String = this.address,
|
||||
amount: String = this.amount,
|
||||
timestamp: String = this.timestamp,
|
||||
): Content {
|
||||
return when (this) {
|
||||
is Approved -> copy(address, amount, timestamp)
|
||||
is Receive -> copy(address, amount, timestamp)
|
||||
is Send -> copy(address, amount, timestamp)
|
||||
is Swapped -> copy(address, amount, timestamp)
|
||||
is Approving -> copy(address, amount, timestamp)
|
||||
is Receiving -> copy(address, amount, timestamp)
|
||||
is Sending -> copy(address, amount, timestamp)
|
||||
is Swapping -> copy(address, amount, timestamp)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Content state for processed transaction
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue