gray-market-js
Version:
Utility library for the Gray Market rental marketplace
29 lines (27 loc) • 703 B
JavaScript
class WalletsClient {
constructor(axiosInstance) {
this.axiosInstance = axiosInstance;
}
updateWalletInfo(token, displayName, emailAddress, profilePicture = null) {
return this.axiosInstance.patch("/wallets/update",
{
profilePicture,
displayName,
emailAddress
},
{
headers: token ? {
"Authorization": `Bearer ${token}`
} : undefined
}
);
}
getWalletInfo(address, token = null) {
return this.axiosInstance.get(`/wallets/info/${address}`, {
headers: token ? {
"Authorization": `Bearer ${token}`
} : undefined
});
}
}
module.exports = WalletsClient;