Currently, Kinetic assumes that the token account is created using the getAssociatedTokenAddress. While this works well inside an app with only accounts created by Kinetic, it does not work well with accounts created by Agora who don't use those standards.
In order to be compatible with existing accounts, we need to properly support them in Kinetic. This should be easier now that #502 has landed.
[ ] 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
Currently, Kinetic assumes that the token account is created using the
getAssociatedTokenAddress
. While this works well inside an app with only accounts created by Kinetic, it does not work well with accounts created by Agora who don't use those standards.In order to be compatible with existing accounts, we need to properly support them in Kinetic. This should be easier now that #502 has landed.
makeTransfer
method should accept aownerTokenAccount?: string
owner
is in fact the owner.makeTransfer
method should accept adestinationTokenAccount?: string
owner
is in fact the destination.makeTransfer
should fetch token accounts using thegetAccountInfo
method instead of usinggetAssociatedTokenAddress
tokenAccount?: string