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

Merged
raucao merged 11 commits from feature/currencies into master 2025-02-16 14:50:26 +00:00
raucao commented 2024-12-18 08:41:20 +00:00 (Migrated from github.com)

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.

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](https://gitea.kosmos.org/kredits/contracts/issues/248) for it.
bumi (Migrated from github.com) reviewed 2024-12-18 08:41:20 +00:00
galfert (Migrated from github.com) reviewed 2024-12-18 08:41:20 +00:00
fsmanuel (Migrated from github.com) reviewed 2024-12-18 08:41:20 +00:00
raucao commented 2024-12-18 13:11:40 +00:00 (Migrated from github.com)

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).

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 commented 2025-01-20 15:59:14 +00:00 (Migrated from github.com)

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

kosmos/chef#581

Here's the corresponding PR for publishing the exchange rates every midnight (UTC): https://gitea.kosmos.org/kosmos/chef/pulls/581
raucao commented 2025-02-11 11:49:50 +00:00 (Migrated from github.com)

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

This is all ready to merge, with the dependencies already merged and deployed...
silverbucket (Migrated from github.com) approved these changes 2025-02-16 13:57:05 +00:00
Sign in to join this conversation.