getUserInfo()

Syntax

getUserInfor(token)

After login, you can use this method to get user information.

Parameters

Example

import { getUserInfo } from "@eueno/lib-browser";

const getData = async () => {
   try {
     const toke = window.localStorage.getItem(“eueno-token”);
     const response = await getUserInfo(token);
     console.log(response);
   } catch (error) {
     console.log(error);
   }
 };

Response of example:

"data": 
{
        "name_tag": "no_name",
        "balance_usd": 0,
        "avatar": null,
        "status": "ACTIVE",
        "_id": "63a9120afaeb20de89e9ac85",
        "account": "0xf069…87f15",
        "memo": "350648…6224",
        "createAt": "2022-12-26T03:16:26.903Z",
        "pack_info": 
        {
            "_id": "63a3cba5d8fd244d867c70d1",
            "price_to_usd": 10,
            "discount": 0,
            "project_size": 102400,
            "description": "payment",
            "type": "PAYMENT"
        }
}

Last updated