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

Adds batched amounts to simplewallet balances #1562

Merged
merged 7 commits into from
Jun 13, 2022

Commits on Jun 10, 2022

  1. Adds batched amounts to wallet2 rpc and simplewallet

    This adds detail to the balance command of the CLI wallet to show how
    much has been batched for each address and also summarises when the next
    payout is.
    
    It also includes additional fields to get_balance rpc endpoint on the
    oxen-wallet-rpc so the user can check on the status of their accrued
    funds.
    darcys22 committed Jun 10, 2022
    Configuration menu
    Copy the full SHA
    90cc745 View commit details
    Browse the repository at this point in the history
  2. Make accruedBalance address parameter optional

    If omitted it looks up the current wallet primary address (which is
    usually what we want).
    jagerman committed Jun 10, 2022
    Configuration menu
    Copy the full SHA
    dedc7d3 View commit details
    Browse the repository at this point in the history
  3. Expose next payout height via wallet2

    wallet2_api needs to provide a way to to get at this.
    
    Also changed the existing wallet_rpc_server and simplewallet code to use
    the new wallet2 method.
    jagerman committed Jun 10, 2022
    Configuration menu
    Copy the full SHA
    53f53f2 View commit details
    Browse the repository at this point in the history
  4. Only request needed fields from SN info

    This cuts the size of the response by about 75%.
    jagerman committed Jun 10, 2022
    Configuration menu
    Copy the full SHA
    e56bf13 View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2022

  1. Configuration menu
    Copy the full SHA
    b13b55d View commit details
    Browse the repository at this point in the history
  2. Make epee okay with an std::array not being filled in

    Unlike a vector, if a std::array doesn't exist in the response epee
    chokes.  This fixes it to make it silently ignore it (and leave the
    array values untouched), which just makes it consistent with what it
    does for any other type of field.
    
    This is particularly needed to be able to retrieve service_node_info
    with the `service_node_version`, `lokinet_version`, and
    `storage_server_version` fields omitted without getting a
    deserialization failure from the omission.
    jagerman committed Jun 11, 2022
    Configuration menu
    Copy the full SHA
    dd30873 View commit details
    Browse the repository at this point in the history
  3. Show total staked and unlocking amounts in cli balance

    E.g.:
    
        [wallet T6TSSZ (has locked stakes)]: balance
        Currently selected account: [0] Primary account
        Tag: (No tag assigned)
        Balance: 73541.719401728, unlocked balance: 72339.332202963 (23 block(s) to unlock)
        Total staked: 919.987654321, 0.000000000 unlocking
        Pending SN rewards: 49.419920278,  (next payout: block 10433, in about 26 minutes)
    jagerman committed Jun 11, 2022
    Configuration menu
    Copy the full SHA
    f487aff View commit details
    Browse the repository at this point in the history