mirror of
https://github.com/status-im/ens-usernames.git
synced 2025-03-02 19:10:49 +00:00
update methods to work with embark 3.2 and React 16.4
This commit is contained in:
parent
513058bbff
commit
3d66a72d4c
@ -158,7 +158,7 @@ const InnerForm = ({
|
|||||||
{/*</Field>*/}
|
{/*</Field>*/}
|
||||||
<div style={{ position: 'relative', left: 0, right: 0, bottom: 0 }}>
|
<div style={{ position: 'relative', left: 0, right: 0, bottom: 0 }}>
|
||||||
{!isSubmitting ? <MobileButton onClick={() => { setStatus('terms') }} text={`${editAccount ? 'Save' : 'Register'} with transaction`} style={{ width: '100%' }} /> : <CircularProgress style={{ marginLeft: '45%' }} />}
|
{!isSubmitting ? <MobileButton onClick={() => { setStatus('terms') }} text={`${editAccount ? 'Save' : 'Register'} with transaction`} style={{ width: '100%' }} /> : <CircularProgress style={{ marginLeft: '45%' }} />}
|
||||||
<Terms open={displayTerms(status)} onSubmit={() => { setStatus(null); formRef.dispatchEvent(new Event('submit')) }} />
|
<Terms open={displayTerms(status)} onSubmit={() => { setStatus(null); formRef.current.dispatchEvent(new Event('submit')) }} form={formRef} />
|
||||||
</div>
|
</div>
|
||||||
</Hidden>
|
</Hidden>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import EmbarkJS from 'Embark/EmbarkJS';
|
import EmbarkJS from 'Embark/EmbarkJS';
|
||||||
|
import web3 from "Embark/web3";
|
||||||
import ENSRegistry from 'Embark/contracts/ENSRegistry';
|
import ENSRegistry from 'Embark/contracts/ENSRegistry';
|
||||||
import PublicResolver from 'Embark/contracts/PublicResolver';
|
import PublicResolver from 'Embark/contracts/PublicResolver';
|
||||||
|
|
||||||
@ -8,6 +9,6 @@ export const nullAddress = '0x0000000000000000000000000000000000000000';
|
|||||||
export const getResolver = async node => {
|
export const getResolver = async node => {
|
||||||
const resolverAddress = await resolver(node).call();
|
const resolverAddress = await resolver(node).call();
|
||||||
return resolverAddress !== nullAddress
|
return resolverAddress !== nullAddress
|
||||||
? new EmbarkJS.Blockchain.Contract({ abi: PublicResolver._jsonInterface, address: resolverAddress })
|
? new EmbarkJS.Blockchain.Contract({ abi: PublicResolver._jsonInterface, address: resolverAddress, web3 })
|
||||||
: PublicResolver
|
: PublicResolver
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user