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 from 1Hive/aragon #15

Open
wants to merge 18 commits into
base: develop
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
16 changes: 0 additions & 16 deletions now.json

This file was deleted.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"dependencies": {
"@aragon/templates-tokens": "^1.2.1",
"@aragon/ui": "^1.5.0",
"@aragon/wrapper": "^5.0.0-rc.28",
"@1hive/wrapper": "^5.0.0",
"@sentry/browser": "^5.17.0",
"@ungap/event-target": "^0.1.0",
"clipboard-polyfill": "^2.8.6",
Expand Down Expand Up @@ -98,8 +98,8 @@
"rimraf": "^2.6.2"
},
"resolutions": {
"@aragon/wrapper/web3": "1.2.6",
"@aragon/wrapper/web3-eth-abi": "1.2.6"
"@1hive/wrapper/web3": "1.2.6",
"@1hive/wrapper/web3-eth-abi": "1.2.6"
},
"scripts": {
"bundlewatch": "bundlewatch",
Expand All @@ -110,13 +110,15 @@
"start:staging": "cross-env ARAGON_ENS_REGISTRY_ADDRESS=0xfe03625ea880a8cba336f9b5ad6e15b0a3b5a939 npm start",
"start:ropsten": "cross-env ARAGON_ETH_NETWORK_TYPE=ropsten npm start",
"start:xdai": "cross-env ARAGON_ETH_NETWORK_TYPE=xdai npm start",
"start:polygon": "cross-env ARAGON_ETH_NETWORK_TYPE=polygon npm start",
"build": "node scripts/build",
"build:local": "node scripts/build-local",
"build:mainnet": "cross-env ARAGON_ETH_NETWORK_TYPE=main npm run build",
"build:rinkeby": "npm run build",
"build:staging": "cross-env ARAGON_ENS_REGISTRY_ADDRESS=0xfe03625ea880a8cba336f9b5ad6e15b0a3b5a939 npm run build",
"build:ropsten": "cross-env ARAGON_ETH_NETWORK_TYPE=ropsten npm run build",
"build:xdai": "cross-env ARAGON_ETH_NETWORK_TYPE=xdai npm run build",
"build:polygon": "cross-env ARAGON_ETH_NETWORK_TYPE=polygon npm run build",
"lint": "eslint ./src",
"test": "npm run lint && npm run jest",
"jest": "jest",
Expand Down
5 changes: 4 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ const INITIAL_DAO_STATE = {
}

const SELECTOR_NETWORKS = [
['main', 'Ethereum Mainnet', 'https://client.aragon.org/'],
[100, 'xdai', 'xDai Network', 'https://aragon.1hive.org/'],
[137, 'polygon', 'Polygon Network', 'https://aragon.1hive.org/'],
[1, 'main', 'Ethereum Mainnet', 'https://client.aragon.org/'],
[
4,
'rinkeby',
'Ethereum Testnet (Rinkeby)',
'https://rinkeby.client.aragon.org/',
Expand Down
2 changes: 1 addition & 1 deletion src/aragonjs-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Aragon, {
ensResolve,
getRecommendedGasLimit,
providers,
} from '@aragon/wrapper'
} from '@1hive/wrapper'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

import {
appOverrides,
sortAppsPair,
Expand Down
6 changes: 5 additions & 1 deletion src/local-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,17 @@ export function getEthNetworkType() {
return getLocalSetting(ETH_NETWORK_TYPE) || 'rinkeby'
}

export function setEthNetworkType(networkType) {
return setLocalSetting(ETH_NETWORK_TYPE, networkType)
}

export function getEthSubscriptionEventDelay() {
const delay = parseInt(getLocalSetting(ETH_SUBSCRIPTION_EVENT_DELAY), 10)
return Number.isFinite(delay) ? delay : 0
}

export function getIpfsGateway() {
return getLocalSetting(IPFS_GATEWAY) || 'https://ipfs.eth.aragon.network/ipfs'
return getLocalSetting(IPFS_GATEWAY) || 'https://ipfs.io/ipfs'
}

export function setIpfsGateway(gateway) {
Expand Down
23 changes: 22 additions & 1 deletion src/network-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const networkConfigs = {
localEnsRegistryAddress || '0xaafca6b0c89521752e559650206d7c925fd0e530',
},
nodes: {
defaultEth: 'wss://xdai.poanetwork.dev/wss',
defaultEth: 'wss://rpc.gnosischain.com/wss',
},
settings: {
chainId: 100,
Expand All @@ -114,6 +114,27 @@ export const networkConfigs = {
portisDappId ? { id: 'portis', conf: portisDappId } : null,
].filter(p => p),
},
polygon: {
addresses: {
ensRegistry:
localEnsRegistryAddress || '0x4E065c622d584Fbe5D9078C3081840155FA69581',
},
nodes: {
defaultEth: 'wss://rpc-mainnet.matic.network',
},
settings: {
chainId: 137,
name: 'Polygon',
shortName: 'polygon',
type: 'private',
live: true,
},
providers: [
{ id: 'provided' },
{ id: 'frame' },
portisDappId ? { id: 'portis', conf: portisDappId } : null,
].filter(p => p),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

},
unknown: {
addresses: {
ensRegistry: localEnsRegistryAddress,
Expand Down
13 changes: 10 additions & 3 deletions src/onboarding/Welcome/Welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ import Header from '../Header/Header'
import OpenOrg from './OpenOrg'
import Suggestions from './Suggestions'
import WelcomeAction from './WelcomeAction'
import { setDefaultEthNode, setEthNetworkType } from '../../local-settings'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'import' is only available in ES6 (use 'esversion: 6').
Missing semicolon.


import actionCreate from './assets/action-create.png'
import actionOpen from './assets/action-open.png'
import { getNetworkConfig } from '../../network-config'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'import' is only available in ES6 (use 'esversion: 6').
Missing semicolon.


const Welcome = React.memo(function Welcome({
createError,
Expand All @@ -24,16 +26,21 @@ const Welcome = React.memo(function Welcome({

const selectorNetworksSorted = useMemo(() => {
return selectorNetworks
.map(([type, name, url]) => ({ type, name, url }))
.map(([chainId, type, name, url]) => ({ chainId, type, name, url }))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'destructuring binding' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

.sort((a, b) => {
if (b.type === network.type) return 1
if (a.type === network.type) return -1
if (b.chainId === network.chainId) return 1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

if (a.chainId === network.chainId) return -1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

return 0
})
}, [selectorNetworks])

const changeNetwork = useCallback(
index => {
const networkType = selectorNetworksSorted[index].type
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Missing semicolon.

const networkConfig = getNetworkConfig(networkType)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Missing semicolon.
Too many errors. (27% scanned).


setEthNetworkType(networkType)
setDefaultEthNode(networkConfig.nodes.defaultEth)
window.location = selectorNetworksSorted[index].url
},
[selectorNetworksSorted]
Expand Down
2 changes: 1 addition & 1 deletion src/prop-types.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import PropTypes from 'prop-types'
import Aragon from '@aragon/wrapper'
import Aragon from '@1hive/wrapper'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'import' is only available in ES6 (use 'esversion: 6').
Missing semicolon.

import {
APPS_STATUS_ERROR,
APPS_STATUS_READY,
Expand Down
48 changes: 24 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
# yarn lockfile v1


"@1hive/wrapper@^5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@1hive/wrapper/-/wrapper-5.0.0.tgz#f25234cf1d0bdee5e5168743778590951b5f0b02"
integrity sha512-bMnAbYiGp/QIsjaAqz33uF6AUzgq2DJE1hctm69W58GQgqpYG7QooNK+LNdWTCNg1tPUJ9qk8YjAEcf0URAjAQ==
dependencies:
"@aragon/os" "^4.2.1"
"@aragon/rpc-messenger" "^2.0.0"
"@babel/runtime" "^7.1.2"
axios "^0.19.0"
dot-prop "^4.2.0"
eth-ens-namehash "^2.0.8"
ethjs-ens "^2.0.1"
localforage "^1.7.3"
localforage-memoryStorageDriver "^0.9.2"
radspec "^1.8.0"
rxjs "^6.5.2"
web3 "1.2.6"
web3-eth-abi "1.2.6"
web3-utils "1.2.6"

"@aragon/os@^4.0.0", "@aragon/os@^4.2.1":
version "4.3.0"
resolved "https://registry.yarnpkg.com/@aragon/os/-/os-4.3.0.tgz#d40b27031affb2c4238648ae7c48970d47f3b9bc"
Expand Down Expand Up @@ -59,26 +79,6 @@
recursive-copy "^2.0.9"
use-inside "^0.2.0"

"@aragon/wrapper@^5.0.0-rc.28":
version "5.0.0-rc.28"
resolved "https://registry.yarnpkg.com/@aragon/wrapper/-/wrapper-5.0.0-rc.28.tgz#4d00928e1633935106395e558d05d0521ea6760e"
integrity sha512-78fWoE/oAOGHNlvq+aZyXy0hZ6JBeqxdS07HXvyucb/fFhphG/puDmkDudP1esMIYmQbbviB+dT6mpa2ctTzQw==
dependencies:
"@aragon/os" "^4.2.1"
"@aragon/rpc-messenger" "^2.0.0"
"@babel/runtime" "^7.1.2"
axios "^0.19.0"
dot-prop "^4.2.0"
eth-ens-namehash "^2.0.8"
ethjs-ens "^2.0.1"
localforage "^1.7.3"
localforage-memoryStorageDriver "^0.9.2"
radspec "^1.5.0"
rxjs "^6.5.2"
web3 "^1.2.6"
web3-eth-abi "^1.2.6"
web3-utils "^1.2.6"

"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e"
Expand Down Expand Up @@ -10301,10 +10301,10 @@ quote-stream@^1.0.1, quote-stream@~1.0.2:
minimist "^1.1.3"
through2 "^2.0.0"

radspec@^1.5.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/radspec/-/radspec-1.10.0.tgz#15230c496f3f924265e047bb51be800edb312a2f"
integrity sha512-vuDL7gwDcUFge9+PLnzgrhJDBiLbtOuE8rpZ1vEz0g0kiKBZXKyiF9zgpTRrEMFU+eKJgXQ8nqigSis/OBeodg==
radspec@^1.8.0:
version "1.11.0"
resolved "https://registry.yarnpkg.com/radspec/-/radspec-1.11.0.tgz#c3ac21625625726a1349ec011a1dc4dcf97fa10a"
integrity sha512-/77PHRjNaaFUyxCqz7bxyRswc4OhF3H3u6OTde7aHsYl/5s+7Cgi24Ia/hx6l/5fuNps57vgiMSbY6mceA+ovA==
dependencies:
"@babel/runtime" "^7.1.2"
bn.js "^4.11.8"
Expand Down