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

coinbase-sdk v0.0.2 #22

Merged
merged 17 commits into from
Apr 30, 2024
Merged

coinbase-sdk v0.0.2 #22

merged 17 commits into from
Apr 30, 2024

Conversation

yuga-cb
Copy link
Contributor

@yuga-cb yuga-cb commented Apr 30, 2024

What changed? Why?

Merge coinbase-sdk v0.0.2 to master

Qualified Impact

yuga-cb and others added 17 commits April 22, 2024 18:59
### What changed? Why?
Incorporates JWT generation based on API key, and the OpenAPI spec-based
client library into the SDK.

#### Qualified Impact
<!-- Please evaluate what components could be affected and what the
impact would be if there was an
error. How would this error be resolved, e.g. rollback a deploy, push a
new fix, disable a feature
flag, etc... -->
Adds the ability to access the current user.
### What changed? Why?
Create a wrapper class around the User model. Add wallet methods off of
the wrapper User.

#### Qualified Impact
<!-- Please evaluate what components could be affected and what the
impact would be if there was an
error. How would this error be resolved, e.g. rollback a deploy, push a
new fix, disable a feature
flag, etc... -->
None
### What changed? Why?

Update ruby client for cdp backend

#### Qualified Impact
<!-- Please evaluate what components could be affected and what the
impact would be if there was an
error. How would this error be resolved, e.g. rollback a deploy, push a
new fix, disable a feature
flag, etc... -->
### What changed? Why?
- CDP Service Ruby Client is updated to include `list_wallets` input
parameters (Limit and Page)

#### Qualified Impact
<!-- Please evaluate what components could be affected and what the
impact would be if there was an
error. How would this error be resolved, e.g. rollback a deploy, push a
new fix, disable a feature
flag, etc... -->
### What changed? Why?
Implement balance-related methods

#### Qualified Impact
<!-- Please evaluate what components could be affected and what the
impact would be if there was an
error. How would this error be resolved, e.g. rollback a deploy, push a
new fix, disable a feature
flag, etc... -->
### What changed? Why?
Fix typo and attestation

#### Qualified Impact
<!-- Please evaluate what components could be affected and what the
impact would be if there was an
error. How would this error be resolved, e.g. rollback a deploy, push a
new fix, disable a feature
flag, etc... -->
### What changed? Why?
Use the wallet model for the wallet ID rather than generating a new one.
This was causing a bug in Wallet import / export.

#### Qualified Impact
<!-- Please evaluate what components could be affected and what the
impact would be if there was an
error. How would this error be resolved, e.g. rollback a deploy, push a
new fix, disable a feature
flag, etc... -->
Fix bug
### What changed? Why?
Update default_address to use Wallet model. Also update Ruby client,
Changelog, and Gem version

#### Qualified Impact
<!-- Please evaluate what components could be affected and what the
impact would be if there was an
error. How would this error be resolved, e.g. rollback a deploy, push a
new fix, disable a feature
flag, etc... -->
### What changed? Why?
- Transfers are tracked on the server
- Transfers are currently still signed and broadcasted by the client SDK
- Update Ruby Client to include current `Transfer` model +
`create_transfer` input arguments

#### Qualified Impact
<!-- Please evaluate what components could be affected and what the
impact would be if there was an
error. How would this error be resolved, e.g. rollback a deploy, push a
new fix, disable a feature
flag, etc... -->
### What changed? Why?
This adds the configuration initializer pattern to help simplify
initialization in things like rails applications.

#### Qualified Impact
This changes how the gem is initialized:

```ruby
#old
Coinbase.parameter = 'x'

#new
Coinbase.configure do |config|
  config.parameter = 'x'
end
``` 
This allows us to build validation logic, as well as automation built
into initialization of the gem.
### What changed? Why?
Implement remainder of v0.0.2:
- Update Changelog
- Implement transfer for ERC-20s
- Implement E2E test
- Update yardoc
- Update README

#### Qualified Impact
<!-- Please evaluate what components could be affected and what the
impact would be if there was an
error. How would this error be resolved, e.g. rollback a deploy, push a
new fix, disable a feature
flag, etc... -->
### What changed? Why?
This fixes the user `#import_wallet` reference for `wallets_api` to
ensure that it uses the memoized helper.

Currently this is returning an error since `@wallets_api` is not set
unless you initialize a wallet with `address_count: 0` or calling
`list_balances`.

This can be verified with:
```ruby
user = Coinbase.default_user
cb_wallet = user.import_wallet(Coinbase::Wallet::Data.new(wallet.seed, wallet.wallet_id))
```

#### Qualified Impact
This impacts wallet import flows
### What changed? Why?
This makes the Coinbase::Wallet::Data object keyword initialized.

Since users have to persist this data they will need to rehydrate this.
Having the ordering matter makes it more likely for developers to= run
into errors (as I did when integrating the SDK).

This also adds a regression test for this PR:
#20

#### Qualified Impact
<!-- Please evaluate what components could be affected and what the
impact would be if there was an
error. How would this error be resolved, e.g. rollback a deploy, push a
new fix, disable a feature
flag, etc... -->
### What changed? Why?
Update README

#### Qualified Impact
<!-- Please evaluate what components could be affected and what the
impact would be if there was an
error. How would this error be resolved, e.g. rollback a deploy, push a
new fix, disable a feature
flag, etc... -->
@yuga-cb yuga-cb merged commit f756622 into master Apr 30, 2024
6 checks passed
@yuga-cb yuga-cb deleted the v0.0.2 branch April 30, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants