Skip to content

Use historic BTC rate for expense items; allow BTC as currency #226

Merged
raucao merged 11 commits intomasterfrom
feature/currencies
Feb 16, 2025
Merged

Use historic BTC rate for expense items; allow BTC as currency #226
raucao merged 11 commits intomasterfrom
feature/currencies

Conversation

@raucao
Copy link
Member

@raucao raucao commented Dec 18, 2024

Fetches historic rates when adding expense items where the date is not the current day (still using current rate otherwise). The API for this is just JSON objects posted to a public category in our kosmos@kosmos.org user's remoteStorage account (implementation for that following separately).

Also allows to add expense items with BTC as currency, which forgoes the currency conversions.

Both for transparency and accurate implementation, there is now also an additional sats amount stored with each line item in the expense list for every expense, no matter if it's EUR, USD, or BTC.

closes #225

Edit: I just realized that for the amountSats to be included in the IPFS docs, it needs to be added to the kredits JS library first. Added an issue for it.

@raucao raucao marked this pull request as ready for review December 18, 2024 10:21
@raucao
Copy link
Member Author

raucao commented Dec 18, 2024

I just used this PR to submit the latest reimbursement, which spans a few months. The historic rates in storage go back to August 1, 2024 as of now (but can be extended if necessary).

@raucao
Copy link
Member Author

raucao commented Jan 20, 2025

Here's the corresponding PR for publishing the exchange rates every midnight (UTC):

https://gitea.kosmos.org/kosmos/chef/pulls/581

@raucao raucao requested review from bumi, fsmanuel and galfert January 20, 2025 16:01
@raucao
Copy link
Member Author

raucao commented Feb 11, 2025

This is all ready to merge, with the dependencies already merged and deployed...

Newer kubo/ipfs daemons don't work well with the old HTTP client.
@raucao raucao merged commit d7fe860 into master Feb 16, 2025
3 checks passed
@raucao raucao deleted the feature/currencies branch February 16, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow BTC as currency for expense line items

2 participants