Page MenuHomekolab.org

Wallet magic
Changes PlannedPublic

Authored by vanmeeuwen on Apr 8 2020, 5:17 PM.

Details

Reviewers
None
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)

Diff Detail

Repository
rK kolab
Branch
dev/T319376-until-date
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 29116
Build 10558: arc lint + arc unit

Event Timeline

vanmeeuwen requested review of this revision.Apr 8 2020, 5:17 PM
vanmeeuwen created this revision.
vanmeeuwen planned changes to this revision.Apr 8 2020, 5:42 PM
vanmeeuwen edited the test plan for this revision. (Show Details)Apr 8 2020, 5:52 PM