Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
token client: refactor transfer to use new offchain helper
This PR continues the necessary repairs for addressing #6064 by refactoring the Token Client's `transfer(..)` function to use the new offchain transfer hook helpers. If transfer hook accounts are provided, in either case they're appended to the instruction like before. If no transfer hook accounts are provided: - If decimals are provided, Token2022's offchain helper `create_transfer_checked_instruction_with_extra_metas(..)` is used. - If decimals are not provided, SPL Transfer Hook interface's `add_extra_account_metas_for_execute(..)` is used. In either case where no transfer hook accounts are provided, the new, non-deprecated helpers are used.
- Loading branch information