Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Verify checksum of Ethereum payout addresses #260

Merged
merged 1 commit into from
Sep 27, 2017

Conversation

mstuehlinger
Copy link
Contributor

If a payout address uses mixed case, it must be according to EIP-55.
Only lower- or only uppercase addresses are still valid as well.

If a payout address uses mixed case, it must be according to EIP-55: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-55.md
Only lower- or only uppercase addresses are still valid as well.
@@ -13,6 +13,7 @@ const du = require('du'); // Get amount used
const disk = require('diskusage'); // Get amount free
const assert = require('assert');
const bytes = require('bytes');
const web3utils = require('web3-utils');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the github for this? The npm page goes to a 404

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

K, thanks. Looks like this is the code for isAddress https://github.com/ethereum/web3.js/blob/1.0/packages/web3-utils/src/utils.js#L87

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The important part is checkAddressChecksum that gets called at the end of isAddress
https://github.com/ethereum/web3.js/blob/1.0/packages/web3-utils/src/utils.js#L109

@braydonf braydonf merged commit 00e4435 into storj-archived:master Sep 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants