Open goheesheng opened 1 week ago
Hey @goheesheng thanks for raising this issue.
I'm sorry for the inconvenience caused here, we removed that documentation in release 0.90.0
but I think was an error on our part. So we should re-introduce it.
That being said, we use the generateTestWallet
utility for test suites in node. If you would like to generate a test wallet in the browser I would recommend that you use the Wallet.generate method. e.g.
const provider = await Provider.create(NODE_URL);
wallet = Wallet.generate({ provider });
localStorage.setItem('my-wallet-pk', wallet.privateKey);
For more information, you can read here
I was able to reproduce the issue you are facing locally, the error you're encountering is due to a version mismatch between the Provider
types from different versions of the @fuel-ts/account
package i.e. you're using fuels@0.89.2
and @fuel-ts/account@0.90.0
( since there was previously this issue in @fuel-ts/account@0.89.2
) .
Regardless your setup is correct if you are testing in node, you can find a code snippet here
Please let me know if this resolves your issue.
What version of fuels-ts are you using?
^0.89.2
Steps to Reproduce
Hi, is there an update going on? Not sure why it doesn't work and the documentation page is down https://docs.fuel.network/docs/fuels-ts/wallets/test-wallets/#setting-up-test-wallets
This is the code and I am running the local fuel node.
This is the forum post: https://forum.fuel.network/t/nodemodules-unable-to-import-generatetestwallet/5859
Expected Behavior
Able to use
generateTestWallet
and create a test wallet variableActual Behavior
Error: