How to show missing USDT amount when there are insufficient funds

Discussão em 'Angular' iniciado por Rin Kaidjo, Abril 8, 2025.

  1. Rin Kaidjo

    Rin Kaidjo Guest

    `const payload = beginCell()
    .storeUint(0xf8a7ea5, 32)
    .storeUint(0, 64)
    .storeCoins(tokenAmount)
    .storeAddress(Address.parse(recipientAddress))
    .storeAddress(Address.parse(this.account.address))
    .storeBit(0)
    .storeCoins(BigInt(this.convertTonToNano(0.05)))
    .storeBit(0)
    .endCell();
    const result = await this.tonConnectUI.sendTransaction({
    validUntil: Math.floor(Date.now() / 1000) + 360,
    messages: [
    {
    address: usdtAddress,
    amount: this.convertTonToNano(0.1),
    payload: payload.toBoc().toString('base64'),
    },
    ],
    })`


    When I make a transaction, for example a purchase for 10 USDT, and I only have 3 USDT, then an error appears in the wallet: insufficient funds (TON 0.1). I want to show how much USDT is missing. Is it possible to do this?

    I tried everything and can't find an answer.

    Continue reading...

Compartilhe esta Página