Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

replaced the deprecated getRecentBlockhash with getLatestBlockhash #243

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

0x2539
Copy link

@0x2539 0x2539 commented Sep 16, 2024

Fixes #242

The createTransfer and fetchTransaction functions use getRecentBlockhash internally which has been deprecated and now it's throwing:

Error: failed to get recent blockhash:
SolanaJSONRPCError: failed to get recent blockhash: Method not found

The solution for this is to use the replacement function getLatestBlockhash instead. I have this already running in production and fixed my problem.

For anyone needing this urgently, change the version in your package.json to: "@solana/pay": "https://gitpkg.vercel.app/0x2539/solana-pay/core?fix/latest-blockhash-build"

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: Failed to get recent blockhash
1 participant