decentraland-dapps 13.49.0 → 13.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/audit.yml +17 -0
- package/dist/containers/Profile/Profile.d.ts +3 -12
- package/dist/containers/Profile/Profile.js +26 -30
- package/dist/containers/Profile/Profile.js.map +1 -1
- package/dist/containers/Profile/Profile.types.d.ts +2 -8
- package/dist/containers/Profile/index.d.ts +1 -1
- package/dist/containers/Profile/index.js +2 -2
- package/dist/containers/Profile/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/containers/Profile/Profile.container.d.ts +0 -17
- package/dist/containers/Profile/Profile.container.js +0 -20
- package/dist/containers/Profile/Profile.container.js.map +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: Audit
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
audit:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
|
|
9
|
+
steps:
|
|
10
|
+
- name: Checkout repository
|
|
11
|
+
uses: actions/checkout@v3
|
|
12
|
+
|
|
13
|
+
- name: Clean install dependencies
|
|
14
|
+
run: npm ci --legacy-peer-deps #TODO: remove this flag once we get rid of tslint
|
|
15
|
+
|
|
16
|
+
- name: Audit signatures
|
|
17
|
+
run: npm audit signatures
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from 'react';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
import { Props } from './Profile.types';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
inline: boolean;
|
|
7
|
-
};
|
|
8
|
-
timeout: NodeJS.Timeout | null;
|
|
9
|
-
componentWillMount(): void;
|
|
10
|
-
componentDidUpdate(prevProps: Props): void;
|
|
11
|
-
fetchProfile(props: Props): void;
|
|
12
|
-
render(): JSX.Element;
|
|
13
|
-
}
|
|
3
|
+
declare const Profile: <T extends React.ElementType<any>>(props: Props<T>) => JSX.Element;
|
|
4
|
+
export default Profile;
|
|
@@ -19,44 +19,40 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
const
|
|
22
|
+
const react_1 = __importStar(require("react"));
|
|
23
|
+
const react_redux_1 = require("react-redux");
|
|
23
24
|
const Profile_1 = require("decentraland-ui/dist/components/Profile/Profile");
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
fetchProfile(props) {
|
|
38
|
-
const { address, avatar, debounce, onLoadProfile } = props;
|
|
25
|
+
const actions_1 = require("../../modules/profile/actions");
|
|
26
|
+
const selectors_1 = require("../../modules/profile/selectors");
|
|
27
|
+
const Profile = function (props) {
|
|
28
|
+
const { address, debounce, inline = true } = props;
|
|
29
|
+
const profiles = (0, react_redux_1.useSelector)(selectors_1.getData);
|
|
30
|
+
const dispatch = (0, react_redux_1.useDispatch)();
|
|
31
|
+
const timeoutRef = (0, react_1.useRef)();
|
|
32
|
+
const avatar = (0, react_1.useMemo)(() => {
|
|
33
|
+
const profile = profiles[address];
|
|
34
|
+
return profile ? profile.avatars[0] : null;
|
|
35
|
+
}, [address, profiles]);
|
|
36
|
+
const onLoadProfile = (0, react_1.useCallback)((address) => dispatch((0, actions_1.loadProfileRequest)(address)), [address]);
|
|
37
|
+
(0, react_1.useEffect)(() => {
|
|
39
38
|
if (!avatar) {
|
|
40
39
|
if (debounce) {
|
|
41
|
-
if (
|
|
42
|
-
clearTimeout(
|
|
40
|
+
if (timeoutRef.current) {
|
|
41
|
+
clearTimeout(timeoutRef.current);
|
|
43
42
|
}
|
|
44
|
-
|
|
45
|
-
onLoadProfile(address);
|
|
46
|
-
this.timeout = null;
|
|
47
|
-
}, debounce);
|
|
43
|
+
timeoutRef.current = window.setTimeout(() => onLoadProfile(address), debounce);
|
|
48
44
|
}
|
|
49
45
|
else {
|
|
50
46
|
onLoadProfile(address);
|
|
51
47
|
}
|
|
52
48
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
Profile.
|
|
60
|
-
inline: true
|
|
49
|
+
return () => {
|
|
50
|
+
if (timeoutRef.current) {
|
|
51
|
+
window.clearTimeout(timeoutRef.current);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}, [address]);
|
|
55
|
+
return react_1.default.createElement(Profile_1.Profile, Object.assign({}, props, { avatar: avatar, inline: inline }));
|
|
61
56
|
};
|
|
57
|
+
exports.default = Profile;
|
|
62
58
|
//# sourceMappingURL=Profile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Profile.js","sourceRoot":"","sources":["../../../src/containers/Profile/Profile.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"Profile.js","sourceRoot":"","sources":["../../../src/containers/Profile/Profile.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,6CAAsD;AACtD,6EAAwF;AACxF,2DAAkE;AAClE,+DAAwE;AAGxE,MAAM,OAAO,GAAG,UAAsC,KAAe;IACnE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,KAAK,CAAA;IAClD,MAAM,QAAQ,GAAG,IAAA,yBAAW,EAAC,mBAAW,CAAC,CAAA;IACzC,MAAM,QAAQ,GAAG,IAAA,yBAAW,GAAE,CAAA;IAE9B,MAAM,UAAU,GAAG,IAAA,cAAM,GAAiB,CAAA;IAE1C,MAAM,MAAM,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC1B,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAA;QACjC,OAAO,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;IAC5C,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAA;IAEvB,MAAM,aAAa,GAA8B,IAAA,mBAAW,EAC1D,CAAC,OAAe,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAA,4BAAkB,EAAC,OAAO,CAAC,CAAC,EAC1D,CAAC,OAAO,CAAC,CACV,CAAA;IAED,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM,EAAE;YACX,IAAI,QAAQ,EAAE;gBACZ,IAAI,UAAU,CAAC,OAAO,EAAE;oBACtB,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;iBACjC;gBACD,UAAU,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,CACpC,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,EAC5B,QAAQ,CACT,CAAA;aACF;iBAAM;gBACL,aAAa,CAAC,OAAO,CAAC,CAAA;aACvB;SACF;QAED,OAAO,GAAG,EAAE;YACV,IAAI,UAAU,CAAC,OAAO,EAAE;gBACtB,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;aACxC;QACH,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IAEb,OAAO,8BAAC,iBAAW,oBAAK,KAAK,IAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,IAAI,CAAA;AACnE,CAAC,CAAA;AAED,kBAAe,OAAO,CAAA"}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ProfileProps } from 'decentraland-ui/dist/components/Profile/Profile';
|
|
2
|
-
|
|
3
|
-
import { Dispatch } from 'redux';
|
|
4
|
-
export declare type Props = ProfileProps & {
|
|
3
|
+
export declare type Props<T extends React.ElementType> = ProfileProps<T> & {
|
|
5
4
|
debounce?: number;
|
|
6
|
-
onLoadProfile: typeof loadProfileRequest;
|
|
7
5
|
};
|
|
8
|
-
export declare type MapStateProps = Pick<Props, 'avatar'>;
|
|
9
|
-
export declare type MapDispatchProps = Pick<Props, 'onLoadProfile'>;
|
|
10
|
-
export declare type MapDispatch = Dispatch<LoadProfileRequestAction>;
|
|
11
|
-
export declare type OwnProps = Pick<Props, 'address'>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import Profile from './Profile
|
|
1
|
+
import Profile from './Profile';
|
|
2
2
|
export default Profile;
|
|
@@ -3,6 +3,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
7
|
-
exports.default =
|
|
6
|
+
const Profile_1 = __importDefault(require("./Profile"));
|
|
7
|
+
exports.default = Profile_1.default;
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/Profile/index.ts"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/Profile/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA+B;AAC/B,kBAAe,iBAAO,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "decentraland-dapps",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.51.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@0xsequence/multicall": "^0.25.1",
|
|
6
6
|
"@0xsequence/relayer": "^0.25.1",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"dcl-catalyst-client": "^14.0.9",
|
|
15
15
|
"decentraland-connect": "^3.5.0",
|
|
16
16
|
"decentraland-crypto-fetch": "^1.0.3",
|
|
17
|
-
"decentraland-transactions": "^1.
|
|
18
|
-
"decentraland-ui": "^3.
|
|
17
|
+
"decentraland-transactions": "^1.44.0",
|
|
18
|
+
"decentraland-ui": "^3.98.1",
|
|
19
19
|
"ethers": "^5.6.8",
|
|
20
20
|
"events": "^3.3.0",
|
|
21
21
|
"flat": "^5.0.2",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { OwnProps } from './Profile.types';
|
|
3
|
-
import Profile from './Profile';
|
|
4
|
-
declare const _default: import("react-redux").ConnectedComponent<typeof Profile, import("react-redux").Omit<Pick<import("react").ClassAttributes<Profile> & import("decentraland-ui/dist/components/Profile/Profile").ProfileProps & {
|
|
5
|
-
debounce?: number | undefined;
|
|
6
|
-
onLoadProfile: (address: string) => import("typesafe-actions/dist/types").PayloadAction<"[Request] Load profile", {
|
|
7
|
-
address: string;
|
|
8
|
-
}>;
|
|
9
|
-
}, "address" | "size" | "avatar" | "textOnly" | "imageOnly" | "hasPopup" | "sliceAddressBy" | "isDecentraland" | "debounce" | "onLoadProfile" | keyof import("react").ClassAttributes<Profile>> & Partial<Pick<import("react").ClassAttributes<Profile> & import("decentraland-ui/dist/components/Profile/Profile").ProfileProps & {
|
|
10
|
-
debounce?: number | undefined;
|
|
11
|
-
onLoadProfile: (address: string) => import("typesafe-actions/dist/types").PayloadAction<"[Request] Load profile", {
|
|
12
|
-
address: string;
|
|
13
|
-
}>;
|
|
14
|
-
}, "inline">> & Partial<Pick<{
|
|
15
|
-
inline: boolean;
|
|
16
|
-
}, never>>, "avatar" | "onLoadProfile"> & OwnProps>;
|
|
17
|
-
export default _default;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_redux_1 = require("react-redux");
|
|
7
|
-
const selectors_1 = require("../../modules/profile/selectors");
|
|
8
|
-
const actions_1 = require("../../modules/profile/actions");
|
|
9
|
-
const Profile_1 = __importDefault(require("./Profile"));
|
|
10
|
-
const mapState = (state, ownProps) => {
|
|
11
|
-
const profile = (0, selectors_1.getData)(state)[ownProps.address];
|
|
12
|
-
return {
|
|
13
|
-
avatar: profile ? profile.avatars[0] : null
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
const mapDispatch = (dispatch) => ({
|
|
17
|
-
onLoadProfile: address => dispatch((0, actions_1.loadProfileRequest)(address))
|
|
18
|
-
});
|
|
19
|
-
exports.default = (0, react_redux_1.connect)(mapState, mapDispatch)(Profile_1.default);
|
|
20
|
-
//# sourceMappingURL=Profile.container.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Profile.container.js","sourceRoot":"","sources":["../../../src/containers/Profile/Profile.container.ts"],"names":[],"mappings":";;;;;AAAA,6CAAqC;AACrC,+DAAwE;AACxE,2DAAkE;AAOlE,wDAA+B;AAE/B,MAAM,QAAQ,GAAG,CAAC,KAAU,EAAE,QAAkB,EAAiB,EAAE;IACjE,MAAM,OAAO,GAAG,IAAA,mBAAW,EAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACpD,OAAO;QACL,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;KAC5C,CAAA;AACH,CAAC,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,QAAqB,EAAoB,EAAE,CAAC,CAAC;IAChE,aAAa,EAAE,OAAO,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAA,4BAAkB,EAAC,OAAO,CAAC,CAAC;CAChE,CAAC,CAAA;AAEF,kBAAe,IAAA,qBAAO,EACpB,QAAQ,EACR,WAAW,CACZ,CAAC,iBAAO,CAAC,CAAA"}
|