-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Hello, dab 0.4.4 has some errors with getAllUserNFTs func. In your file nfts_refistry.js this principal not work with plug principal. But if call with string, it work with errors.
const userPrincipal = user instanceof principal_1.Principal ? user : principal_1.Principal.fromText(user);

please, help with this problem
const result = await window.ic.plug.getPrincipal();
const collections = await getAllUserNFTs(
{user: principal.toString()}
);
"@psychedelic/dab-js": "^0.4.4",
p.s. with stoic same error
but func getUserNFTs work only with plug, with stoic error
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());
console.log(identity);
const standard = 'EXT';
const agent = new HttpAgent({
identity
});
console.log(agent);
const NFTActor = getNFTActor({canisterId: canisterId, agent: agent, standard: standard});
const collections = await NFTActor.getUserTokens(identity.getPrincipal());
console.log(collections);
//Disconnect after
StoicIdentity.disconnect();
})
Metadata
Metadata
Assignees
Labels
No labels
