FuelLabs / FuelLabs/forc

Convert asset balance to human readable format

Open
#4 2 comments 0 reactions 0 assignees View on GitHub
enhancement forc-wallet
Dominant language
Rust
Stars
0
Forks
0
Avg merge
1d 22h
Merged PRs (30d)
3

Description

After creating a new account and getting funds from the beta-4 faucet the balance on my account 0.5 ETH.

Running the command

```bash
forc wallet account 0 balance
```

The balance of the 0th account is shown as seen in the attached image.
The asset is `0x00...` and the displayed balance is `500000000` instead of something like `0.500000...`

![1](https://github.com/FuelLabs/forc/assets/103777923/b7b0a367-7277-4909-80bf-21fa3d97c19b)

In the following code snippet we should perform a check and format the value instead of iterating and directly displaying the value to the user.

https://github.com/FuelLabs/forc-wallet/blob/d6a4798f7159e807b9227f5a49f97179d9d2d0a7/src/account.rs#L259-L266

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.