mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
client: Fix when (this)
to use virtual dispatch instead
This commit is contained in:
@ -12,30 +12,17 @@ import rx.Observable
|
|||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
import java.util.UUID
|
import java.util.UUID
|
||||||
|
|
||||||
sealed class TransactionCreateStatus() {
|
sealed class TransactionCreateStatus(val message: String?) {
|
||||||
class Started(val message: String?) : TransactionCreateStatus()
|
class Started(message: String?) : TransactionCreateStatus(message)
|
||||||
class Failed(val message: String?) : TransactionCreateStatus()
|
class Failed(message: String?) : TransactionCreateStatus(message)
|
||||||
|
override fun toString(): String = message ?: javaClass.simpleName
|
||||||
override fun toString(): String {
|
|
||||||
return when (this) {
|
|
||||||
is TransactionCreateStatus.Started -> message ?: "Started"
|
|
||||||
is TransactionCreateStatus.Failed -> message ?: "Failed"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sealed class ProtocolStatus() {
|
sealed class ProtocolStatus(val status: String?) {
|
||||||
object Added: ProtocolStatus()
|
object Added: ProtocolStatus(null)
|
||||||
object Removed: ProtocolStatus()
|
object Removed: ProtocolStatus(null)
|
||||||
class InProgress(val status: String): ProtocolStatus()
|
class InProgress(status: String): ProtocolStatus(status)
|
||||||
|
override fun toString(): String = status ?: javaClass.simpleName
|
||||||
override fun toString(): String {
|
|
||||||
return when (this) {
|
|
||||||
ProtocolStatus.Added -> "Added"
|
|
||||||
ProtocolStatus.Removed -> "Removed"
|
|
||||||
is ProtocolStatus.InProgress -> status
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TransactionCreateState {
|
interface TransactionCreateState {
|
||||||
|
Reference in New Issue
Block a user