From a388d8eb50cdba90698c4def683c95d2660bda56 Mon Sep 17 00:00:00 2001 From: matijamarjanovic Date: Fri, 17 Jan 2025 14:19:56 +0100 Subject: [PATCH] add (uncomplete) nft transfer to wallet support --- .../gno.land/r/matijamarjanovic/gnocket/wallet_registry.gno | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/gno.land/r/matijamarjanovic/gnocket/wallet_registry.gno b/examples/gno.land/r/matijamarjanovic/gnocket/wallet_registry.gno index 84eb3f80151..b3831b6e37b 100644 --- a/examples/gno.land/r/matijamarjanovic/gnocket/wallet_registry.gno +++ b/examples/gno.land/r/matijamarjanovic/gnocket/wallet_registry.gno @@ -72,6 +72,12 @@ func useWallet() { grc1155_token.SafeTransferFrom(caller, std.CurrentRealm().Addr(), grc1155.TokenID(token_id), uint64(token_balance)) println("token_id", token_id, "token_balance", token_balance) + } else if token_type == "NFT" { + tokenGetter := tokenhub.MustGetGRC721(token_key) + nft_token := tokenGetter() + nft_token.SafeTransferFrom(caller, std.CurrentRealm().Addr(), "") // TODO: token_id + println("token_id", token_id, "token_balance", token_balance) + } return true })