decentraland-dapps 12.32.0 → 12.34.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/README.md +5 -3
- package/dist/containers/ChainButton/ChainButton.js +2 -2
- package/dist/containers/ChainButton/ChainButton.js.map +1 -1
- package/dist/containers/ChainButton/ChainButton.types.d.ts +2 -2
- package/dist/containers/ChainCheck/ChainCheck.js +4 -4
- package/dist/containers/ChainCheck/ChainCheck.js.map +1 -1
- package/dist/containers/ChainCheck/ChainCheck.types.d.ts +1 -1
- package/dist/containers/ChainProvider/ChainProvider.container.js +2 -2
- package/dist/containers/ChainProvider/ChainProvider.container.js.map +1 -1
- package/dist/containers/ChainProvider/ChainProvider.types.d.ts +2 -1
- package/dist/containers/Footer/Footer.d.ts +1 -1
- package/dist/containers/Footer/Footer.js +2 -2
- package/dist/containers/Footer/Footer.js.map +1 -1
- package/dist/containers/Footer/Footer.types.d.ts +1 -1
- package/dist/containers/LoginModal/LoginModal.container.d.ts +3 -3
- package/dist/containers/LoginModal/LoginModal.d.ts +1 -1
- package/dist/containers/LoginModal/LoginModal.js +1 -1
- package/dist/containers/LoginModal/LoginModal.js.map +1 -1
- package/dist/containers/LoginModal/LoginModal.types.d.ts +2 -2
- package/dist/containers/LoginModal/utils.d.ts +1 -1
- package/dist/containers/LoginModal/utils.js +7 -7
- package/dist/containers/LoginModal/utils.js.map +1 -1
- package/dist/containers/Modal/Modal.js +2 -2
- package/dist/containers/Modal/Modal.js.map +1 -1
- package/dist/containers/Modal/Modal.types.d.ts +1 -1
- package/dist/containers/Modal/index.d.ts +1 -1
- package/dist/containers/Modal/index.js +5 -5
- package/dist/containers/Modal/index.js.map +1 -1
- package/dist/containers/Navbar/Navbar.d.ts +1 -1
- package/dist/containers/Navbar/Navbar.js +16 -14
- package/dist/containers/Navbar/Navbar.js.map +1 -1
- package/dist/containers/Navbar/Navbar.types.d.ts +2 -2
- package/dist/containers/NetworkButton/NetworkButton.js +2 -2
- package/dist/containers/NetworkButton/NetworkButton.js.map +1 -1
- package/dist/containers/NetworkButton/NetworkButton.types.d.ts +2 -2
- package/dist/containers/NetworkCheck/NetworkCheck.d.ts +1 -1
- package/dist/containers/NetworkCheck/NetworkCheck.js +4 -4
- package/dist/containers/NetworkCheck/NetworkCheck.js.map +1 -1
- package/dist/containers/NetworkCheck/NetworkCheck.types.d.ts +1 -1
- package/dist/containers/Profile/Profile.container.d.ts +2 -2
- package/dist/containers/Profile/Profile.js +2 -2
- package/dist/containers/Profile/Profile.js.map +1 -1
- package/dist/containers/Profile/Profile.types.d.ts +1 -1
- package/dist/containers/SignInPage/SignInPage.d.ts +1 -1
- package/dist/containers/SignInPage/SignInPage.js +2 -2
- package/dist/containers/SignInPage/SignInPage.js.map +1 -1
- package/dist/containers/SignInPage/SignInPage.types.d.ts +2 -2
- package/dist/containers/TransactionLink/TransactionLink.types.d.ts +1 -1
- package/dist/containers/UserMenu/UserMenu.container.d.ts +1 -1
- package/dist/containers/UserMenu/UserMenu.container.js +2 -2
- package/dist/containers/UserMenu/UserMenu.container.js.map +1 -1
- package/dist/containers/UserMenu/UserMenu.d.ts +1 -1
- package/dist/containers/UserMenu/UserMenu.js +2 -2
- package/dist/containers/UserMenu/UserMenu.js.map +1 -1
- package/dist/containers/UserMenu/UserMenu.types.d.ts +1 -1
- package/dist/lib/chainConfiguration.d.ts +2 -1
- package/dist/lib/chainConfiguration.js +35 -34
- package/dist/lib/chainConfiguration.js.map +1 -1
- package/dist/lib/eth.d.ts +4 -2
- package/dist/lib/eth.js +5 -4
- package/dist/lib/eth.js.map +1 -1
- package/dist/lib/types.d.ts +2 -2
- package/dist/modules/authorization/actions.d.ts +1 -1
- package/dist/modules/authorization/types.d.ts +1 -1
- package/dist/modules/authorization/utils.js +5 -3
- package/dist/modules/authorization/utils.js.map +1 -1
- package/dist/modules/profile/sagas.js +2 -2
- package/dist/modules/profile/sagas.js.map +1 -1
- package/dist/modules/profile/types.d.ts +1 -1
- package/dist/modules/toast/types.d.ts +1 -1
- package/dist/modules/transaction/txUtils.d.ts +1 -1
- package/dist/modules/transaction/types.d.ts +1 -1
- package/dist/modules/transaction/utils.d.ts +1 -1
- package/dist/modules/transaction/utils.js +7 -7
- package/dist/modules/transaction/utils.js.map +1 -1
- package/dist/modules/translation/actions.d.ts +1 -1
- package/dist/modules/translation/reducer.d.ts +1 -1
- package/dist/modules/translation/selectors.d.ts +1 -1
- package/dist/modules/translation/utils.d.ts +1 -1
- package/dist/modules/wallet/actions.d.ts +2 -2
- package/dist/modules/wallet/sagas.js +2 -2
- package/dist/modules/wallet/sagas.js.map +1 -1
- package/dist/modules/wallet/selectors.d.ts +2 -2
- package/dist/modules/wallet/selectors.js +2 -2
- package/dist/modules/wallet/selectors.js.map +1 -1
- package/dist/modules/wallet/types.d.ts +4 -2
- package/dist/modules/wallet/types.js +2 -2
- package/dist/modules/wallet/types.js.map +1 -1
- package/dist/modules/wallet/utils.d.ts +1 -1
- package/dist/modules/wallet/utils.js +9 -9
- package/dist/modules/wallet/utils.js.map +1 -1
- package/dist/providers/ToastProvider/ToastProvider.js +4 -3
- package/dist/providers/ToastProvider/ToastProvider.js.map +1 -1
- package/dist/providers/ToastProvider/ToastProvider.types.d.ts +1 -1
- package/dist/providers/TranslationProvider/TranslationProvider.js +2 -2
- package/dist/providers/TranslationProvider/TranslationProvider.js.map +1 -1
- package/dist/providers/TranslationProvider/TranslationProvider.types.d.ts +1 -1
- package/dist/providers/WalletProvider/WalletProvider.types.d.ts +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -788,6 +788,8 @@ The analytics module let's integrate Segment into your dApp.
|
|
|
788
788
|
|
|
789
789
|
You need to have the `Wallet` module installed in order to send `identify` events.
|
|
790
790
|
|
|
791
|
+
This module will import the segment snippet into your dApp. Be aware that the middleware must be loaded before using segment methods.
|
|
792
|
+
|
|
791
793
|
To send `track` events, add an `analytics.ts` file and require it from your entry point, and use the `add()` helper to add actions that you want to track:
|
|
792
794
|
|
|
793
795
|
```ts
|
|
@@ -1010,7 +1012,7 @@ export { default as HelpModal } from './HelpModal'
|
|
|
1010
1012
|
Each modal will receive the properties defined on the `ModalComponent` type, found on `modules/modal/types`, so for example:
|
|
1011
1013
|
|
|
1012
1014
|
```tsx
|
|
1013
|
-
import { Modal } from 'decentraland-ui'
|
|
1015
|
+
import { Modal } from 'decentraland-ui/dist/components/Modal/Modal'
|
|
1014
1016
|
import { ModalProps } from 'decentraland-dapps/dist/modules/modal/types'
|
|
1015
1017
|
|
|
1016
1018
|
type HelpModalProps = ModalProps & {
|
|
@@ -1305,7 +1307,7 @@ This is an example of a `SomePage` component that uses the `<Navbar>` container:
|
|
|
1305
1307
|
```tsx
|
|
1306
1308
|
import * as React from 'react'
|
|
1307
1309
|
|
|
1308
|
-
import { Container } from 'decentraland-ui'
|
|
1310
|
+
import { Container } from 'decentraland-ui/dist/components/Container/Container'
|
|
1309
1311
|
import Navbar from 'decentraland-dapps/dist/containers/Navbar'
|
|
1310
1312
|
|
|
1311
1313
|
import './SomePage.css'
|
|
@@ -1382,7 +1384,7 @@ This is an example of a `SomePage` component that uses the `<Footer>` container:
|
|
|
1382
1384
|
```tsx
|
|
1383
1385
|
import * as React from 'react'
|
|
1384
1386
|
|
|
1385
|
-
import { Container } from 'decentraland-ui'
|
|
1387
|
+
import { Container } from 'decentraland-ui/dist/components/Container/Container'
|
|
1386
1388
|
import Navbar from 'decentraland-dapps/dist/containers/Navbar'
|
|
1387
1389
|
|
|
1388
1390
|
import './SomePage.css'
|
|
@@ -15,7 +15,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
const react_1 = __importDefault(require("react"));
|
|
18
|
-
const
|
|
18
|
+
const Button_1 = require("decentraland-ui/dist/components/Button/Button");
|
|
19
19
|
const ChainCheck_1 = __importDefault(require("../ChainCheck"));
|
|
20
20
|
const disabledStyle = { opacity: 0.5, cursor: 'not-allowed', transform: 'none' };
|
|
21
21
|
class ChainButton extends react_1.default.PureComponent {
|
|
@@ -23,7 +23,7 @@ class ChainButton extends react_1.default.PureComponent {
|
|
|
23
23
|
const _a = this.props, { chainId, onClick } = _a, rest = __rest(_a, ["chainId", "onClick"]);
|
|
24
24
|
return (react_1.default.createElement(ChainCheck_1.default, { chainId: chainId }, isEnabled => {
|
|
25
25
|
const props = isEnabled ? { onClick } : { style: disabledStyle };
|
|
26
|
-
return react_1.default.createElement(
|
|
26
|
+
return react_1.default.createElement(Button_1.Button, Object.assign({}, rest, props));
|
|
27
27
|
}));
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainButton.js","sourceRoot":"","sources":["../../../src/containers/ChainButton/ChainButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAyB;AACzB,
|
|
1
|
+
{"version":3,"file":"ChainButton.js","sourceRoot":"","sources":["../../../src/containers/ChainButton/ChainButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAyB;AACzB,0EAAyF;AAEzF,+DAAsC;AAEtC,MAAM,aAAa,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,CAAA;AAEhF,MAAqB,WAAY,SAAQ,eAAK,CAAC,aAAoB;IACjE,MAAM;QACJ,MAAM,KAAgC,IAAI,CAAC,KAAK,EAA1C,EAAE,OAAO,EAAE,OAAO,OAAwB,EAAnB,IAAI,cAA3B,sBAA6B,CAAa,CAAA;QAChD,OAAO,CACL,8BAAC,oBAAU,IAAC,OAAO,EAAE,OAAO,IACzB,SAAS,CAAC,EAAE;YACX,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA;YAChE,OAAO,8BAAC,eAAe,oBAAK,IAAI,EAAM,KAAK,EAAI,CAAA;QACjD,CAAC,CACU,CACd,CAAA;IACH,CAAC;CACF;AAZD,8BAYC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ButtonProps } from 'decentraland-ui';
|
|
2
|
-
import { ChainId } from '@dcl/schemas';
|
|
1
|
+
import { ButtonProps } from 'decentraland-ui/dist/components/Button/Button';
|
|
2
|
+
import { ChainId } from '@dcl/schemas/dist/dapps/chain-id';
|
|
3
3
|
export declare type Props = ButtonProps & {
|
|
4
4
|
chainId: ChainId;
|
|
5
5
|
};
|
|
@@ -4,18 +4,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const
|
|
7
|
+
const Popup_1 = require("decentraland-ui/dist/components/Popup/Popup");
|
|
8
8
|
const utils_1 = require("../../modules/translation/utils");
|
|
9
9
|
const eth_1 = require("../../lib/eth");
|
|
10
|
-
const
|
|
10
|
+
const chain_id_1 = require("@dcl/schemas/dist/dapps/chain-id");
|
|
11
11
|
const ChainProvider_1 = __importDefault(require("../ChainProvider"));
|
|
12
12
|
class ChainCheck extends react_1.default.PureComponent {
|
|
13
13
|
render() {
|
|
14
14
|
const { chainId, children } = this.props;
|
|
15
15
|
return (react_1.default.createElement(ChainProvider_1.default, null, data => {
|
|
16
16
|
const isEnabled = data.isSupported || data.chainId === chainId;
|
|
17
|
-
return (react_1.default.createElement(
|
|
18
|
-
expectedChainName: (react_1.default.createElement("b", null,
|
|
17
|
+
return (react_1.default.createElement(Popup_1.Popup, { disabled: isEnabled, position: "top center", content: react_1.default.createElement(utils_1.T, { id: "@dapps.button.network_not_supported", values: {
|
|
18
|
+
expectedChainName: (react_1.default.createElement("b", null, chain_id_1.getChainName(eth_1.getConnectedProviderChainId())))
|
|
19
19
|
} }), trigger: children(isEnabled) }));
|
|
20
20
|
}));
|
|
21
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainCheck.js","sourceRoot":"","sources":["../../../src/containers/ChainCheck/ChainCheck.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,
|
|
1
|
+
{"version":3,"file":"ChainCheck.js","sourceRoot":"","sources":["../../../src/containers/ChainCheck/ChainCheck.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,uEAAmE;AACnE,2DAAmD;AACnD,uCAA2D;AAE3D,+DAA+D;AAC/D,qEAA4C;AAE5C,MAAqB,UAAW,SAAQ,eAAK,CAAC,aAAoB;IAChE,MAAM;QACJ,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QACxC,OAAO,CACL,8BAAC,uBAAa,QACX,IAAI,CAAC,EAAE;YACN,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,OAAO,KAAK,OAAO,CAAA;YAC9D,OAAO,CACL,8BAAC,aAAK,IACJ,QAAQ,EAAE,SAAS,EACnB,QAAQ,EAAC,YAAY,EACrB,OAAO,EACL,8BAAC,SAAC,IACA,EAAE,EAAC,qCAAqC,EACxC,MAAM,EAAE;wBACN,iBAAiB,EAAE,CACjB,yCAAI,uBAAY,CAAC,iCAA2B,EAAG,CAAC,CAAK,CACtD;qBACF,GACD,EAEJ,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,GAC5B,CACH,CAAA;QACH,CAAC,CACa,CACjB,CAAA;IACH,CAAC;CACF;AA5BD,6BA4BC"}
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_redux_1 = require("react-redux");
|
|
7
|
-
const
|
|
7
|
+
const provider_type_1 = require("@dcl/schemas/dist/dapps/provider-type");
|
|
8
8
|
const selectors_1 = require("../../modules/wallet/selectors");
|
|
9
9
|
const chainConfiguration_1 = require("../../lib/chainConfiguration");
|
|
10
10
|
const eth_1 = require("../../lib/eth");
|
|
@@ -19,7 +19,7 @@ const mapState = (state) => {
|
|
|
19
19
|
const isSupported = isConnected && chainId === expectedChainId;
|
|
20
20
|
const isPartiallySupported = isConnected &&
|
|
21
21
|
!isSupported &&
|
|
22
|
-
providerType !==
|
|
22
|
+
providerType !== provider_type_1.ProviderType.WALLET_CONNECT &&
|
|
23
23
|
Object.values(config.networkMapping).some(mappedChainId => mappedChainId === chainId);
|
|
24
24
|
const isUnsupported = isConnected && !isSupported && !isPartiallySupported;
|
|
25
25
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainProvider.container.js","sourceRoot":"","sources":["../../../src/containers/ChainProvider/ChainProvider.container.ts"],"names":[],"mappings":";;;;;AAAA,6CAAqC;AACrC
|
|
1
|
+
{"version":3,"file":"ChainProvider.container.js","sourceRoot":"","sources":["../../../src/containers/ChainProvider/ChainProvider.container.ts"],"names":[],"mappings":";;;;;AAAA,6CAAqC;AACrC,yEAAoE;AACpE,8DAA2D;AAC3D,qEAAoE;AACpE,uCAGsB;AAMtB,oEAA2C;AAE3C,MAAM,QAAQ,GAAG,CAAC,KAAU,EAAiB,EAAE;IAC7C,MAAM,OAAO,GAAG,sBAAU,CAAC,KAAK,CAAC,IAAI,IAAI,CAAA;IACzC,MAAM,OAAO,GAAG,OAAO,IAAI,0CAAqB,CAAC,OAAO,CAAC,CAAC,OAAO,CAAA;IACjE,MAAM,eAAe,GAAG,iCAA2B,EAAE,CAAA;IACrD,MAAM,YAAY,GAAG,8BAAwB,EAAE,CAAA;IAC/C,MAAM,MAAM,GAAG,eAAe,IAAI,0CAAqB,CAAC,eAAe,CAAC,CAAA;IACxE,MAAM,WAAW,GAAG,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,CAAA;IACzC,MAAM,WAAW,GAAG,WAAW,IAAI,OAAO,KAAK,eAAe,CAAA;IAC9D,MAAM,oBAAoB,GACxB,WAAW;QACX,CAAC,WAAW;QACZ,YAAY,KAAK,4BAAY,CAAC,cAAc;QAC5C,MAAM,CAAC,MAAM,CAAC,MAAO,CAAC,cAAc,CAAC,CAAC,IAAI,CACxC,aAAa,CAAC,EAAE,CAAC,aAAa,KAAK,OAAO,CAC3C,CAAA;IACH,MAAM,aAAa,GAAG,WAAW,IAAI,CAAC,WAAW,IAAI,CAAC,oBAAoB,CAAA;IAC1E,OAAO;QACL,OAAO;QACP,OAAO;QACP,WAAW;QACX,WAAW;QACX,oBAAoB;QACpB,aAAa;KACd,CAAA;AACH,CAAC,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,SAAsB,EAAoB,EAAE,CAAC,CAAC,EAAE,CAAC,CAAA;AAEtE,kBAAe,qBAAO,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,uBAAa,CAAC,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Dispatch } from 'redux';
|
|
3
|
-
import { ChainId
|
|
3
|
+
import { ChainId } from '@dcl/schemas/dist/dapps/chain-id';
|
|
4
|
+
import { Network } from '@dcl/schemas/dist/dapps/network';
|
|
4
5
|
export declare type ChainData = {
|
|
5
6
|
chainId: ChainId | null;
|
|
6
7
|
network: Network | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { FooterI18N } from 'decentraland-ui';
|
|
2
|
+
import { FooterI18N } from 'decentraland-ui/dist/components/Footer/Footer';
|
|
3
3
|
import { FooterProps } from './Footer.types';
|
|
4
4
|
export default class Footer extends React.PureComponent<FooterProps> {
|
|
5
5
|
getTranslations: () => FooterI18N | undefined;
|
|
@@ -20,7 +20,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
const React = __importStar(require("react"));
|
|
23
|
-
const
|
|
23
|
+
const Footer_1 = require("decentraland-ui/dist/components/Footer/Footer");
|
|
24
24
|
const utils_1 = require("../../modules/translation/utils");
|
|
25
25
|
class Footer extends React.PureComponent {
|
|
26
26
|
constructor() {
|
|
@@ -55,7 +55,7 @@ class Footer extends React.PureComponent {
|
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
|
-
return (React.createElement(
|
|
58
|
+
return (React.createElement(Footer_1.Footer, Object.assign({}, this.props, { onChange: this.handleChange, i18n: this.getTranslations() })));
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
exports.default = Footer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.js","sourceRoot":"","sources":["../../../src/containers/Footer/Footer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8B;AAE9B,
|
|
1
|
+
{"version":3,"file":"Footer.js","sourceRoot":"","sources":["../../../src/containers/Footer/Footer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8B;AAE9B,0EAAqG;AAGrG,2DAAmD;AAEnD,MAAqB,MAAO,SAAQ,KAAK,CAAC,aAA0B;IAApE;;QACE,oBAAe,GAAG,GAA2B,EAAE;YAC7C,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE;gBAC/B,OAAO,SAAS,CAAA;aACjB;YACD,OAAO;gBACL,QAAQ,EAAE;oBACR,EAAE,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,2BAA2B,GAAG;oBACxC,EAAE,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,2BAA2B,GAAG;oBACxC,EAAE,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,2BAA2B,GAAG;oBACxC,EAAE,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,2BAA2B,GAAG;oBACxC,EAAE,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,2BAA2B,GAAG;oBACxC,EAAE,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,2BAA2B,GAAG;iBACzC;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,0BAA0B,GAAG;oBACzC,OAAO,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,6BAA6B,GAAG;oBAC/C,KAAK,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,2BAA2B,GAAG;oBAC3C,OAAO,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,6BAA6B,GAAG;oBAC/C,MAAM,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,4BAA4B,GAAG;iBAC9C;aACF,CAAA;QACH,CAAC,CAAA;QAED,iBAAY,GAA4B,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;YACvD,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;YACvC,IAAI,KAAK,IAAI,KAAK,KAAK,MAAM,IAAI,QAAQ,EAAE;gBACzC,QAAQ,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;aACvB;QACH,CAAC,CAAA;IAWH,CAAC;IATC,MAAM;QACJ,OAAO,CACL,oBAAC,eAAe,oBACV,IAAI,CAAC,KAAK,IACd,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,IAAI,EAAE,IAAI,CAAC,eAAe,EAAE,IAC5B,CACH,CAAA;IACH,CAAC;CACF;AAxCD,yBAwCC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { LoginModalProps } from 'decentraland-ui';
|
|
2
|
+
import { LoginModalProps } from 'decentraland-ui/dist/components/LoginModal/LoginModal';
|
|
3
3
|
import LoginModal from './LoginModal';
|
|
4
4
|
declare const _default: import("react-redux").ConnectedComponent<typeof LoginModal, import("react-redux").Omit<Pick<import("react").ClassAttributes<LoginModal> & import("./LoginModal.types").DefaultProps & LoginModalProps & {
|
|
5
5
|
hasTranslations?: boolean | undefined;
|
|
6
|
-
onConnect: (providerType: import("
|
|
6
|
+
onConnect: (providerType: import("@dcl/schemas").ProviderType) => any;
|
|
7
7
|
}, "hasTranslations" | keyof LoginModalProps | "onConnect" | keyof import("react").ClassAttributes<LoginModal>> & Partial<Pick<import("react").ClassAttributes<LoginModal> & import("./LoginModal.types").DefaultProps & LoginModalProps & {
|
|
8
8
|
hasTranslations?: boolean | undefined;
|
|
9
|
-
onConnect: (providerType: import("
|
|
9
|
+
onConnect: (providerType: import("@dcl/schemas").ProviderType) => any;
|
|
10
10
|
}, "isLoading">> & Partial<Pick<import("./LoginModal.types").DefaultProps, never>>, "open" | "message" | "loading" | "className" | "onClose" | "i18n" | "hasError"> & LoginModalProps>;
|
|
11
11
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { LoginModalI18N, LoginModalOptionI18N, LoginModalOptionType } from 'decentraland-ui/dist/components/LoginModal/LoginModal';
|
|
3
|
-
import { ProviderType } from '
|
|
3
|
+
import { ProviderType } from '@dcl/schemas/dist/dapps/provider-type';
|
|
4
4
|
import { DefaultProps, Props, State } from './LoginModal.types';
|
|
5
5
|
export default class LoginModal extends React.PureComponent<Props, State> {
|
|
6
6
|
static defaultProps: DefaultProps;
|
|
@@ -20,8 +20,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
const React = __importStar(require("react"));
|
|
23
|
-
const LoginModal_1 = require("decentraland-ui/dist/components/LoginModal/LoginModal");
|
|
24
23
|
const decentraland_connect_1 = require("decentraland-connect");
|
|
24
|
+
const LoginModal_1 = require("decentraland-ui/dist/components/LoginModal/LoginModal");
|
|
25
25
|
const utils_1 = require("../../modules/translation/utils");
|
|
26
26
|
const utils_2 = require("./utils");
|
|
27
27
|
class LoginModal extends React.PureComponent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoginModal.js","sourceRoot":"","sources":["../../../src/containers/LoginModal/LoginModal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8B;AAC9B,sFAK8D;
|
|
1
|
+
{"version":3,"file":"LoginModal.js","sourceRoot":"","sources":["../../../src/containers/LoginModal/LoginModal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8B;AAC9B,+DAAiD;AACjD,sFAK8D;AAE9D,2DAAsD;AAEtD,mCAA2D;AAE3D,MAAqB,UAAW,SAAQ,KAAK,CAAC,aAA2B;IAKvE,YAAY,KAAY;QACtB,KAAK,CAAC,KAAK,CAAC,CAAA;QAkBd,oBAAe,GAAG,CAAC,SAA+B,EAAE,EAAE;YACpD,IAAI,YAAY,GAAiB,sBAAc,CAAC,SAAS,CAAC,CAAA;YAC1D,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC,CAAA;QACpC,CAAC,CAAA;QAED,yBAAoB,GAAG,GAA+B,EAAE;YACtD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE;gBAC/B,OAAO,SAAS,CAAA;aACjB;YACD,OAAO;gBACL,KAAK,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,0BAA0B,GAAG;gBAC1C,QAAQ,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,6BAA6B,GAAG;gBAChD,KAAK,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,0BAA0B,GAAG;aAC3C,CAAA;QACH,CAAC,CAAA;QAED,0BAAqB,GAAG,GAAqC,EAAE;YAC7D,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE;gBAC/B,OAAO,SAAS,CAAA;aACjB;YACD,OAAO;gBACL,iBAAiB,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,uCAAuC,GAAG;gBACnE,KAAK,EAAE,oBAAC,SAAC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I,CAAC,oBAAoB,EAAE,EACjC,OAAO,EACL,oBAAC,SAAC,IACA,EAAE,EAAC,sCAAsC,EACzC,MAAM,EAAE;oBACN,EAAE,EAAE,+BAAM;oBACV,WAAW,EAAE,CACX,2BACE,IAAI,EAAC,qDAAqD,EAC1D,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,IAExB,SAAC,CAAC,gCAAgC,CAAC,CAClC,CACL;iBACF,GACD,EAEJ,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,IAEf,iCAAU,CAAC,qBAAqB,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,sBAAsB,CAAC,CACrD,CAClB,CAAA;IACH,CAAC;;AAjGH,6BAkGC;AAjGQ,uBAAY,GAAiB;IAClC,SAAS,EAAE,KAAK;CACjB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Dispatch } from 'redux';
|
|
2
|
-
import { LoginModalProps } from 'decentraland-ui';
|
|
3
|
-
import { ProviderType } from '
|
|
2
|
+
import { LoginModalProps } from 'decentraland-ui/dist/components/LoginModal/LoginModal';
|
|
3
|
+
import { ProviderType } from '@dcl/schemas/dist/dapps/provider-type';
|
|
4
4
|
import { EnableWalletRequestAction } from '../../modules/wallet/actions';
|
|
5
5
|
export declare type DefaultProps = {
|
|
6
6
|
isLoading: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProviderType } from
|
|
1
|
+
import { ProviderType } from '@dcl/schemas/dist/dapps/provider-type';
|
|
2
2
|
import { LoginModalOptionType } from "decentraland-ui/dist/components/LoginModal/LoginModal";
|
|
3
3
|
export declare function toModalOptionType(providerType: ProviderType): LoginModalOptionType | undefined;
|
|
4
4
|
export declare function toProviderType(modalOptionType: LoginModalOptionType): ProviderType;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toProviderType = exports.toModalOptionType = void 0;
|
|
4
|
-
const
|
|
4
|
+
const provider_type_1 = require("@dcl/schemas/dist/dapps/provider-type");
|
|
5
5
|
const LoginModal_1 = require("decentraland-ui/dist/components/LoginModal/LoginModal");
|
|
6
6
|
const eth_1 = require("../../lib/eth");
|
|
7
7
|
const { METAMASK, DAPPER, SAMSUNG, FORTMATIC, COINBASE, WALLET_CONNECT } = LoginModal_1.LoginModalOptionType;
|
|
8
8
|
function toModalOptionType(providerType) {
|
|
9
9
|
switch (providerType) {
|
|
10
|
-
case
|
|
10
|
+
case provider_type_1.ProviderType.INJECTED:
|
|
11
11
|
if (eth_1.isCucumberProvider()) {
|
|
12
12
|
return SAMSUNG;
|
|
13
13
|
}
|
|
@@ -20,9 +20,9 @@ function toModalOptionType(providerType) {
|
|
|
20
20
|
else {
|
|
21
21
|
return METAMASK;
|
|
22
22
|
}
|
|
23
|
-
case
|
|
23
|
+
case provider_type_1.ProviderType.FORTMATIC:
|
|
24
24
|
return FORTMATIC;
|
|
25
|
-
case
|
|
25
|
+
case provider_type_1.ProviderType.WALLET_CONNECT:
|
|
26
26
|
return WALLET_CONNECT;
|
|
27
27
|
default:
|
|
28
28
|
console.warn(`Invalid provider type ${providerType}`);
|
|
@@ -36,11 +36,11 @@ function toProviderType(modalOptionType) {
|
|
|
36
36
|
case COINBASE:
|
|
37
37
|
case DAPPER:
|
|
38
38
|
case SAMSUNG:
|
|
39
|
-
return
|
|
39
|
+
return provider_type_1.ProviderType.INJECTED;
|
|
40
40
|
case FORTMATIC:
|
|
41
|
-
return
|
|
41
|
+
return provider_type_1.ProviderType.FORTMATIC;
|
|
42
42
|
case WALLET_CONNECT:
|
|
43
|
-
return
|
|
43
|
+
return provider_type_1.ProviderType.WALLET_CONNECT;
|
|
44
44
|
default:
|
|
45
45
|
throw new Error(`Invalid login type ${modalOptionType}`);
|
|
46
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/containers/LoginModal/utils.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/containers/LoginModal/utils.ts"],"names":[],"mappings":";;;AAAA,yEAAoE;AACpE,sFAA6F;AAC7F,uCAAyF;AAEzF,MAAM,EACJ,QAAQ,EACR,MAAM,EACN,OAAO,EACP,SAAS,EACT,QAAQ,EACR,cAAc,EACf,GAAG,iCAAoB,CAAA;AAExB,SAAgB,iBAAiB,CAAC,YAA0B;IAC1D,QAAQ,YAAY,EAAE;QACpB,KAAK,4BAAY,CAAC,QAAQ;YACxB,IAAI,wBAAkB,EAAE,EAAE;gBACxB,OAAO,OAAO,CAAA;aACf;iBAAM,IAAI,wBAAkB,EAAE,EAAE;gBAC/B,OAAO,QAAQ,CAAA;aAChB;iBAAM,IAAI,sBAAgB,EAAE,EAAE;gBAC7B,OAAO,MAAM,CAAA;aACd;iBAAM;gBACL,OAAO,QAAQ,CAAA;aAChB;QACH,KAAK,4BAAY,CAAC,SAAS;YACzB,OAAO,SAAS,CAAA;QAClB,KAAK,4BAAY,CAAC,cAAc;YAC9B,OAAO,cAAc,CAAA;QACvB;YACE,OAAO,CAAC,IAAI,CAAC,yBAAyB,YAAY,EAAE,CAAC,CAAA;YACrD,OAAM;KACT;AACH,CAAC;AApBD,8CAoBC;AAED,SAAgB,cAAc,CAAC,eAAqC;IAClE,QAAQ,eAAe,EAAE;QACvB,KAAK,QAAQ,CAAC;QACd,KAAK,QAAQ,CAAC;QACd,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO;YACV,OAAO,4BAAY,CAAC,QAAQ,CAAA;QAC9B,KAAK,SAAS;YACZ,OAAO,4BAAY,CAAC,SAAS,CAAA;QAC/B,KAAK,cAAc;YACjB,OAAO,4BAAY,CAAC,cAAc,CAAA;QACpC;YACE,MAAM,IAAI,KAAK,CAAC,sBAAsB,eAAe,EAAE,CAAC,CAAA;KAC3D;AACH,CAAC;AAdD,wCAcC"}
|
|
@@ -31,7 +31,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
31
31
|
};
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
33
|
const React = __importStar(require("react"));
|
|
34
|
-
const
|
|
34
|
+
const Modal_1 = require("decentraland-ui/dist/components/Modal/Modal");
|
|
35
35
|
class Modal extends React.PureComponent {
|
|
36
36
|
constructor() {
|
|
37
37
|
super(...arguments);
|
|
@@ -43,7 +43,7 @@ class Modal extends React.PureComponent {
|
|
|
43
43
|
render() {
|
|
44
44
|
// Omit `onCloseModal` from the props we pass down to ModalComponent
|
|
45
45
|
const _a = this.props, { name, onCloseModal } = _a, modalProps = __rest(_a, ["name", "onCloseModal"]);
|
|
46
|
-
return (React.createElement(
|
|
46
|
+
return (React.createElement(Modal_1.Modal, Object.assign({ open: true, className: name, size: "small", onClose: this.handleClose }, modalProps)));
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
exports.default = Modal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../src/containers/Modal/Modal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../src/containers/Modal/Modal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8B;AAC9B,uEAAqF;AAIrF,MAAqB,KAAM,SAAQ,KAAK,CAAC,aAAyB;IAAlE;;QACE,gBAAW,GAAG,GAAG,EAAE;YACjB,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;YACzC,YAAa,CAAC,IAAI,CAAC,CAAA;QACrB,CAAC,CAAA;IAgBH,CAAC;IAdC,MAAM;QACJ,oEAAoE;QACpE,MAAM,KAAwC,IAAI,CAAC,KAAK,EAAlD,EAAE,IAAI,EAAE,YAAY,OAA8B,EAAzB,UAAU,cAAnC,wBAAqC,CAAa,CAAA;QAExD,OAAO,CACL,oBAAC,aAAc,kBACb,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,IAAI,EACf,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,IAAI,CAAC,WAAW,IACrB,UAAU,EACd,CACH,CAAA;IACH,CAAC;CACF;AApBD,wBAoBC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ModalProps as ModalComponentProps } from 'decentraland-ui';
|
|
1
|
+
import { ModalProps as ModalComponentProps } from 'decentraland-ui/dist/components/Modal/Modal';
|
|
2
2
|
import { closeModal } from '../../modules/modal/actions';
|
|
3
3
|
export declare type ModalProps = ModalComponentProps & {
|
|
4
4
|
name: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Modal as ModalComponent } from 'decentraland-ui';
|
|
1
|
+
import { Modal as ModalComponent } from 'decentraland-ui/dist/components/Modal/Modal';
|
|
2
2
|
import BaseModal from './Modal.container';
|
|
3
3
|
declare type ExtendedModal = typeof BaseModal & {
|
|
4
4
|
Actions: typeof ModalComponent.Actions;
|
|
@@ -3,12 +3,12 @@ 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
|
|
6
|
+
const Modal_1 = require("decentraland-ui/dist/components/Modal/Modal");
|
|
7
7
|
const Modal_container_1 = __importDefault(require("./Modal.container"));
|
|
8
8
|
const Modal = Modal_container_1.default;
|
|
9
|
-
Modal.Actions =
|
|
10
|
-
Modal.Content =
|
|
11
|
-
Modal.Description =
|
|
12
|
-
Modal.Header =
|
|
9
|
+
Modal.Actions = Modal_1.Modal.Actions;
|
|
10
|
+
Modal.Content = Modal_1.Modal.Content;
|
|
11
|
+
Modal.Description = Modal_1.Modal.Description;
|
|
12
|
+
Modal.Header = Modal_1.Modal.Header;
|
|
13
13
|
exports.default = Modal;
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/Modal/index.tsx"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/Modal/index.tsx"],"names":[],"mappings":";;;;;AAAA,uEAAqF;AACrF,wEAAyC;AASzC,MAAM,KAAK,GAAkB,yBAAS,CAAA;AACtC,KAAK,CAAC,OAAO,GAAG,aAAc,CAAC,OAAO,CAAA;AACtC,KAAK,CAAC,OAAO,GAAG,aAAc,CAAC,OAAO,CAAA;AACtC,KAAK,CAAC,WAAW,GAAG,aAAc,CAAC,WAAW,CAAA;AAC9C,KAAK,CAAC,MAAM,GAAG,aAAc,CAAC,MAAM,CAAA;AAEpC,kBAAe,KAAK,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { NavbarI18N } from 'decentraland-ui';
|
|
2
|
+
import { NavbarI18N } from 'decentraland-ui/dist/components/Navbar/Navbar';
|
|
3
3
|
import { NavbarProps } from './Navbar.types';
|
|
4
4
|
export default class Navbar extends React.PureComponent<NavbarProps> {
|
|
5
5
|
getTranslations: () => NavbarI18N | undefined;
|
|
@@ -23,9 +23,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
const React = __importStar(require("react"));
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
26
|
+
const Button_1 = require("decentraland-ui/dist/components/Button/Button");
|
|
27
|
+
const ModalNavigation_1 = require("decentraland-ui/dist/components/ModalNavigation/ModalNavigation");
|
|
28
|
+
const Navbar_1 = require("decentraland-ui/dist/components/Navbar/Navbar");
|
|
29
|
+
const provider_type_1 = require("@dcl/schemas/dist/dapps/provider-type");
|
|
30
|
+
const chain_id_1 = require("@dcl/schemas/dist/dapps/chain-id");
|
|
29
31
|
const eth_1 = require("../../lib/eth");
|
|
30
32
|
const utils_1 = require("../../modules/translation/utils");
|
|
31
33
|
const Modal_1 = __importDefault(require("../../containers/Modal"));
|
|
@@ -62,36 +64,36 @@ class Navbar extends React.PureComponent {
|
|
|
62
64
|
}
|
|
63
65
|
render() {
|
|
64
66
|
const { hasAcceptedNetworkPartialSupport, onAcceptNetworkPartialSupport } = this.props;
|
|
65
|
-
const expectedChainName =
|
|
67
|
+
const expectedChainName = chain_id_1.getChainName(eth_1.getConnectedProviderChainId());
|
|
66
68
|
const providerType = eth_1.getConnectedProviderType();
|
|
67
69
|
return (React.createElement(React.Fragment, null,
|
|
68
|
-
React.createElement(
|
|
70
|
+
React.createElement(Navbar_1.Navbar, Object.assign({}, this.props, { i18n: this.getTranslations() })),
|
|
69
71
|
React.createElement(ChainProvider_1.default, null, ({ chainId, isUnsupported, isPartiallySupported }) => isUnsupported ? (React.createElement(Modal_1.default, { open: true, size: "tiny" },
|
|
70
|
-
React.createElement(
|
|
71
|
-
React.createElement(Modal_1.default.Content, null, !
|
|
72
|
+
React.createElement(ModalNavigation_1.ModalNavigation, { title: React.createElement(utils_1.T, { id: "@dapps.navbar.wrong_network.header" }) }),
|
|
73
|
+
React.createElement(Modal_1.default.Content, null, !chain_id_1.getChainName(chainId) ? (React.createElement(utils_1.T, { id: "@dapps.navbar.wrong_network.message_unknown_network", values: {
|
|
72
74
|
expectedChainName: React.createElement("b", null, expectedChainName)
|
|
73
75
|
} })) : (React.createElement(utils_1.T, { id: "@dapps.navbar.wrong_network.message", values: {
|
|
74
|
-
currentChainName: React.createElement("b", null,
|
|
76
|
+
currentChainName: React.createElement("b", null, chain_id_1.getChainName(chainId)),
|
|
75
77
|
expectedChainName: React.createElement("b", null, expectedChainName)
|
|
76
78
|
} }))),
|
|
77
|
-
React.createElement(Modal_1.default.Actions, null, providerType ===
|
|
79
|
+
React.createElement(Modal_1.default.Actions, null, providerType === provider_type_1.ProviderType.WALLET_CONNECT ? (React.createElement(Button_1.Button, { primary: true, onClick: this.handleSignOut }, utils_1.t('@dapps.navbar.wrong_network.sign_out'))) : (React.createElement(Button_1.Button, { primary: true, onClick: this.handleSwitchNetwork },
|
|
78
80
|
React.createElement(utils_1.T, { id: "@dapps.navbar.wrong_network.switch_button", values: {
|
|
79
81
|
chainName: React.createElement("b", null, expectedChainName)
|
|
80
82
|
} })))))) : isPartiallySupported ? (React.createElement(Modal_1.default, { open: !hasAcceptedNetworkPartialSupport, size: "small" },
|
|
81
|
-
React.createElement(
|
|
83
|
+
React.createElement(ModalNavigation_1.ModalNavigation, { title: React.createElement(utils_1.T, { id: "@dapps.navbar.partially_supported_network.header" }) }),
|
|
82
84
|
React.createElement(Modal_1.default.Content, null,
|
|
83
85
|
React.createElement(utils_1.T, { id: "@dapps.navbar.partially_supported_network.message", values: {
|
|
84
|
-
currentChainName: React.createElement("b", null,
|
|
86
|
+
currentChainName: React.createElement("b", null, chain_id_1.getChainName(chainId)),
|
|
85
87
|
expectedChainName: React.createElement("b", null, expectedChainName)
|
|
86
88
|
} })),
|
|
87
89
|
React.createElement(Modal_1.default.Actions, null,
|
|
88
|
-
React.createElement(
|
|
90
|
+
React.createElement(Button_1.Button, { primary: true, onClick: this.handleSwitchNetwork },
|
|
89
91
|
React.createElement(utils_1.T, { id: "@dapps.navbar.wrong_network.switch_button", values: {
|
|
90
92
|
chainName: React.createElement("b", null, expectedChainName)
|
|
91
93
|
} })),
|
|
92
|
-
React.createElement(
|
|
94
|
+
React.createElement(Button_1.Button, { secondary: true, onClick: onAcceptNetworkPartialSupport },
|
|
93
95
|
React.createElement(utils_1.T, { id: "@dapps.navbar.partially_supported_network.continue_button", values: {
|
|
94
|
-
chainName: React.createElement("b", null,
|
|
96
|
+
chainName: React.createElement("b", null, chain_id_1.getChainName(chainId))
|
|
95
97
|
} }))))) : null)));
|
|
96
98
|
}
|
|
97
99
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Navbar.js","sourceRoot":"","sources":["../../../src/containers/Navbar/Navbar.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8B;AAE9B,
|
|
1
|
+
{"version":3,"file":"Navbar.js","sourceRoot":"","sources":["../../../src/containers/Navbar/Navbar.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8B;AAE9B,0EAAsE;AACtE,qGAAiG;AACjG,0EAAqG;AACrG,yEAAoE;AACpE,+DAA+D;AAC/D,uCAGsB;AACtB,2DAAsD;AACtD,mEAA0C;AAC1C,qEAA4C;AAG5C,MAAqB,MAAO,SAAQ,KAAK,CAAC,aAA0B;IAApE;;QACE,oBAAe,GAAG,GAA2B,EAAE;YAC7C,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE;gBAC/B,OAAO,SAAS,CAAA;aACjB;YACD,OAAO;gBACL,IAAI,EAAE;oBACJ,WAAW,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,gCAAgC,GAAG;oBACtD,MAAM,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,2BAA2B,GAAG;oBAC5C,KAAK,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,0BAA0B,GAAG;oBAC1C,GAAG,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,wBAAwB,GAAG;oBACtC,IAAI,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,yBAAyB,GAAG;oBACxC,IAAI,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,yBAAyB,GAAG;oBACxC,OAAO,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,4BAA4B,GAAG;iBAC/C;gBACD,OAAO,EAAE;oBACP,UAAU,EAAE,oBAAC,SAAC,IAAC,EAAE,EAAC,kCAAkC,GAAG;oBACvD,MAAM,EAAE,oBAAC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AC,2DAA2D,EAC9D,MAAM,EAAE;gCACN,SAAS,EAAE,+BAAI,uBAAY,CAAC,OAAQ,CAAC,CAAK;6BAC3C,GACD,CACK,CACK,CACV,CACT,CAAC,CAAC,CAAC,IAAI,CAEI,CACf,CACJ,CAAA;IACH,CAAC;CACF;AA3HD,yBA2HC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Dispatch } from 'redux';
|
|
2
|
-
import { ChainId } from '@dcl/schemas';
|
|
3
|
-
import { NavbarProps as NavbarComponentProps } from 'decentraland-ui';
|
|
2
|
+
import { ChainId } from '@dcl/schemas/dist/dapps/chain-id';
|
|
3
|
+
import { NavbarProps as NavbarComponentProps } from 'decentraland-ui/dist/components/Navbar/Navbar';
|
|
4
4
|
import { acceptNetworkPartialSupport, AcceptNetworkPartialSupportAction, disconnectWallet, switchNetworkRequest, SwitchNetworkRequestAction } from '../../modules/wallet/actions';
|
|
5
5
|
export declare type NavbarProps = NavbarComponentProps & {
|
|
6
6
|
chainId?: ChainId;
|
|
@@ -15,7 +15,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
const react_1 = __importDefault(require("react"));
|
|
18
|
-
const
|
|
18
|
+
const Button_1 = require("decentraland-ui/dist/components/Button/Button");
|
|
19
19
|
const NetworkCheck_1 = __importDefault(require("../NetworkCheck"));
|
|
20
20
|
const disabledStyle = { opacity: 0.5, cursor: 'not-allowed', transform: 'none' };
|
|
21
21
|
class NetworkButton extends react_1.default.PureComponent {
|
|
@@ -23,7 +23,7 @@ class NetworkButton extends react_1.default.PureComponent {
|
|
|
23
23
|
const _a = this.props, { network, onClick } = _a, rest = __rest(_a, ["network", "onClick"]);
|
|
24
24
|
return (react_1.default.createElement(NetworkCheck_1.default, { network: network }, isEnabled => {
|
|
25
25
|
const props = isEnabled ? { onClick } : { style: disabledStyle };
|
|
26
|
-
return react_1.default.createElement(
|
|
26
|
+
return react_1.default.createElement(Button_1.Button, Object.assign({}, rest, props));
|
|
27
27
|
}));
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkButton.js","sourceRoot":"","sources":["../../../src/containers/NetworkButton/NetworkButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAyB;AACzB,
|
|
1
|
+
{"version":3,"file":"NetworkButton.js","sourceRoot":"","sources":["../../../src/containers/NetworkButton/NetworkButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAyB;AACzB,0EAAyF;AAEzF,mEAA0C;AAE1C,MAAM,aAAa,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,CAAA;AAEhF,MAAqB,aAAc,SAAQ,eAAK,CAAC,aAAoB;IACnE,MAAM;QACJ,MAAM,KAAgC,IAAI,CAAC,KAAK,EAA1C,EAAE,OAAO,EAAE,OAAO,OAAwB,EAAnB,IAAI,cAA3B,sBAA6B,CAAa,CAAA;QAChD,OAAO,CACL,8BAAC,sBAAY,IAAC,OAAO,EAAE,OAAO,IAC3B,SAAS,CAAC,EAAE;YACX,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA;YAChE,OAAO,8BAAC,eAAe,oBAAK,IAAI,EAAM,KAAK,EAAI,CAAA;QACjD,CAAC,CACY,CAChB,CAAA;IACH,CAAC;CACF;AAZD,gCAYC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ButtonProps } from 'decentraland-ui';
|
|
2
|
-
import { Network } from '@dcl/schemas';
|
|
1
|
+
import { ButtonProps } from 'decentraland-ui/dist/components/Button/Button';
|
|
2
|
+
import { Network } from '@dcl/schemas/dist/dapps/network';
|
|
3
3
|
export declare type Props = ButtonProps & {
|
|
4
4
|
network: Network;
|
|
5
5
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Props } from './NetworkCheck.types';
|
|
3
3
|
export default class ChainCheck extends React.PureComponent<Props> {
|
|
4
|
-
getChainId: () => import("@dcl/schemas").ChainId | null;
|
|
4
|
+
getChainId: () => import("@dcl/schemas/dist/dapps/chain-id").ChainId | null;
|
|
5
5
|
render(): JSX.Element;
|
|
6
6
|
}
|
|
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const
|
|
7
|
+
const Popup_1 = require("decentraland-ui/dist/components/Popup/Popup");
|
|
8
8
|
const utils_1 = require("../../modules/translation/utils");
|
|
9
9
|
const eth_1 = require("../../lib/eth");
|
|
10
|
-
const
|
|
10
|
+
const chain_id_1 = require("@dcl/schemas/dist/dapps/chain-id");
|
|
11
11
|
const ChainProvider_1 = __importDefault(require("../ChainProvider"));
|
|
12
12
|
class ChainCheck extends react_1.default.PureComponent {
|
|
13
13
|
constructor() {
|
|
@@ -26,8 +26,8 @@ class ChainCheck extends react_1.default.PureComponent {
|
|
|
26
26
|
const { children } = this.props;
|
|
27
27
|
return (react_1.default.createElement(ChainProvider_1.default, null, data => {
|
|
28
28
|
const isEnabled = data.isSupported || data.chainId === this.getChainId();
|
|
29
|
-
return (react_1.default.createElement(
|
|
30
|
-
expectedChainName: (react_1.default.createElement("b", null,
|
|
29
|
+
return (react_1.default.createElement(Popup_1.Popup, { disabled: isEnabled, position: "top center", content: react_1.default.createElement(utils_1.T, { id: "@dapps.button.network_not_supported", values: {
|
|
30
|
+
expectedChainName: (react_1.default.createElement("b", null, chain_id_1.getChainName(eth_1.getConnectedProviderChainId())))
|
|
31
31
|
} }), trigger: children(isEnabled) }));
|
|
32
32
|
}));
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkCheck.js","sourceRoot":"","sources":["../../../src/containers/NetworkCheck/NetworkCheck.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,
|
|
1
|
+
{"version":3,"file":"NetworkCheck.js","sourceRoot":"","sources":["../../../src/containers/NetworkCheck/NetworkCheck.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,uEAAmE;AACnE,2DAAmD;AACnD,uCAAgF;AAEhF,+DAA+D;AAC/D,qEAA4C;AAE5C,MAAqB,UAAW,SAAQ,eAAK,CAAC,aAAoB;IAAlE;;QACE,eAAU,GAAG,GAAG,EAAE;YAChB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;YAC9B,IAAI;gBACF,OAAO,yBAAmB,CAAC,OAAO,CAAC,CAAA;aACpC;YAAC,WAAM;gBACN,OAAO,IAAI,CAAA;aACZ;QACH,CAAC,CAAA;IA4BH,CAAC;IA3BC,MAAM;QACJ,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QAC/B,OAAO,CACL,8BAAC,uBAAa,QACX,IAAI,CAAC,EAAE;YACN,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,UAAU,EAAE,CAAA;YACxE,OAAO,CACL,8BAAC,aAAK,IACJ,QAAQ,EAAE,SAAS,EACnB,QAAQ,EAAC,YAAY,EACrB,OAAO,EACL,8BAAC,SAAC,IACA,EAAE,EAAC,qCAAqC,EACxC,MAAM,EAAE;wBACN,iBAAiB,EAAE,CACjB,yCAAI,uBAAY,CAAC,iCAA2B,EAAG,CAAC,CAAK,CACtD;qBACF,GACD,EAEJ,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,GAC5B,CACH,CAAA;QACH,CAAC,CACa,CACjB,CAAA;IACH,CAAC;CACF;AApCD,6BAoCC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { OwnProps } from './Profile.types';
|
|
3
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").ProfileProps & {
|
|
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
5
|
debounce?: number | undefined;
|
|
6
6
|
onLoadProfile: (address: string) => import("typesafe-actions/dist/types").PayloadAction<"[Request] Load profile", {
|
|
7
7
|
address: string;
|
|
8
8
|
}>;
|
|
9
|
-
}, "address" | "size" | "avatar" | "textOnly" | "imageOnly" | "hasPopup" | "isDecentraland" | "debounce" | "onLoadProfile" | keyof import("react").ClassAttributes<Profile>> & Partial<Pick<import("react").ClassAttributes<Profile> & import("decentraland-ui").ProfileProps & {
|
|
9
|
+
}, "address" | "size" | "avatar" | "textOnly" | "imageOnly" | "hasPopup" | "isDecentraland" | "debounce" | "onLoadProfile" | keyof import("react").ClassAttributes<Profile>> & Partial<Pick<import("react").ClassAttributes<Profile> & import("decentraland-ui/dist/components/Profile/Profile").ProfileProps & {
|
|
10
10
|
debounce?: number | undefined;
|
|
11
11
|
onLoadProfile: (address: string) => import("typesafe-actions/dist/types").PayloadAction<"[Request] Load profile", {
|
|
12
12
|
address: string;
|