Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
TywinLannister1313 opened this issue Oct 16, 2020 · 0 comments

Comments

@TywinLannister1313
Copy link

TywinLannister1313 commented Oct 16, 2020

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
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant