ton-core / ton

Most popular TON Typescript Library
MIT License
69 stars 56 forks source link

Unable to Retrieve USDT Balance from TON Mainnet #37

Open lxxxxxxi opened 3 months ago

lxxxxxxi commented 3 months ago

Description

I attempted to retrieve the USDT balance from the TON mainnet using the master contract address EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs. I confirmed that I obtained the correct jetton wallet address. However, I encountered the following error:

async getBalance(provider: ContractProvider) {
    const { stack } = await provider.get("get_wallet_data", []);
    console.log(stack);

    return fromNano(stack.readBigNumber());
}
image

When using the same method to connect to the testnet wallet and the testnet token address, I can successfully retrieve the balance without any errors.

Expected Behavior

The balance should be successfully retrieved from the TON mainnet without any errors, similar to how it works with the testnet.

Actual Behavior

An error occurs when attempting to retrieve the balance from the TON mainnet.

Additional Information

Environment

Please let me know if you need any additional information or have any suggestions for troubleshooting this issue.