From e80827c1f94255adbf7a609941c81ad6f5da5070 Mon Sep 17 00:00:00 2001 From: Sriram Nurani Viswanathan <50625504+nvsriram@users.noreply.github.com> Date: Fri, 9 Aug 2024 12:15:22 -0400 Subject: [PATCH] solana: Update fee token comment to include required burn changes (#493) --- .../src/instructions/transfer.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/solana/programs/example-native-token-transfers/src/instructions/transfer.rs b/solana/programs/example-native-token-transfers/src/instructions/transfer.rs index 802e0fc37..b398d05d4 100644 --- a/solana/programs/example-native-token-transfers/src/instructions/transfer.rs +++ b/solana/programs/example-native-token-transfers/src/instructions/transfer.rs @@ -225,7 +225,9 @@ pub fn transfer_burn<'info>( // would be lost. // To support fee tokens, we would first transfer the amount, _then_ assert // that the resulting amount has no dust (instead of removing dust before - // the transfer like we do now). + // the transfer like we do now). We would also need to burn the new amount + // _after_ paying fees so as to not burn more than what was transferred to + // the custody. if after != before { return Err(NTTError::BadAmountAfterBurn.into()); }