@keplr-wallet/analytics 0.12.0-alpha.0 → 0.12.0-alpha.3

Sign up to get free protection for your applications and to get access to all the features.
package/LICENSE CHANGED
@@ -1,4 +1,6 @@
1
- License: Apache2.0
1
+ License: Apache2.0 (Extension) / All rights reserved (Mobile)
2
+
3
+ ## Keplr Extension License:
2
4
 
3
5
  Apache License
4
6
  Version 2.0, January 2004
@@ -200,4 +202,8 @@ License: Apache2.0
200
202
  distributed under the License is distributed on an "AS IS" BASIS,
201
203
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
204
  See the License for the specific language governing permissions and
203
- limitations under the License.
205
+ limitations under the License.
206
+
207
+ ## Keplr Mobile License
208
+
209
+ Copyright (c) 2021 Chainapsis Inc. All rights reserved.
package/build/index.d.ts CHANGED
@@ -22,6 +22,7 @@ export declare class AnalyticsStore<E extends Record<string, Readonly<string | n
22
22
  eventProperties?: E;
23
23
  };
24
24
  });
25
+ setUserId(id: string): void;
25
26
  setUserProperties(userProperties: U): void;
26
27
  logEvent(eventName: string, eventProperties?: E): void;
27
28
  logPageView(pageName: string, eventProperties?: E): void;
package/build/index.js CHANGED
@@ -19,15 +19,9 @@ class AnalyticsStore {
19
19
  this.analyticsClient = analyticsClient;
20
20
  this.middleware = middleware;
21
21
  }
22
- // Set the user id with the hashed address.
23
- // Use this address with common address that can be dealt with the user without considering the selected chain.
24
- // For example, the address will be different according to the chains (cosmoshub, secret, kava...),
25
- // but we want to classify the user without considering the chains.
26
- // So, I recommend to use only the address of the main chain (probably cosmoshub).
27
- // setUserId(bech32Address: string): void {
28
- // const hashedAddress = new sha256().update(bech32Address).digest("hex");
29
- // this.analyticsClient.setUserId(hashedAddress);
30
- // }
22
+ setUserId(id) {
23
+ this.analyticsClient.setUserId(id);
24
+ }
31
25
  setUserProperties(userProperties) {
32
26
  this.analyticsClient.setUserProperties(userProperties);
33
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings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ACT,CAAC;CACF;AAZD,kDAYC;AAED,MAAa,cAAc;IAUzB,YACqB,eAAgC,EAChC,aAQf,EAAE;QATa,oBAAe,GAAf,eAAe,CAAiB;QAChC,eAAU,GAAV,UAAU,CAQvB;IACL,CAAC;IAEJ,SAAS,CAAC,EAAU;QAClB,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACrC,CAAC;IAED,iBAAiB,CAAC,cAAiB;QACjC,IAAI,CAAC,eAAe,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACzD,CAAC;IAED,QAAQ,CAAC,SAAiB,EAAE,eAAmB;QAC7C,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;YAC5B,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;YACjE,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;YAC1B,eAAe,GAAG,GAAG,CAAC,eAAe,CAAC;SACvC;QAED,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;IAC5D,CAAC;IAED,WAAW,CAAC,QAAgB,EAAE,eAAmB;QAC/C,IAAI,CAAC,QAAQ,CAAC,GAAG,QAAQ,SAAS,EAAE,eAAe,CAAC,CAAC;IACvD,CAAC;CACF;AA5CD,wCA4CC"}
package/package.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "@keplr-wallet/analytics",
3
- "version": "0.12.0-alpha.0",
3
+ "version": "0.12.0-alpha.3",
4
4
  "main": "build/index.js",
5
5
  "author": "chainapsis",
6
6
  "license": "Apache-2.0",
7
- "private": false,
8
7
  "publishConfig": {
9
8
  "access": "public"
10
9
  },
@@ -18,5 +17,5 @@
18
17
  "dependencies": {
19
18
  "sha.js": "^2.4.11"
20
19
  },
21
- "gitHead": "34327309b724b59f8e41d044db6e57a332614fae"
20
+ "gitHead": "1ee89644b711dd1dbbebc8eb86ed29d407088834"
22
21
  }
package/src/index.tsx CHANGED
@@ -54,15 +54,9 @@ export class AnalyticsStore<
54
54
  } = {}
55
55
  ) {}
56
56
 
57
- // Set the user id with the hashed address.
58
- // Use this address with common address that can be dealt with the user without considering the selected chain.
59
- // For example, the address will be different according to the chains (cosmoshub, secret, kava...),
60
- // but we want to classify the user without considering the chains.
61
- // So, I recommend to use only the address of the main chain (probably cosmoshub).
62
- // setUserId(bech32Address: string): void {
63
- // const hashedAddress = new sha256().update(bech32Address).digest("hex");
64
- // this.analyticsClient.setUserId(hashedAddress);
65
- // }
57
+ setUserId(id: string): void {
58
+ this.analyticsClient.setUserId(id);
59
+ }
66
60
 
67
61
  setUserProperties(userProperties: U): void {
68
62
  this.analyticsClient.setUserProperties(userProperties);