Open Luchanso opened 5 months ago
Hey 👋 I’m facing the same issue, did you manage to solve this ? Or the bug is still around ? Thanks a lot !
I am also facing same issue... this is serious, I am trying to use memo to authenticate Solana Pay payments on server side. I was going to use reference field but apparently many Solana mobile wallets don't even include the reference in the transfer transaction!
Workaround: create this file with commented this line in your local project, and use this function from it:
https://gist.github.com/Luchanso/2b3e7c4f7d9ce8a6128ebe7ed004cec8#file-validate-ts-L98
Tryed call
validateTransfer(...)
and got some error for valid transaction:Simple playground: https://codesandbox.io/p/devbox/hardcore-mclaren-qtz7zg?file=%2Findex.js%3A28%2C7
function![image](https://github.com/anza-xyz/solana-pay/assets/2098777/9567d22d-3a0e-4751-abef-92c0ec1c4ca9)
validateTransfer(...)
not correct work when pass memo string, I think it's can be bug on: https://github.com/anza-xyz/solana-pay/blame/master/core/src/validateTransfer.ts#L97 because "instruction.keys" must contain single key about Signer