Skip to content

from Kin-labs: Improve support for multiple token accounts, and handling transfers to tokens or mints #18

@mocolicious

Description

@mocolicious

see comments from kin-labs#507

  • The makeTransfer method should accept a ownerTokenAccount?: string
    • It is used to decide which token account to send from if the owner has multiple.
    • When provided, there should be a check if this token account exists, and of the provided owner is in fact the owner.
    • This will allow users to empty any double token accounts, which can then be closed
  • The makeTransfer method should accept a destinationTokenAccount?: string
    • It is used to decide which token account to send to if the destination has multiple.
    • When provided, there should be a check if this token account exists, and of the provided owner is in fact the destination.
  • makeTransfer should fetch token accounts using the getAccountInfo method instead of using getAssociatedTokenAddress
  • Improve logic that prevents sending to mints
  • Improve logic that prevents sending to token accounts directly (eg, one should always pass in the owner).
  • The closeAccount method should allow a tokenAccount?: string

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions