hedera-docs icon indicating copy to clipboard operation
hedera-docs copied to clipboard

test: Create and Transfer Your First NFT

Open theekrystallee opened this issue 5 months ago • 2 comments

  • [x] Java
  • [x] JavaScript
  • [x] Go
Image

https://docs.hedera.com/hedera/tutorials/token/create-and-transfer-your-first-nft

theekrystallee avatar Aug 21 '25 15:08 theekrystallee

resolved in 3060364

theekrystallee avatar Aug 28 '25 03:08 theekrystallee

"balanceCheckTx.tokens._map.get(tokenId.toString())" is maybe problematic.

  • balanceCheckTx.tokens is a TokenBalanceMap, which internally wraps a _map (a Map<string, Long>).
  • Accessing .tokens._map.get(tokenId.toString()) is poking directly into the private implementation (_map is meant to be internal).

Recommendation was to use the API: const balance = balanceCheckTx.tokens.get(tokenId); console.log(Balance for ${tokenId.toString()}: ${balance.toString()});

Reccetech avatar Aug 28 '25 21:08 Reccetech