Skip to content

Commit

Permalink
Fix after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
xrtm000 committed Nov 27, 2023
1 parent 5eea031 commit 9c31748
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.wavesplatform.api.common.lease

import com.wavesplatform.account.Address
import com.wavesplatform.api.common.LeaseInfo.Status.Active
import com.wavesplatform.api.common.LeaseInfo
import com.wavesplatform.api.common.LeaseInfo.Status.Active
import com.wavesplatform.common.state.ByteStr
import com.wavesplatform.database.{AddressId, DBExt, DBResource, Keys, RDB}
import com.wavesplatform.state.reader.LeaseDetails
Expand All @@ -27,8 +27,9 @@ object AddressLeaseInfo {

private def leasesFromSnapshot(snapshot: StateSnapshot, blockchain: Blockchain, subject: Address): Seq[LeaseInfo] =
snapshot.leaseStates.collect {
case (id, details) if subject == details.sender.toAddress || blockchain.resolveAlias(details.recipient).exists(subject == _) =>
LeaseInfo.fromLeaseDetails(id, details, blockchain)
case (id, leaseSnapshot)
if subject == leaseSnapshot.sender.toAddress || blockchain.resolveAlias(leaseSnapshot.recipient).exists(subject == _) =>
LeaseInfo.fromLeaseDetails(id, leaseSnapshot.toDetails(blockchain, None, blockchain.leaseDetails(id)), blockchain)
}.toSeq

private def leasesFromDb(rdb: RDB, blockchain: Blockchain, subject: Address): Observable[LeaseInfo] =
Expand Down

0 comments on commit 9c31748

Please sign in to comment.