-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove dependency on @solana/spl-token v0.1.8
#130
base: main
Are you sure you want to change the base?
Conversation
`spl-token` field's `getAccount().amount` is now a BigInt, instead of a BN. Due to this, some tests needed to be updated as there is no implicit equality comparison between BN and BigInt. The only way I found to compare them was to first turn the BN number to string and then initialise a new BigInt from it. It's kinda ugly but I couldn't find a better way.
✅ Deploy Preview for pensive-hamilton-d73c94 canceled.
|
If you end up merging this lmk if you would mind a few more PRs :) I've been cleaning up a bit since I needed to use it for smth, changes for now are:
|
Does this fix the current ongoing issue @0xnetfox ? |
@peterschwarzdev sorry, just seen the comment This PR isn't related to that issue. My uneducated guess is that the linked issue is related to the changes that ilmoi did to accommodate programmable NFTs at the end of January. Those changes shouldn't break existing farms as far as I know so I'd bet the issue resides on the SDK library. If updating the |
I was having difficulties using the gem-farm app as the wallet adapter kept complaining about
getMinBalanceRentForExemptMint
not existing when trying to mint a test token, using@gemworks/gem-farm-ts v0.26.4
. Digging a bit I found out that the wallet adapters have a dependency on@solana/spl-token v0.1.8
, which is a version from 2 years ago, so I've done a bit of refactoring in order to remove that dependency.The change consists mostly about deleting old imports and re-importing the correct functions, with correct parameters and correct types from the newest version of the spl-token library, and fixing the tests that complained.
The change ended up being bigger than I expected, so I may have fucked up something :D the tests all pass correctly and as far as I tried, the app wallet adapter works correctly now when pointed to the local version of the library.
Let me know if the change is ok or anything needs to be modified :)