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

Update rewards apis #30

Merged
merged 1 commit into from
Sep 17, 2024
Merged

Update rewards apis #30

merged 1 commit into from
Sep 17, 2024

Conversation

facoinbase
Copy link
Contributor

What changed? Why?

Align with api changes

  • StakingRewards's Date field is now a full timestamp
  • StakingBalance's Date field is now a full timestamp

Qualified Impact

@cb-heimdall
Copy link

cb-heimdall commented Sep 16, 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 1
Sum 2


amount := big.NewInt(0)

if model.GetAmount() != "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this because we are sometimes returning an empty value instead of a 0 value for a balance check?

Copy link
Contributor Author

@facoinbase facoinbase Sep 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly

 unbondedBalance: 'Balance { amount: '' asset: 'Asset { networkId: '' assetId: '' contractAddress: '' decimals: '0' }' }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AH makes sense, for solana its not a 0 value, but an nil one? If were just having the SDKs make nil -> 0, should we just return 0 from the API?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think making it nil on the api would be better

@facoinbase facoinbase marked this pull request as ready for review September 16, 2024 17:01
Copy link
Contributor

@deangalvin-cb deangalvin-cb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to bump the version in pkg/auth/transport.go and update the Changelog & we should be g2g!

Align with api changes
- StakingRewards's Date field is now a full timestamp
- StakingBalance's Date field is now a full timestamp
@cb-heimdall cb-heimdall dismissed deangalvin-cb’s stale review September 17, 2024 17:46

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

@facoinbase facoinbase merged commit 0b2933a into master Sep 17, 2024
5 checks passed
@facoinbase facoinbase deleted the fa/rewards-apis-update branch September 17, 2024 17:48
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.

3 participants