Issue 206 add extension function to identify inbound v. outbound txs on a client side

This commit is contained in:
Francisco Gindre 2020-10-14 20:23:36 -03:00
parent 18b8d622c2
commit 229ae3192a
1 changed files with 14 additions and 0 deletions

View File

@ -121,4 +121,18 @@ public protocol ConfirmedTransactionEntity: MinedTransactionEntity, SignedTransa
expiration height for this transaction
*/
var expiryHeight: BlockHeight? { get set }
var isOutbound: Bool { get }
var isInbound: Bool { get }
}
public extension ConfirmedTransactionEntity {
var isOutbound: Bool {
self.toAddress != nil
}
var isInbound: Bool {
self.toAddress == nil
}
}