Skip to content

Conversation

@remoterami
Copy link
Contributor

No description provided.

@remoterami remoterami force-pushed the BEDS-1540/api-omit-efficiencies branch from 0d68f6a to 5a8c322 Compare June 3, 2025 07:11
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 3, 2025

Deploying beaconchain with  Cloudflare Pages  Cloudflare Pages

Latest commit: c7e2bd7
Status: ✅  Deploy successful!
Preview URL: https://99a96300.beaconchain.pages.dev
Branch Preview URL: https://beds-1540-api-omit-efficienc.beaconchain.pages.dev

View logs

})

retrieveApr := func(timeFrame enums.TimePeriod, apr *float64) {
retrieveApr := func(timeFrame enums.TimePeriod, apr **float64) {
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: Why do we pass double pointers here? Why not leave these funcs as they are, and rather call retrieveApr(enums.Last30d, data.Last30dApr)? Goes for all other double pointers in this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because we want to modify the original underlying value of the response struct, just like before. Essentially the first pointer is a reference if you're familiar with that concept from C, and we're just updating the data type from float64 to *float64 in order to allow returning undefined values

Copy link
Contributor

@LuccaBitfly LuccaBitfly left a comment

Choose a reason for hiding this comment

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

lgtm

@remoterami remoterami force-pushed the BEDS-1540/api-omit-efficiencies branch 2 times, most recently from 248c1fa to 3a11291 Compare June 4, 2025 14:08
@remoterami remoterami force-pushed the BEDS-1540/api-omit-efficiencies branch from 3a11291 to c7e2bd7 Compare June 25, 2025 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants