From de84568c18a0853650dfbaad74b754670f4f197a Mon Sep 17 00:00:00 2001 From: nazhmik Date: Tue, 8 Sep 2020 17:54:49 +0300 Subject: [PATCH 01/39] stagenet config --- src/json-data/news.json | 7 +-- src/layout/Dialogs/MigrationDialog/index.tsx | 57 ++++++------------- .../Dialogs/SettingsDialog/NodeItem.tsx | 4 +- src/layout/Dialogs/SettingsDialog/index.tsx | 25 +------- src/stores/MigrationStore.ts | 4 +- src/stores/NewsStore.ts | 2 +- src/stores/SettingsStore.ts | 11 ++-- 7 files changed, 30 insertions(+), 80 deletions(-) diff --git a/src/json-data/news.json b/src/json-data/news.json index ab7cd3be..fe51488c 100644 --- a/src/json-data/news.json +++ b/src/json-data/news.json @@ -1,6 +1 @@ -[ - { - "id": "1", - "text": "Dear users, please note that the innovations of [Feature 15 (Ride V4, VRF, Protobuf, Failed transactions)](https://docs.waves.tech/en/keep-in-touch/release-notes) for Testnet are currently available on [stagenet.waves-ide.com](https://stagenet.waves-ide.com/) (Settings → Custom nodes → Add node ([Testnet node](https://nodes-testnet.wavesnodes.com/api-docs/index.html) will be added by default)). The feature is coming soon on [waves-ide.com](https://waves-ide.com/) after activation of the feature on Mainnet." - } -] +[] diff --git a/src/layout/Dialogs/MigrationDialog/index.tsx b/src/layout/Dialogs/MigrationDialog/index.tsx index 816a4149..d57271da 100644 --- a/src/layout/Dialogs/MigrationDialog/index.tsx +++ b/src/layout/Dialogs/MigrationDialog/index.tsx @@ -4,8 +4,7 @@ import Button from '@src/components/Button'; import styles from './styles.less'; import { inject, observer } from 'mobx-react'; import { MigrationStore, AccountsStore, SettingsStore } from '@stores'; -import { NetworkChainId } from '@stores/AccountsStore'; -import { activeHostSecure, formatHost, activeHosts } from '@utils/hosts'; +import { activeHostSecure, formatHost } from '@utils/hosts'; import { FilesStore } from '@stores/FilesStore'; import { Loading } from '@src/layout/Dialogs/MigrationDialog/Loading'; import Link from '@components/Link'; @@ -34,15 +33,10 @@ export default class MigrationDialog extends React.Component { const { customNodes } = this.props.settingsStore!; const { - stagenetMigrationState, - migrationState, + stagenetMigrationState } = this.props.migrationStore!; - const {accountGroups, nodesAccounts} = this.props!.accountsStore!; - - const stagenetAccounts = accountGroups[NetworkChainId.S] - - const hasStagenetAccounts = stagenetAccounts ? stagenetAccounts.accounts.length > 0 : false + const { nodesAccounts} = this.props!.accountsStore!; const isMigrationAvailable = nodesAccounts.length > 0 || @@ -55,36 +49,26 @@ export default class MigrationDialog extends React.Component { width={618} footer={ isMigrationAvailable - ? ( -
-
- -
+ ? ( +
+
+ +
-
- {hasStagenetAccounts && ( +
- )} - - +
-
- ) - : undefined + ) + : undefined } visible > @@ -104,15 +88,6 @@ export default class MigrationDialog extends React.Component { To automatically transfer your projects and accounts to the new service, click the "Migrate" button.
- {hasStagenetAccounts && ( -
- To work with Stagenet network you need to use  - - {(activeHosts.stagenet.secure as string).replace(/^https?:\/\//, '')} - - . To automatically transfer your data to Stagenet network, click the "Migrate Stagenet" button. -
- )}
You can also transfer your data manually using the "Export" button. @@ -123,3 +98,5 @@ export default class MigrationDialog extends React.Component { ; } } + + diff --git a/src/layout/Dialogs/SettingsDialog/NodeItem.tsx b/src/layout/Dialogs/SettingsDialog/NodeItem.tsx index b49a64e1..230da07b 100644 --- a/src/layout/Dialogs/SettingsDialog/NodeItem.tsx +++ b/src/layout/Dialogs/SettingsDialog/NodeItem.tsx @@ -53,8 +53,8 @@ export class NodeItem extends React.Component {   supports only the HTTPS protocol. To setup node with the HTTP protocol, use   - - {formatHost(activeHosts.mainnet.insecure)} + + {formatHost(activeHosts.stagenet.insecure)} .
diff --git a/src/layout/Dialogs/SettingsDialog/index.tsx b/src/layout/Dialogs/SettingsDialog/index.tsx index 707acc05..126270c0 100644 --- a/src/layout/Dialogs/SettingsDialog/index.tsx +++ b/src/layout/Dialogs/SettingsDialog/index.tsx @@ -14,7 +14,6 @@ import Info from './Info'; import { NETWORKS } from '@src/constants'; import FileLoader from '@src/layout/Dialogs/SettingsDialog/FileLoader'; import { IImportedData } from '@stores/SettingsStore'; -import { activeHosts } from '@utils/hosts'; interface IInjectedProps { settingsStore?: SettingsStore @@ -123,33 +122,11 @@ export default class SettingsDialog extends React.Component { {this.props.settingsStore!.systemNodes.map((node, i) => ( ))} - -
-
- Stagenet URL -
- -
-
- Dear user, the IDE for the stagenet network has moved to  - - {(activeHosts.stagenet.secure as string).replace(/^https?:\/\//, '')} - - . For convenience, you can transfer your projects using import/export. -
- -
- - Go to Stagenet IDE - -
-
-
Custom nodes {this.props.settingsStore!.customNodes.map((node, i) => ( - + ))}