diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-02-28 02:24:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-28 02:24:36 +0800 |
commit | 593474031d7faf4242c76aa22defea8ea76e9e90 (patch) | |
tree | 41c931b6c07ea28222a98e9e7f051159542ce027 /packages/web3-wrapper | |
parent | 7f8f4df0a01123e4fb414b3d5b70d0ed3115a4da (diff) | |
parent | fce10548d2d992317e36af48638a5ee799e94e7c (diff) | |
download | dexon-sol-tools-593474031d7faf4242c76aa22defea8ea76e9e90.tar dexon-sol-tools-593474031d7faf4242c76aa22defea8ea76e9e90.tar.gz dexon-sol-tools-593474031d7faf4242c76aa22defea8ea76e9e90.tar.bz2 dexon-sol-tools-593474031d7faf4242c76aa22defea8ea76e9e90.tar.lz dexon-sol-tools-593474031d7faf4242c76aa22defea8ea76e9e90.tar.xz dexon-sol-tools-593474031d7faf4242c76aa22defea8ea76e9e90.tar.zst dexon-sol-tools-593474031d7faf4242c76aa22defea8ea76e9e90.zip |
Merge branch 'development' into fix/unsubscribeAll
Diffstat (limited to 'packages/web3-wrapper')
-rw-r--r-- | packages/web3-wrapper/CHANGELOG.md | 6 | ||||
-rw-r--r-- | packages/web3-wrapper/src/index.ts | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/packages/web3-wrapper/CHANGELOG.md b/packages/web3-wrapper/CHANGELOG.md index eb31f7e3c..387aafb3a 100644 --- a/packages/web3-wrapper/CHANGELOG.md +++ b/packages/web3-wrapper/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG -## v0.1.12 _February 9, 2018_ +## v0.2.XX - _TBD_ 2018 + + * Ensure all returned user addresses are lowercase (#373) + +## v0.1.12 - _February 9, 2018_ * Fix publishing issue where .npmignore was not properly excluding undesired content (#389) diff --git a/packages/web3-wrapper/src/index.ts b/packages/web3-wrapper/src/index.ts index a2878fc2a..7f3452c98 100644 --- a/packages/web3-wrapper/src/index.ts +++ b/packages/web3-wrapper/src/index.ts @@ -41,7 +41,8 @@ export class Web3Wrapper { } public async isSenderAddressAvailableAsync(senderAddress: string): Promise<boolean> { const addresses = await this.getAvailableAddressesAsync(); - return _.includes(addresses, senderAddress); + const normalizedAddress = senderAddress.toLowerCase(); + return _.includes(addresses, normalizedAddress); } public async getNodeVersionAsync(): Promise<string> { const nodeVersion = await promisify<string>(this._web3.version.getNode)(); @@ -96,7 +97,8 @@ export class Web3Wrapper { } public async getAvailableAddressesAsync(): Promise<string[]> { const addresses = await promisify<string[]>(this._web3.eth.getAccounts)(); - return addresses; + const normalizedAddresses = _.map(addresses, address => address.toLowerCase()); + return normalizedAddresses; } public async getLogsAsync(filter: Web3.FilterObject): Promise<Web3.LogEntry[]> { let fromBlock = filter.fromBlock; |