diff --git a/package.json b/package.json index 3a5e60f..1a2bb4a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@eppo/js-client-sdk-common", - "version": "4.8.3-alpha.1", + "version": "4.8.3-alpha.3", "description": "Common library for Eppo JavaScript SDKs (web, react native, and node)", "main": "dist/index.js", "files": [ @@ -78,4 +78,4 @@ "uuid": "^11.0.5" }, "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" -} \ No newline at end of file +} diff --git a/src/obfuscation.ts b/src/obfuscation.ts index cd71728..671d2b7 100644 --- a/src/obfuscation.ts +++ b/src/obfuscation.ts @@ -29,17 +29,16 @@ export function obfuscatePrecomputedBanditMap( return Object.fromEntries( Object.entries(bandits).map(([variationValue, bandit]) => { const hashedKey = getMD5Hash(variationValue, salt); - return [hashedKey, obfuscatePrecomputedBandit(salt, bandit)]; + return [hashedKey, obfuscatePrecomputedBandit(bandit)]; }), ); } function obfuscatePrecomputedBandit( - salt: string, banditResult: IPrecomputedBandit, ): IObfuscatedPrecomputedBandit { return { - banditKey: getMD5Hash(banditResult.banditKey, salt), + banditKey: encodeBase64(banditResult.banditKey), action: encodeBase64(banditResult.action), actionProbability: banditResult.actionProbability, optimalityGap: banditResult.optimalityGap,