Skip to content

Commit

Permalink
fix(finance): adjust min length of generated bitcoin address (#1384)
Browse files Browse the repository at this point in the history
  • Loading branch information
Minozzzi committed Sep 22, 2022
1 parent fe97c29 commit 10aded2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/modules/finance/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,10 @@ export class FinanceModule {

let address = this.faker.helpers.arrayElement(['1', '3']);

for (let i = 0; i < addressLength - 1; i++)
address += this.faker.helpers.arrayElement(
'123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'.split('')
);
address += this.faker.random.alphaNumeric(addressLength, {
casing: 'mixed',
bannedChars: '0OIl',
});

return address;
}
Expand Down
6 changes: 3 additions & 3 deletions test/__snapshots__/finance.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ exports[`finance > 42 > bic > noArgs 1`] = `"UYETSCLL"`;

exports[`finance > 42 > bic > with branch code 1`] = `"JUYEPSSL5G5"`;

exports[`finance > 42 > bitcoinAddress 1`] = `"3XbJMAAara64sSkA9HD24YHQWd1bZb"`;
exports[`finance > 42 > bitcoinAddress 1`] = `"3XbJMAAara64sSkA9HD24YHQWd1bZbB"`;

exports[`finance > 42 > creditCardCVV 1`] = `"379"`;

Expand Down Expand Up @@ -86,7 +86,7 @@ exports[`finance > 1211 > bic > noArgs 1`] = `"LXUFBTZ15O7"`;

exports[`finance > 1211 > bic > with branch code 1`] = `"YLXUDE4ZXXX"`;

exports[`finance > 1211 > bitcoinAddress 1`] = `"1TMe8Z3EaFdLqmaGKP1LEEJQVriSZRZdsAUc9n"`;
exports[`finance > 1211 > bitcoinAddress 1`] = `"1TMe8Z3EaFdLqmaGKP1LEEJQVriSZRZdsAUc9nC"`;

exports[`finance > 1211 > creditCardCVV 1`] = `"948"`;

Expand Down Expand Up @@ -152,7 +152,7 @@ exports[`finance > 1337 > bic > noArgs 1`] = `"OEFHLYG1"`;

exports[`finance > 1337 > bic > with branch code 1`] = `"GOEFFIJGXXX"`;

exports[`finance > 1337 > bitcoinAddress 1`] = `"3adhxs2jewAgkYgJi7No6Cn8JZar"`;
exports[`finance > 1337 > bitcoinAddress 1`] = `"3adhxs2jewAgkYgJi7No6Cn8JZarS"`;

exports[`finance > 1337 > creditCardCVV 1`] = `"251"`;

Expand Down

0 comments on commit 10aded2

Please sign in to comment.