Skip to content

Commit

Permalink
Merge pull request #534 from ensdomains/dev
Browse files Browse the repository at this point in the history
Deploy to production
  • Loading branch information
jefflau authored Nov 19, 2019
2 parents 40162b9 + e7d42bc commit 74ef8b7
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@ensdomains/ethregistrar": "^1.2.2",
"@ensdomains/react-ens-address": "^0.0.16",
"@ensdomains/resolver": "^0.1.11",
"@ensdomains/ui": "1.1.31",
"@ensdomains/ui": "1.1.39",
"apollo-cache-inmemory": "^1.2.9",
"apollo-client": "^2.4.5",
"apollo-link": "^1.2.2",
Expand Down
10 changes: 3 additions & 7 deletions src/api/subDomainRegistrar.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import subDomainRegistrarContract from './contracts/subDomainRegistrarContract.json'
import { getSignerOrProvider } from '@ensdomains/ui'
import { getProvider } from '@ensdomains/ui'
import { Contract, utils } from 'ethers'
import domains from '../constants/domains.json'
let subDomainRegistrars = {}

const defaultAddress = '0x0b07463b30b302a98407d3e3df85ebc073b0dbd1'

const getSubDomainRegistrar = async address => {
const signerOrProvider = await getSignerOrProvider()
const provider = await getProvider()
function instantiateContract(address) {
const contract = new Contract(
address,
subDomainRegistrarContract,
signerOrProvider
)
const contract = new Contract(address, subDomainRegistrarContract, provider)
subDomainRegistrars[address] = contract
return contract
}
Expand Down
22 changes: 21 additions & 1 deletion src/components/NetworkInformation/NetworkInfoQuery.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react'
import styled from '@emotion/styled'
import { Query } from 'react-apollo'
import gql from 'graphql-tag'
import Loader from '../Loader'
Expand All @@ -12,10 +13,29 @@ export const GET_WEB3 = gql`
}
`

const Waiting = styled('div')`
color: #ccc;
display: flex;
font-size: 11px;
text-transform: uppercase;
font-weight: 700;
`

const WaitingText = styled('span')`
margin-right: 5px;
`

const NetworkInfoQuery = ({ noLoader, children }) => (
<Query query={GET_WEB3}>
{({ data, loading, error }) => {
if (loading) return noLoader ? '' : <Loader />
if (loading)
return noLoader ? (
''
) : (
<Waiting>
<WaitingText>Waiting for accounts</WaitingText> <Loader />
</Waiting>
)
const {
web3: { accounts, network }
} = data
Expand Down
2 changes: 1 addition & 1 deletion src/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,5 @@ export function isElementInViewport(el) {
export const emptyAddress = _emptyAddress

export function isShortName(term) {
return [...term].length < 7
return [...term].length < 3
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1331,10 +1331,10 @@
resolved "https://registry.yarnpkg.com/@ensdomains/resolver/-/resolver-0.1.9.tgz#013bc88397c2c204737aaaf602380145d845e09e"
integrity sha512-eSZIEWi2UcxNZXJhAeoTYUZr20fyly9eMUy17WQ5UjszXf0QgE1Zzh/Oj9Mhl0i8s7xqoPOsntr2ZI0JhsX78w==

"@ensdomains/[email protected].31":
version "1.1.31"
resolved "https://registry.yarnpkg.com/@ensdomains/ui/-/ui-1.1.31.tgz#225f5a9af1b9586cd103d0d361d4bacee3eb1a86"
integrity sha512-LfGDLmGFFxLbqBA+/GVeF7VK5ULl2vdQf+OvFVGbnnNA2tU+nC5krzLwCaxC1RK7Jviur5Cix8rXppVyABvEgw==
"@ensdomains/[email protected].39":
version "1.1.39"
resolved "https://registry.yarnpkg.com/@ensdomains/ui/-/ui-1.1.39.tgz#e3bdc7b4450c3e0fe91731f9622aba66274afead"
integrity sha512-9GU8HXUI7fYwtgKDrCsndiYv9v88LAruv50TMebYJeaPzzuYKS+eCgi5W1tOo8kbaymles1yCvdiUTAQK3DZwQ==
dependencies:
"@0xproject/utils" "^2.0.2"
"@babel/runtime" "^7.4.4"
Expand Down

0 comments on commit 74ef8b7

Please sign in to comment.