Replies: 4 comments 10 replies
-
Hi @vodanh86, Could you provide some details? Did you set up your .env with wallets and everything? Did you try to go through step by step tutorial from the related article? https://docs.ton.org/develop/dapps/tutorials/building-web3-game |
Beta Was this translation helpful? Give feedback.
-
Yes, I did follow every step. This is the .env file: NODE_ENV=development Client ConfigurationAPI_URL=http://127.0.0.1:4000/api Web Server ConfigurationCORS_ENABLED=true Network ConfigurationNETWORK=testnet Your MNEMONICMNEMONIC="*****" Pinata API KeysPINATA_API_KEY=***** Telegram Bot TokenTELEGRAM_BOT_TOKEN=****** JettonJETTON_ADDRESS="0QBI7qSmcLXLBzIe00pvYquviANpbpeZ-b9oB5XYZfbA0_ac" SBT CollectionFIRST_TIME_SBT_COLLECTION_ADDRESS="0QAmhsTbd5e6lLEOLkHbEjkjFbz7Kek3JyS2RIqrS4IfFrwP" |
Beta Was this translation helpful? Give feedback.
-
Hi @vodanh86, It seems the connected wallet has no For the example: I connected 2 wallets. One of them has Flappy coins, the second one has not. Wallet which has jettons shows correct balance. Try to play a couple of times to earn Flappy coins and you should see the balance will shown as expected I hope it helps |
Beta Was this translation helpful? Give feedback.
-
Many thanks, Barinbritva !!! |
Beta Was this translation helpful? Give feedback.
-
I use example from this repo: https://github.com/ton-community/flappy-bird
When I start the project, I got this error message: ui.ts:162 failed to load balance
from these lines of code:
async getBalance() { try { const jetton = this.gameFi.openJetton(Address.parse(this.config.TOKEN_MASTER)); const jettonWallet = await jetton.getWallet(Address.parse(this.gameFi.wallet.account.address)); const jettonWalletData = await jettonWallet.getData(); return jettonWalletData.balance; } catch (e) { console.error('failed to load balance', e); return BigInt(0); } }
Do you know how to fix?
Beta Was this translation helpful? Give feedback.
All reactions