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

Adding staking rewards and asset functionality #10

Merged
merged 4 commits into from
Aug 16, 2024

Conversation

marcin-cb
Copy link
Contributor

@marcin-cb marcin-cb commented Aug 16, 2024

What changed? Why?

Add the ability to query staking rewards for an addreses.
Add the Asset object and ability to fetch an asset from the backend server.

Testing

Output of the example:

StakingReward { date: '2024-08-09' address: '0xddb00798137e9e7cc89f1e9679e6ce6ea580b8f9' amount: '1' }
StakingReward { date: '2024-08-10' address: '0xddb00798137e9e7cc89f1e9679e6ce6ea580b8f9' amount: '1' }
StakingReward { date: '2024-08-11' address: '0xddb00798137e9e7cc89f1e9679e6ce6ea580b8f9' amount: '1' }
StakingReward { date: '2024-08-12' address: '0xddb00798137e9e7cc89f1e9679e6ce6ea580b8f9' amount: '1' }
StakingReward { date: '2024-08-13' address: '0xddb00798137e9e7cc89f1e9679e6ce6ea580b8f9' amount: '1' }
StakingReward { date: '2024-08-14' address: '0xddb00798137e9e7cc89f1e9679e6ce6ea580b8f9' amount: '1' }

Qualified Impact

@cb-heimdall
Copy link

cb-heimdall commented Aug 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 0
Sum 1


for page != "" {

if page == "first" {
Copy link
Contributor

Choose a reason for hiding this comment

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

what's this ?

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 used this paradigm to mimic how we were doing this for the other SDKs but I can update it based on your recommendation below.

Format: format,
}

for page != "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe just use for {} ? and exit when no more pages ?

@marcin-cb marcin-cb requested a review from drohit-cb August 16, 2024 17:05
@marcin-cb marcin-cb merged commit f5d24ab into master Aug 16, 2024
5 checks passed
@marcin-cb marcin-cb deleted the marcin/staking-rewards branch August 16, 2024 17:35
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