Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify in the docs that getBalance returns the balance in mutez #2682

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/rpc_package.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const balance = await client.getBalance('tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb');
console.log('-- Balance:', balance.toNumber());
```

The balance is returned as a `BigNumber` and must be converted to a number to output it.
The balance is returned as a `BigNumber` and must be converted to a number to output it. Please note that the returned value is in mutez (micro ꜩ), so if you need the balance in ꜩ, you can divide it by 1000000.

```js
// gets head block
Expand Down
2 changes: 1 addition & 1 deletion packages/taquito-rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { RpcClient } from '@taquito/rpc';

const client = new RpcClient('https://YOUR_PREFERRED_RPC_URL');

// Fetching the balance of an account
// Fetching the balance of an account in mutez (micro ꜩ)
const balance = await client.getBalance('tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb');
```

Expand Down
Loading