Closed joncinque closed 1 year ago
I would like to try this issue, As I have seen in this issue, we have to create a function for this interface. right ? https://github.com/solana-labs/solana-program-library/blob/108e91e441e6633f046168536be571068e90169b/token/js/src/extensions/transferFee/state.ts#L13
Yep that's pretty much it. And it would also be good to add a helper like https://github.com/solana-labs/solana-program-library/blob/108e91e441e6633f046168536be571068e90169b/token/program-2022/src/extension/transfer_fee/mod.rs#L133 on TransferFeeConfig
I will try solve this issue then, if there is something i don't understand then please help me, since I'm beginner in Rust.
@dhruvdabhi101 have you worked on it? I would like to join as contributor as well :D
@dhruvdabhi101 have you worked on it? I would like to join as contributor as well :D
Ohh. I already made pull request and got merged. I think they forgot to close this issue.
Yep that's correct, https://github.com/solana-labs/solana-program-library/pull/4594 resolved it. Closing the issue
Problem
The rust side provides a nifty way to calculate a transfer fee using
calculate_fee
https://github.com/solana-labs/solana-program-library/blob/108e91e441e6633f046168536be571068e90169b/token/program-2022/src/extension/transfer_fee/mod.rs#L50, but wallets or JS clients can't use this.Solution
Add an implementation for
calculateFee
in token-js.