Comments (2)
For others encountering this issue, it is an issue with jest: jestjs/jest#4422
The jest issue causes buffer instanceof Uint8Array
to be false, which is the issue OP is having.
I was able to workaround this issue by placing the following code into my jest setup script (jest.setup.js
) (defined in setupFilesAfterEnv
in jest config)
const originalHasInstance = Uint8Array[Symbol.hasInstance];
Object.defineProperty(Uint8Array, Symbol.hasInstance, {
value(potentialInstance) {
return (
originalHasInstance.call(this, potentialInstance) ||
Buffer.isBuffer(potentialInstance)
);
},
});
This extends the instanceof
logic of Uint8Array
to additionally check if the object is a buffer, and if so, instanceof Uint8Array
will return true.
Hope it helps!
from solana-pay.
Hmm I can't really tell what's going on, but this sounds like an issue with the new test rather than the createTransfer
function itself. I would suggest opening a PR from your branch to the link-request
branch and we can comment on that PR instead of an issue since this doesn't affect the master
branch.
Looking at your code, I'm guessing the issue is related to this line? https://github.com/tyirenkyi/solana-pay/blob/7a935665ee5c91fd8e6aca5582eb10a300d4ba21/core/test/createTransfer.test.ts#L11
from solana-pay.
Related Issues (20)
- Required Package missing in NFT create example HOT 2
- Debug issue HOT 2
- Validate Transfer function should return success even if the token transfer was not performed in the last instruction HOT 5
- Cannot load from CDN: Uncaught ReferenceError: exports is not defined
- Confirmed Page Not Showing Up HOT 1
- Query issue: Amount does not show on pending page HOT 2
- Add a reference project for WooCommerce
- Transferring multiple NFTs in a single QR Code HOT 1
- [feature] add ts package for express middleware around transaction handling HOT 1
- Error parsing recipient from url HOT 1
- Sol Pay method has little visibility/contrast on Shopify. HOT 2
- Pay bills
- Proposal: Solana Pay e-store directory HOT 1
- Not being able to sell my own accounts
- I want to cancel my transaction and send to another wallet 41edaa5901d112216083edc935b268f0faffa0020ce6661e082e5f2b81e01a04 HOT 1
- I want to cancel my transaction and send to another wallet 41edaa5901d112216083edc935b268f0faffa0020ce6661e082e5f2b81e01a04 HOT 1
- If you have been waiting for a long period for your transaction to be processed, the most likely reason is a low transaction fee.
- ValidateTransferError: invalid memo keys HOT 1
- [feature] universal link support
- RC#SYSTEM HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from solana-pay.