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

Refactor method names and where asset, balance, and import logic lives #41

Merged
merged 12 commits into from
May 13, 2024

Commits on May 10, 2024

  1. Migrate get_balance(s) to balance(s)

    This migrates the get_balance* calls to balance* to be more inline
    with standard ruby method naming, i.e. the method name should reflect
    what is being returned v.s. what the method is doing.
    alex-stone committed May 10, 2024
    Configuration menu
    Copy the full SHA
    eb36317 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f89912e View commit details
    Browse the repository at this point in the history
  3. [chore] Cleanup faucet error

    This removes the reference to the unused FaucetLimitReached error
    and updates docs to refer to the correct FaucetLimitReachedError
    alex-stone committed May 10, 2024
    Configuration menu
    Copy the full SHA
    7cc33ef View commit details
    Browse the repository at this point in the history
  4. Add Wallet.import method for importing a wallet

    This enables you to import a wallet with the export data directly.
    alex-stone committed May 10, 2024
    Configuration menu
    Copy the full SHA
    841a4d0 View commit details
    Browse the repository at this point in the history
  5. Migrate balance map to class method

    This migrates the balance map parsing off of the top-level Coinbase
    class and onto the Coinbase::BalanceMap class as a class method.
    
    This also exposes a `Coinbase::Balance` object for simple parsing
    of Coinbase::Client::Balances.
    alex-stone committed May 10, 2024
    Configuration menu
    Copy the full SHA
    4185ff0 View commit details
    Browse the repository at this point in the history
  6. Migrate model.model_id to model.id

    This makes it so that our fetches of the resource ID doesn't stutter
    with the class name.
    
    ```ruby
    wallet = Wallet.import(...)
    puts wallet.id
    ```
    alex-stone committed May 10, 2024
    Configuration menu
    Copy the full SHA
    0f94795 View commit details
    Browse the repository at this point in the history
  7. Consolidate asset and balance handling

    This consolidates the transforms around assets and balances to
    their respective classes, and moves them out of wallet and address.
    
    This also adds testing and fixes the handling for fetching balances
    of `weth` using `get_address_balance` and `get_wallet_balance` which
    was not handled properly.
    
    The `list_address_balances` and `list_wallet_balances` handling properly
    handled `weth`.
    alex-stone committed May 10, 2024
    Configuration menu
    Copy the full SHA
    ff69c26 View commit details
    Browse the repository at this point in the history
  8. Return transfers on address object

    This makes it so that we return address.transfers instead of
    address.list_transfer_ids.
    alex-stone committed May 10, 2024
    Configuration menu
    Copy the full SHA
    8fed7b4 View commit details
    Browse the repository at this point in the history
  9. [chore] Update changelog

    alex-stone committed May 10, 2024
    Configuration menu
    Copy the full SHA
    7634f72 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2024

  1. Update all ID fields and add specs

    This updates all model's fields and adds specs that test the
    inspect function to ensure we're evaluating those functions in
    test.
    alex-stone committed May 13, 2024
    Configuration menu
    Copy the full SHA
    46632bd View commit details
    Browse the repository at this point in the history
  2. Change transfer_id => id

    yuga-cb committed May 13, 2024
    Configuration menu
    Copy the full SHA
    5e198ce View commit details
    Browse the repository at this point in the history
  3. Fix unit tests

    yuga-cb committed May 13, 2024
    Configuration menu
    Copy the full SHA
    b5eaffc View commit details
    Browse the repository at this point in the history