Concordium / concordium-wallet-proxy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simplify calculation of estimated end of the cooldown

abizjak opened this issue · comments

Task description

To calculate the time the cooldown ends the consumer must currently make 4 API calls

  • get the account info to get the "effective timeout"
  • get chain parameters to get the payday duration
  • get epoch duration
  • get next payday

This is complicated for the consumer.

The task is to add the estimate on when the cooldown ends to the accBalance call directly. Care must be taken to not do needless queries in case there is no cooldown for the account.

Requested by @jens-concordium