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

[bugfix] use the right staking api client #164

Merged
merged 2 commits into from
Aug 22, 2024
Merged

Conversation

drohit-cb
Copy link
Contributor

@drohit-cb drohit-cb commented Aug 22, 2024

What changed? Why?

Looks like in the last rebase, I ended up incorrectly choosing the wrong stake api client while calling broadcast_staking_operation.

Testing

  1. Added unit tests for the newly added function which I missed the last time.
  2. Tested SDK locally
[27] pry(main)> wallet = Coinbase::Wallet.create(network: :ethereum_holesky)
=> Coinbase::Wallet{id: 'f253b29f-3f6b-426f-93c2-80300f533301', network_id: 'ethereum_holesky', default_address: '0x9a423EA007a38AaF90D84c4eb0D4dc258B49f211'}
[28] pry(main)> wallet.faucet
=> Coinbase::FaucetTransaction{transaction_hash: '0xad1e4859c7da1442062580823ecb1956ab835a4dc91a9ed8aef465bada3f6412', transaction_link: 'https://holesky.etherscan.io/tx/0xad1e4859c7da1442062580823ecb1956ab835a4dc91a9ed8aef465bada3f6412'}
[32] pry(main)> wallet.balances
=> {:eth=>0.1e-1}
[33] pry(main)> staking_operation = wallet.stake(0.00001, :eth)
=> #<Coinbase::StakingOperation:0x000000014b1cb488
 @model=
  #<Coinbase::Client::StakingOperation:0x0000000107034960
   @address_id="0x9a423EA007a38AaF90D84c4eb0D4dc258B49f211",
   @id="f488c865-2152-4bef-95bb-84ef3e93128c",
   @network_id="ethereum-holesky",
   @status="complete",
   @transactions=
    [#<Coinbase::Client::Transaction:0x0000000107034e88
      @from_address_id="0x9a423EA007a38AaF90D84c4eb0D4dc258B49f211",

Qualified Impact

@cb-heimdall
Copy link

cb-heimdall commented Aug 22, 2024

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

marcin-cb
marcin-cb previously approved these changes Aug 22, 2024
@cb-heimdall cb-heimdall dismissed marcin-cb’s stale review August 22, 2024 23:14

Approved review 2255933626 from marcin-cb is now dismissed due to new commit. Re-request for approval.

@drohit-cb drohit-cb changed the title [bugfix][WIP] use the right staking api client [bugfix] use the right staking api client Aug 22, 2024
@drohit-cb drohit-cb marked this pull request as ready for review August 22, 2024 23:20
@drohit-cb drohit-cb force-pushed the fix_staking_bug branch 2 times, most recently from befd307 to c988c22 Compare August 22, 2024 23:41
@drohit-cb drohit-cb merged commit a93da7e into master Aug 22, 2024
17 checks passed
@drohit-cb drohit-cb deleted the fix_staking_bug branch August 22, 2024 23:44
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.

4 participants