diff --git a/src/ts/web3_wrapper.ts b/src/ts/web3_wrapper.ts index 969c2c0407..2f082c9ac6 100644 --- a/src/ts/web3_wrapper.ts +++ b/src/ts/web3_wrapper.ts @@ -12,7 +12,7 @@ export class Web3Wrapper { public isAddress(address: string): boolean { return this.web3.isAddress(address); } - public async getSenderAddressIfExistsAsync(): Promise { + public async getSenderAddressIfExistsAsync(): Promise { const defaultAccount = this.web3.eth.defaultAccount; if (!_.isUndefined(defaultAccount)) { return defaultAccount; @@ -20,10 +20,10 @@ export class Web3Wrapper { const firstAccount = await this.getFirstAddressIfExistsAsync(); return firstAccount; } - public async getFirstAddressIfExistsAsync(): Promise { + public async getFirstAddressIfExistsAsync(): Promise { const addresses = await promisify(this.web3.eth.getAccounts)(); if (_.isEmpty(addresses)) { - return ''; + return undefined; } return (addresses as string[])[0]; }