Skip to content

Commit

Permalink
Merge pull request #769 from aj-may/lower-case-eth-address
Browse files Browse the repository at this point in the history
fix: lowercase eth addresses
  • Loading branch information
Marak authored Apr 3, 2019
2 parents 157c0c0 + 4d537b3 commit c32ba98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/finance.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ var Finance = function (faker) {
* @method faker.finance.ethereumAddress
*/
self.ethereumAddress = function () {
var address = faker.random.hexaDecimal(40);
var address = faker.random.hexaDecimal(40).toLowerCase();

return address;
};
Expand Down
2 changes: 1 addition & 1 deletion test/finance.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ describe('finance.js', function () {
describe("ethereumAddress()", function(){
it("returns a random ethereum address", function(){
var ethereumAddress = faker.finance.ethereumAddress();
assert.ok(ethereumAddress.match(/^(0x)[0-9a-f]{40}$/i));
assert.ok(ethereumAddress.match(/^(0x)[0-9a-f]{40}$/));
});
});

Expand Down

0 comments on commit c32ba98

Please sign in to comment.