I am going through the tutorial in the hello world series and am facing an issue where the wallet address and balance being printed is not of the wallet from tonkeeper even though I am using the same mnemonic. Here is the code from step7.ts from the tutorial. Any help is greatly appreciated.
import dotenv from 'dotenv';
import { WalletContractV4 } from '@ton/ton';
import { mnemonicToWalletKey } from '@ton/crypto';
dotenv.config();
async function main() {
// open wallet v4 (notice the correct wallet version here)
const mnemonic = process.env.MNEMONIC1 || '';
const key = await mnemonicToWalletKey(mnemonic.split(' '));
const wallet = WalletContractV4.create({
publicKey: key.publicKey,
workchain: 0,
});
console.log(wallet);
// print wallet address
console.log(wallet.address.toString({ testOnly: true }));
// print wallet workchain
console.log('workchain:', wallet.address.workChain);
}
main();
Double-check the Address: Ensure that the wallet address you’re using matches exactly, including all characters. Even a small typo can lead to a mismatch.
Update the App: Make sure you’re using the latest version of the Tonkeeper app. Updates often fix bugs and improve functionality.
Check Network Settings: Confirm that you’re connected to the correct network (e.g., mainnet, testnet) as specified in the tutorial. Wallet addresses can differ between networks.
Restore from Seed Phrase: If you have previously used the wallet, try restoring it using your seed phrase. This can help ensure you have the correct address associated with your account.
Contact Support: If the problem persists, consider reaching out to Tonkeeper’s support team or checking their official community channels for assistance. There may be known issues or updates.
Review Tutorial Steps: Go back through the tutorial to ensure you didn’t miss any steps that might have affected the wallet address.
Ved Singh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2