Skip to content

Commit e901641

Browse files
refactor(finance): simplify litecoin address implementation (#2495)
Co-authored-by: DivisionByZero <[email protected]>
1 parent bd19703 commit e901641

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/modules/finance/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -719,12 +719,12 @@ export class FinanceModule {
719719
litecoinAddress(): string {
720720
const addressLength = this.faker.number.int({ min: 26, max: 33 });
721721

722-
let address = this.faker.helpers.arrayElement(['L', 'M', '3']);
723-
724-
for (let i = 0; i < addressLength - 1; i++)
725-
address += this.faker.helpers.arrayElement([
726-
...'123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ',
727-
]);
722+
const address =
723+
this.faker.string.fromCharacters('LM3') +
724+
this.faker.string.fromCharacters(
725+
'123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ',
726+
addressLength - 1
727+
);
728728

729729
return address;
730730
}

0 commit comments

Comments
 (0)