Skip to content

Commit

Permalink
fix: Resolving incorrect lack of return in some methods within `Acc…
Browse files Browse the repository at this point in the history
…ountManager`
  • Loading branch information
robdmoore committed Apr 20, 2024
1 parent 1c5e8f0 commit cc49c24
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
20 changes: 10 additions & 10 deletions docs/code/classes/types_account_manager.AccountManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ ___

### dispenser

**dispenser**(): `Promise`\<`void`\>
**dispenser**(): `Promise`\<[`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) & \{ `account`: `default` \| [`SigningAccount`](types_account.SigningAccount.md) }\>

Returns an account (with private key loaded) that can act as a dispenser.

#### Returns

`Promise`\<`void`\>
`Promise`\<[`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) & \{ `account`: `default` \| [`SigningAccount`](types_account.SigningAccount.md) }\>

The account

Expand All @@ -123,7 +123,7 @@ ___

### fromEnvironment

**fromEnvironment**(`name`, `fundWith?`): `Promise`\<`void`\>
**fromEnvironment**(`name`, `fundWith?`): `Promise`\<[`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) & \{ `account`: `default` \| [`SigningAccount`](types_account.SigningAccount.md) }\>

Tracks and returns an Algorand account with private key loaded by convention from environment variables based on the given name identifier.

Expand All @@ -146,7 +146,7 @@ This allows you to write code that will work seamlessly in production and local

#### Returns

`Promise`\<`void`\>
`Promise`\<[`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) & \{ `account`: `default` \| [`SigningAccount`](types_account.SigningAccount.md) }\>

The account

Expand Down Expand Up @@ -352,13 +352,13 @@ ___

### localNetDispenser

**localNetDispenser**(): `Promise`\<`void`\>
**localNetDispenser**(): `Promise`\<[`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) & \{ `account`: `default` }\>

Returns an Algorand account with private key loaded for the default LocalNet dispenser account (that can be used to fund other accounts).

#### Returns

`Promise`\<`void`\>
`Promise`\<[`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) & \{ `account`: `default` }\>

The account

Expand All @@ -376,7 +376,7 @@ ___

### logicsig

**logicsig**(`program`, `args?`): `void`
**logicsig**(`program`, `args?`): [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) & \{ `account`: `LogicSigAccount` }

Tracks and returns an account that represents a logic signature.

Expand All @@ -389,7 +389,7 @@ Tracks and returns an account that represents a logic signature.

#### Returns

`void`
[`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) & \{ `account`: `LogicSigAccount` }

A logic signature account wrapper

Expand Down Expand Up @@ -439,13 +439,13 @@ ___

### random

**random**(): `void`
**random**(): [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) & \{ `account`: `default` }

Tracks and returns a new, random Algorand account with secret key loaded.

#### Returns

`void`
[`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) & \{ `account`: `default` }

The account

Expand Down
10 changes: 5 additions & 5 deletions src/types/account-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export class AccountManager {
* @returns The account
*/
public async fromEnvironment(name: string, fundWith?: AlgoAmount) {
this.signerAccount(await mnemonicAccountFromEnvironment({ name, fundWith }, this._clientManager.algod, this._clientManager.kmd))
return this.signerAccount(await mnemonicAccountFromEnvironment({ name, fundWith }, this._clientManager.algod, this._clientManager.kmd))
}

/**
Expand Down Expand Up @@ -244,7 +244,7 @@ export class AccountManager {
* @returns A logic signature account wrapper
*/
public logicsig(program: Uint8Array, args?: Array<Uint8Array>) {
this.signerAccount(new LogicSigAccount(program, args))
return this.signerAccount(new LogicSigAccount(program, args))
}

/**
Expand All @@ -257,7 +257,7 @@ export class AccountManager {
* @returns The account
*/
public random() {
this.signerAccount(randomAccount())
return this.signerAccount(randomAccount())
}

/**
Expand All @@ -272,7 +272,7 @@ export class AccountManager {
* @returns The account
*/
public async dispenser() {
this.signerAccount(await getDispenserAccount(this._clientManager.algod, this._clientManager.kmd))
return this.signerAccount(await getDispenserAccount(this._clientManager.algod, this._clientManager.kmd))
}

/**
Expand All @@ -285,6 +285,6 @@ export class AccountManager {
* @returns The account
*/
public async localNetDispenser() {
this.signerAccount(await getLocalNetDispenserAccount(this._clientManager.algod, this._clientManager.kmd))
return this.signerAccount(await getLocalNetDispenserAccount(this._clientManager.algod, this._clientManager.kmd))
}
}

0 comments on commit cc49c24

Please sign in to comment.