Skip to content

Should FungibleTokenBuilder and NonFungibleTokenBuilder heldBy function receive a Party ? #217

@TywinLannister1313

Description

@TywinLannister1313

This is a small thing I noticed with the new FungibleTokenBuilder and NonFungibleTokenBuilder classes. I'm not sure if it matters but I think it would cause some issues if you wanted to use them with AnonymousParty?

The holder parameter for FungibleToken and NonFungibleToken is AbstractParty:

open class FungibleToken @JvmOverloads constructor(
        override val amount: Amount<IssuedTokenType>,
        override val holder: AbstractParty,
        override val tokenTypeJarHash: SecureHash? = amount.token.tokenType.getAttachmentIdForGenericParam()
) : FungibleState<IssuedTokenType>, AbstractToken, QueryableState {

Whereas the heldBy function in the new builders is Party:

    fun heldBy(party: Party): FungibleTokenBuilder = this.apply {
        this.holder = party
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions