Updated on 2026-08-14
This commit is contained in:
parent
0e85eb1d78
commit
929dae92c3
4 changed files with 26 additions and 15 deletions
|
|
@ -86,6 +86,13 @@ fun UserWallet.requireHotWallet(): UserWallet.Hot {
|
|||
?: error("This user wallet is not a hot wallet")
|
||||
}
|
||||
|
||||
fun UserWallet.isImported(): Boolean {
|
||||
return when (this) {
|
||||
is UserWallet.Cold -> isImported
|
||||
is UserWallet.Hot -> true
|
||||
}
|
||||
}
|
||||
|
||||
fun UserWallet.copy(name: String = this.name, walletId: UserWalletId = this.walletId): UserWallet = when (this) {
|
||||
is UserWallet.Cold -> this.copy(name = name, walletId = walletId)
|
||||
is UserWallet.Hot -> this.copy(name = name, walletId = walletId)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue