coinbase / coinbase-sdk-nodejs

Other
74 stars 29 forks source link

[bugfix] Use proper atomic units for staking balances #189

Closed deangalvin-cb closed 2 months ago

deangalvin-cb commented 2 months ago

What changed? Why?

This updates the internal parsing of balance objects from whole units to atomic units to match other balance usage.

Qualified Impact

This impacts the way balances are parsed internally and should not break any client usage.

cb-heimdall commented 2 months ago

✅ Heimdall Review Status

Requirement Status More Info
Reviews 2/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
marchsu commented 2 months ago

got this when testing locally, but I think it is due to backend returning ETH amount

StakingBalance { date: '2024-08-14T00:00:00.000Z' address: '0x80000001677f23a227dfed6f61b132d114be83b8ad0aa5f3c5d1d77e6ee0bf5f73b0af750cc34e8f2dae73c21dc36f4a' bondedStake: '3.2e-17 ETH' unbondedBalance: '5.566622738e-18 ETH' participantType: 'VALIDATOR' }
cb-heimdall commented 2 months ago

Review Error for marchsu @ 2024-08-27 19:00:37 UTC User failed mfa authentication, public email is not set on your github profile. see go/mfa-help