Skip to content

Commit

Permalink
fix: update user data for intercom
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuzhy-Deriv committed Nov 25, 2024
1 parent 0a2187b commit ba683d0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions public/scripts/intercom/v1.0.1.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ const getAppID = () => {
};

class DerivInterCom {
constructor({ token = null, hideLauncher = true, userData = null } = {}) {
constructor({ token = null, hideLauncher = true } = {}) {
this.authToken = token;
this.userData = userData;
const config_url = localStorage
.getItem("config.server_url")
?.replace(/^['"]+|['"]+$/g, "");
Expand Down Expand Up @@ -67,14 +66,15 @@ class DerivInterCom {
});

if (userHashData) {
const { signature, user_id } = userHashData;
const { signature, name, email, phone, user_id } = userHashData;
this.intercomConfig = {
...this.intercomConfig,
api_base: "https://api-iam.intercom.io",
user_id,
user_hash: signature,
name: this.userData?.name, //temp, to be removed
email: this.userData?.email, //temp to be removed
name: name,
email: email,
phone: phone
};
} else {
console.warn(
Expand Down

0 comments on commit ba683d0

Please sign in to comment.