1

i've been following this example to see how to transfer WSOL from inside the transfer hook:

https://solana.com/developers/guides/token-extensions/transfer-hook#transfer-hook-with-wsol-transfer-fee-advanced-example

at the bottom there is a small note that the user has to 'approve' the delegate before the transfer can happen, and indeed, if i make a call to approve before transfer_checked then the transfer works just fine.

However, how does this work in the wider ecosystem? I don't really understand how e.g. phantom should know to prepend a transfer instruction with an approve for the correct amount and get the user to sign for it, is there some mechanism by which to do that?

2 Answers 2

1

There's no mechanism to make that obvious at the moment, but perhaps a standard will emerge for "tokens that require additional approval before transferring", along with some tooling for using these kinds of tokens.

This might be for the best, because it's not a great experience to surprise people with additional fees.

0

So basically you are saying it didn't require a second sign?

Idk how to reply

Not the answer you're looking for? Browse other questions tagged or ask your own question.