added comment and indents
This commit is contained in:
parent
ad71df5c52
commit
36c6d4b16d
@ -12,10 +12,13 @@ export class AccountIndex {
|
||||
constructor(contractAddress: string, signerAddress?: string) {
|
||||
this.contractAddress = contractAddress;
|
||||
this.contract = new web3.eth.Contract(abi, this.contractAddress);
|
||||
// TODO this signer logic should be part of the web3service
|
||||
// if signer address is not passed (for example in user service) then
|
||||
// this fallsback to a web3 wallet that is not even connected???
|
||||
if (signerAddress) {
|
||||
this.signerAddress = signerAddress;
|
||||
this.signerAddress = signerAddress;
|
||||
} else {
|
||||
this.signerAddress = web3.eth.accounts[0];
|
||||
this.signerAddress = web3.eth.accounts[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,10 @@ export class RegistryService {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
if (!RegistryService.accountRegistry) {
|
||||
const registry = await RegistryService.getRegistry()
|
||||
const accountRegistryAddress = await RegistryService.registry.getContractAddressByName('AccountRegistry')
|
||||
const accountRegistryAddress = await RegistryService
|
||||
.registry
|
||||
.getContractAddressByName('AccountRegistry')
|
||||
|
||||
if (!accountRegistryAddress) {
|
||||
return reject("Unable to initialize Account Registry")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user