Homekolab.org
Diffusion kolab da13578ce560
Authored by machniak on Jun 10 2020, 11:39 AM.

Description

Wallet magic

Summary: Show-case implementation of how to calculate until when a wallet's balance lasts.

Test Plan:

$ ./artisan user:wallets john@kolab.org
5337dced-7227-4cac-8c66-4b4720cca873
$ ./artisan wallet:expected
expect charging wallet 5337dced-7227-4cac-8c66-4b4720cca873 for user john@kolab.org with 999
$ ./artisan wallet:until $(./artisan user:wallets john@kolab.org)
0 lasts until 2020-04-08 15:10:21 (a month costs 3541)
$ ./artisan wallet:set-balance $(./artisan user:wallets john@kolab.org) $(( 999 + 3541 ))
$ ./artisan wallet:until $(./artisan user:wallets john@kolab.org)
4540 lasts until 2020-05-08 15:10:21 (a month costs 3541)

Reviewers: #hkccp_developers, machniak, vanmeeuwen

Reviewed By: #hkccp_developers, vanmeeuwen

Subscribers: machniak, #hkccp_developers

Differential Revision: https://git.kolab.org/D1150

Details

Committed
machniakJun 10 2020, 11:39 AM
Pushed
machniakJun 10 2020, 11:40 AM
Reviewer
Restricted Project
Differential Revision
D1150: Wallet magic
Parents
rK534d00000831: Cherry-picked contents from hkccp-import
Branches
Unknown
Tags
Unknown
Build Status
Buildable 29782