Skip to content

Commit

Permalink
Merge pull request #2619 from vshab/fix/add-wallet-index
Browse files Browse the repository at this point in the history
Add index to Wallet type
  • Loading branch information
nivida authored Apr 1, 2019
2 parents a5225ca + 685f57a commit 26987f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/web3-eth-accounts/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export class Wallet {
length: number;
defaultKeyName: string;

[key: number]: Account;

create(numberOfAccounts: number, entropy?: string): Wallet;

add(account: string | AddAccount): AddedAccount;
Expand Down
3 changes: 3 additions & 0 deletions packages/web3-eth-accounts/types/tests/accounts-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ accounts.decrypt(
// $ExpectType Wallet
accounts.wallet.create(2);

// $ExpectType Account
accounts.wallet[0];

// $ExpectType Wallet
accounts.wallet.create(2, '54674321§3456764321§345674321§3453647544±±±§±±±!!!43534534534534');

Expand Down

0 comments on commit 26987f6

Please sign in to comment.