Refresh an Account

The following sample will show you how to refresh an account to get the latest user's informations.

Prerequisites:

pageGetting started

Step 1: Import modules

Let's continue building on the index.js from the previous example (Environment Set-up) and add the following modules:

const { Client, CategoryNFT } = require("@xact-wallet-sdk/client");
require("dotenv").config();

Step 2: Refresh an account

In order to refresh an account simply call the refreshAccount method :

const user =  await this.client.refreshAccount({
    accountId: "" /* Account ID of the user */
    scope: [ScopeEnum.PROFILE, ScopeEnum.NFT]
})

Last updated