Skip to content

Some errors with NFTActor.getUserTokens on localhost #84

@ghost

Description

Hello team,

I am trying to get the pxy nfts using dabjs. I am able to get actor with the call getNFTActor. However, getUserTokens is failing with the error as pasted in the screenshot below. Is there something I am missing? Please help. Thank you for your time and contribution to the dev community :-)

    StoicIdentity.load().then(async identity => {
        if (identity !== false) {
          //ID is a already connected wallet!
        } else {
          //No existing connection, lets make one!
          identity = await StoicIdentity.connect();
        }
        
        //Lets display the connected principal!
        console.log(identity.getPrincipal().toText());

        const canisterId = '46sy3-aiaaa-aaaah-qczza-cai';
        const standard = 'EXT';
        
        const agent = new HttpAgent({identity});
        console.log('agent: ' + agent);
        
        const NFTActor = getNFTActor({ canisterId, agent, standard });
        console.log('actor: ' + NFTActor);
        
        const userTokens = await NFTActor.getUserTokens(identity.getPrincipal());
        console.log('tokens: ' + userTokens);
        
       //Disconnect after
        StoicIdentity.disconnect();
      })

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions