Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rent distribution #242

Merged
merged 7 commits into from
Feb 13, 2023
Merged

Rent distribution #242

merged 7 commits into from
Feb 13, 2023

Conversation

ndkazu
Copy link
Contributor

@ndkazu ndkazu commented Feb 8, 2023

Implemented the monthly rent distribution:

  • The hook checks that
  1. the number of payments is greater than 0
  2. the free balance of the virtual account is greater or equal to the rent.

If both conditions are satisfied, one month's rent is distributed between the owners, according to their asset's share.
Maintenance fees are removed from the rent before distribution and reserved.

@codecov-commenter
Copy link

Codecov Report

Merging #242 (6c56048) into main (913468b) will increase coverage by 0.00%.
The diff coverage is 84.37%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##             main     #242   +/-   ##
=======================================
  Coverage   82.58%   82.59%           
=======================================
  Files          69       69           
  Lines        6737     6820   +83     
=======================================
+ Hits         5564     5633   +69     
- Misses       1173     1187   +14     
Impacted Files Coverage Δ
pallets/asset_management/src/lib.rs 76.96% <ø> (ø)
pallets/asset_management/src/mock.rs 92.00% <0.00%> (-3.84%) ⬇️
pallets/payment/src/lib.rs 76.98% <ø> (-0.19%) ⬇️
pallets/tenancy/src/lib.rs 80.00% <ø> (ø)
runtime/src/lib.rs 10.28% <0.00%> (-0.10%) ⬇️
pallets/asset_management/src/functions.rs 88.01% <77.19%> (-3.34%) ⬇️
pallets/payment/src/tests.rs 99.50% <100.00%> (-0.01%) ⬇️
pallets/share_distributor/src/types.rs 100.00% <100.00%> (ø)
pallets/tenancy/src/functions.rs 87.23% <100.00%> (+2.61%) ⬆️
pallets/tenancy/src/mock.rs 95.45% <100.00%> (+0.21%) ⬆️
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ndkazu ndkazu merged commit 6209de6 into main Feb 13, 2023
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