Skip to content

Allow outputs to have fungible tokens and NFTs #18

@SayoshiNakamario

Description

@SayoshiNakamario

In TransactionBuilderHelper.ts the prepareTransactionOutputs() helper function which buildTransaction() calls sets any outputs with an NFT on them to 0 fungible tokens. If an NFT output did also have tokens on it (e.g. BadgerNFT + badgercoins) then the fungible tokens would be burned, or if interacting with a contract that enforced tokenAmount the wallet would be unable to interact with the contract.

 // If there's a token field
      if (output.token) {
        // If the token has NFT data, we enforce a zero fungible amount
        if (output.token.nft) {
          return {
            ...baseOutput,
            // Always zero for NFT
            token: {
              amount: BigInt(0),

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