added comment and indents
This commit is contained in:
parent
ad71df5c52
commit
36c6d4b16d
@ -12,6 +12,9 @@ export class AccountIndex {
|
|||||||
constructor(contractAddress: string, signerAddress?: string) {
|
constructor(contractAddress: string, signerAddress?: string) {
|
||||||
this.contractAddress = contractAddress;
|
this.contractAddress = contractAddress;
|
||||||
this.contract = new web3.eth.Contract(abi, this.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) {
|
if (signerAddress) {
|
||||||
this.signerAddress = signerAddress;
|
this.signerAddress = signerAddress;
|
||||||
} else {
|
} else {
|
||||||
|
@ -51,7 +51,10 @@ export class RegistryService {
|
|||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
if (!RegistryService.accountRegistry) {
|
if (!RegistryService.accountRegistry) {
|
||||||
const registry = await RegistryService.getRegistry()
|
const registry = await RegistryService.getRegistry()
|
||||||
const accountRegistryAddress = await RegistryService.registry.getContractAddressByName('AccountRegistry')
|
const accountRegistryAddress = await RegistryService
|
||||||
|
.registry
|
||||||
|
.getContractAddressByName('AccountRegistry')
|
||||||
|
|
||||||
if (!accountRegistryAddress) {
|
if (!accountRegistryAddress) {
|
||||||
return reject("Unable to initialize Account Registry")
|
return reject("Unable to initialize Account Registry")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user