API RPC request to get Account Balance

Why the balances.account RPC request on storage, always return an empty balance ?
As a workaround, I use system.account on storage, with the expected result.

Account used for testing : 5FH48744BHgNoLBe8syGXbTEnSpGhp8ttdAKW4MWcR7TUKai

balances.account: PalletBalancesAccountData

{
  free: 0
  reserved: 0
  miscFrozen: 0
  feeFrozen: 0
}
system.account: FrameSystemAccountInfo

{
  nonce: 1
  consumers: 0
  providers: 1
  sufficients: 0
  data: {
    randomId: 0x18a4d1f77688a63a6213a8e7f7469c836c0a90a6327f6f24b517ed46b3c60f57
    free: 9,799
    reserved: 0
    feeFrozen: 0
  }
}
2 Likes

Élois told me that they [Substrate people] want to decouple balance from system but it’s not yet finished. So the balance pallet still contains unused stuff, duplicate of currently used stuff in system.

5 Likes

You also see the custom data from duniter-account pallet, for example randomId. I have a branch to remove it since it adds a lot of complexity that I find more harmful than useful right now (MaxNewAccountsPerBlock, PendingRandomIdAssignments, PendingNewAccounts, RandomIdAssigned…).

1 Like