Skip to content

Commit

Permalink
fixes wallet repl examples (#17)
Browse files Browse the repository at this point in the history
uses correct parameterization for getBalances: passes account instance instead
of account name

removes node status example
  • Loading branch information
hughy authored Aug 23, 2023
1 parent 426fcc6 commit e98d70e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/commands/repl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ export default class Repl extends IronfishCommand {
this.log('Examples:')
this.log('\n List all account names')
this.log(` > wallet.listAccounts().map((a) => a.name)`)
this.log(`\n Get the balance of an account`)
this.log(` > await wallet.getBalance('default')`)
this.log(`\n Use the RPC node/getStatus`)
this.log(` > (await client.status()).content`)
this.log(`\n Get the balances of an account`)
this.log(` > const account = await wallet.getAccountByName('default')`)
this.log(` > await wallet.getBalances(account)`)
this.log('')

const historyPath = path.join(node.config.tempDir, 'repl_history.txt')
Expand Down

0 comments on commit e98d70e

Please sign in to comment.