Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:merge stagenet #157

Open
wants to merge 2 commits into
base: testnet
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:10 AS build
FROM node:15 AS build

ARG CONF_SWITCH
ENV CONF_SWITCH ${CONF_SWITCH:-buildOfficialProd}
Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"dependencies": {
"@babel/runtime": "^7.3.4",
"@sentry/browser": "^4.6.4",
"@waves/node-api-js": "1.2.5-beta.13",
"@waves/ride-js": "2.1.5-beta.3",
"@waves/node-api-js": "1.2.5-beta.18",
"@waves/ride-js": "2.2.0-beta.5",
"@waves/signature-generator": "^5.0.0",
"amplitude-js": "^4.6.0-beta.2",
"axios": "0.19.0",
Expand All @@ -29,19 +29,19 @@
"dexie": "^2.0.4",
"formik": "^1.5.8",
"json-bigint": "^0.3.0",
"lodash": "4.17.15",
"lodash": "^4.17.20",
"prop-types": "15.6.2",
"react": "16.6.1",
"react-copy-to-clipboard": "5.0.1",
"react-dom": "16.6.1",
"react-ga": "^2.5.7",
"react-google-recaptcha": "^1.0.5",
"react-hot-loader": "4.3.12",
"react-infinite-scroller": "^1.2.4",
"react-modal": "^3.7.1",
"react-router": "4.3.1",
"react-router-dom": "4.3.1",
"react-scroll-up": "^1.3.3",
"react": "16.14.0",
"react-copy-to-clipboard": "5.0.4",
"react-dom": "16.14.0",
"react-ga": "2.7.0",
"react-google-recaptcha": "^1.1.0",
"react-hot-loader": "4.13.0",
"react-infinite-scroller": "1.2.4",
"react-modal": "3.14.3",
"react-router": "5.2.1",
"react-router-dom": "5.3.0",
"react-scroll-up": "^1.3.7",
"react-tooltip": "^3.11.1",
"retry-axios": "^0.3.2",
"semver": "^6.3.0",
Expand All @@ -68,15 +68,15 @@
"identity-obj-proxy": "^3.0.0",
"jest": "^24.9.0",
"lodash-webpack-plugin": "^0.11.5",
"node-sass": "^5.0.0",
"node-sass": "^6.0.1",
"react-test-renderer": "^16.8.4",
"sass-loader": "7.0.3",
"sass-resources-loader": "1.3.3",
"style-loader": "0.21.0",
"webpack": "4.26.0",
"webpack": "^4.26.0",
"webpack-bundle-analyzer": "3.3.2",
"webpack-cli": "3.1.2",
"webpack-dev-server": "3.1.14"
"webpack-dev-server": "^3.11.0"
},
"resolutions": {
"fstream": "1.0.12",
Expand Down
3 changes: 3 additions & 0 deletions src/images/arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/images/convert-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/images/converters-arrows.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/images/ethereum-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/images/icon-converter-active.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/images/icon-converter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/images/menu-sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/images/pending.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/images/waves-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/js/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import SingleAliasPage from './pages/SingleAliasPage';
import SingleAssetPage from './pages/SingleAssetPage';
import FaucetPage from './pages/FaucetPage'
import UnsupportedPage from './pages/UnsupportedPage';
import ConvertEthPage from './pages/ConvertEthPage';

const routeParams = routeParamsBuilder(ServiceFactory.global().configurationService().all());
const routes = routeBuilder(routeParams.networkId);
Expand Down Expand Up @@ -96,6 +97,7 @@ class App extends React.Component {
<Route path={routes.nodes.list} component={NodesPage} />
<Route path={routes.peers.list} component={PeersPage} />
<Route exact path={routes.faucet} component={FaucetPage} />
<Route exact path={routes.converters} component={ConvertEthPage} />
<Route path={routes.root} component={MainPage} />
</Switch>
</div>
Expand Down
5 changes: 5 additions & 0 deletions src/js/NavMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ const buildItems = () => {
route: networkId => routeBuilder(networkId).faucet,
visible: visibleIfConfigured,
icon: 'icon-faucet'
}, {
title: 'Converters',
route: networkId => routeBuilder(networkId).converters,
visible: alwaysVisible,
icon: 'icon-converters'
}];
};

Expand Down
1 change: 1 addition & 0 deletions src/js/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class Search extends React.PureComponent {
});

const {networkId} = this.props.match.params;

const searchService = ServiceFactory.forNetwork(networkId).searchService();

return searchService.search(this.state.searchText).then(route => {
Expand Down
10 changes: 0 additions & 10 deletions src/js/components/AssetRef/__snapshots__/AssetRef.test.js.snap

This file was deleted.

10 changes: 0 additions & 10 deletions src/js/components/BlockRef/__snapshots__/BlockRef.test.js.snap

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions src/js/components/InvocationInfo/InvocationInfo.view.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ const ParameterMapper = ({type, value}) => {
};

export class InvocationInfoView extends React.Component {
// static propTypes = {
// function: PropTypes.string.isRequired,
// args: PropTypes.arrayOf(PropTypes.shape({
// type: PropTypes.string,
// value: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.bool, PropTypes.instanceOf(BigNumber)])
// })).isRequired
// };

render() {
return (
<div className="data-container">
Expand Down

This file was deleted.

11 changes: 3 additions & 8 deletions src/js/components/ScriptInfo/ScriptInfo.container.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,9 @@ class ScriptInfoContainer extends React.Component {

setDecompiledScript = () => {
if (this.props.script) {
try {
const decompilationResult = decompile(this.props.script);
const decompiledScript = !decompilationResult.error ? decompilationResult.result : decompilationResult.error;
this.setState({value: decompiledScript});
} catch (e) {
console.error('Decompilation error:', e)
this.setState({value: 'Decompilation error'});
}
const decompilationResult = decompile(this.props.script);
const decompiledScript = !decompilationResult.error ? decompilationResult.result : decompilationResult.error;
this.setState({value: decompiledScript});
}
};

Expand Down
7 changes: 4 additions & 3 deletions src/js/components/TransactionBadge/TransactionBadge.view.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React from 'react';
import PropTypes from 'prop-types';

import {typeToCssClass, typeToTitle, directionToCssClass} from '../../shared/TransactionDefinitions';
import {directionToCssClass, typeToCssClass, typeToTitle} from '../../shared/TransactionDefinitions';

export const TransactionBadge = ({type, direction}) => {
export const TransactionBadge = ({type, direction, isEthereum}) => {
const className = 'badge ' + typeToCssClass(type) + ' ' + directionToCssClass(direction);
const title = isEthereum ? typeToTitle(type) + ' (Ethereum)' : typeToTitle(type)
return (
<span className={className}>{typeToTitle(type)}</span>
<span className={className}>{title}</span>
);
};

Expand Down
2 changes: 1 addition & 1 deletion src/js/configuration/config.mainnet.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const nodeUrl = 'https://nodes.wavesnodes.com';
const nodeUrl = 'https://nodes.wavesexplorer.com';

export default {
networkId: 'mainnet',
Expand Down
2 changes: 1 addition & 1 deletion src/js/configuration/config.stagenet.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
dataServicesBaseUrl: 'https://api-stagenet.wavesplatform.com/v0',
nodes: [{url: nodeUrl, maintainer: 'Waves', showAsLink: true}],
faucet: {
url: 'https://faucet-stagenet.wavesplatform.com/faucet',
url: 'https://waves-faucet-stagenet.wvservices.com/faucet',
captchaKey: '6Lfir7MUAAAAAAWip4okLvtW8de3fvZaZbGVN-bn',
address: '3MgSuT5FfeMrwwZCbztqLhQpcJNxySaFEiT'
}
Expand Down
2 changes: 1 addition & 1 deletion src/js/configuration/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import testnet from './config.testnet';
import devnet from './config.devnet';
import stagenet from './config.stagenet';

const configuredNetworks = [testnet, mainnet, stagenet, devnet]
const configuredNetworks = [testnet, stagenet, mainnet, devnet]
.filter(item => __NETWORKS__.includes(item.networkId));

export default configuredNetworks;
36 changes: 36 additions & 0 deletions src/js/pages/ConvertEthPage/ConvertEthPage.container.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from 'react';
import {ConverterItem} from './ConverterItem';
import {ethAddress2waves, wavesAddress2eth, wavesAsset2Eth} from '@waves/node-api-js'
import {getNetworkByte} from '../../shared/utils'
import ServiceFactory from '../../services/ServiceFactory';

export class ConvertEthPage extends React.Component {
state = {
address: '',
asset: '',
};

convertW2EAddress = (value) => wavesAddress2eth(value)
convertE2WAddress = (value) => {
const { networkId } = ServiceFactory.global().configurationService().get(this.props.match.params.networkId);
return ethAddress2waves(value, getNetworkByte(networkId));
}

convertW2EAsset = (value) => wavesAsset2Eth(value)
convertE2WAsset = async (value) => {
const { networkId } = ServiceFactory.global().configurationService().get(this.props.match.params.networkId);
return await ServiceFactory.forNetwork(networkId).assetService().convertEth2Waves(value);
}


render() {
return (
<div className="loaderWrapper">
<div className="content card">
<ConverterItem title="Address" convertW2E={this.convertW2EAddress} convertE2W={this.convertE2WAddress} key='address' />
<ConverterItem title="Asset" convertW2E={this.convertW2EAsset} convertE2W={this.convertE2WAsset} key='asset'/>
</div>
</div>
);
}
}
Loading