Closed ndkazu closed 2 years ago
Merging #183 (93e18b7) into main (4a98e40) will increase coverage by
0.16%
. The diff coverage is94.54%
.
@@ Coverage Diff @@
## main #183 +/- ##
==========================================
+ Coverage 78.12% 78.28% +0.16%
==========================================
Files 49 49
Lines 4388 4416 +28
==========================================
+ Hits 3428 3457 +29
+ Misses 960 959 -1
Impacted Files | Coverage Δ | |
---|---|---|
pallets/share_distributor/src/mock.rs | 87.50% <ø> (ø) |
|
pallets/share_distributor/src/lib.rs | 91.66% <75.00%> (+0.75%) |
:arrow_up: |
pallets/share_distributor/src/functions.rs | 93.33% <92.30%> (+3.58%) |
:arrow_up: |
pallets/share_distributor/src/tests.rs | 100.00% <100.00%> (ø) |
|
pallets/share_distributor/src/types.rs | 100.00% <100.00%> (ø) |
|
pallets/nft/src/lib.rs | 73.84% <0.00%> (-1.87%) |
:arrow_down: |
pallets/onboarding/src/lib.rs | 88.20% <0.00%> (-0.59%) |
:arrow_down: |
pallets/housing_fund/src/lib.rs | 90.90% <0.00%> (-0.21%) |
:arrow_down: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Added a new storage `Tokens = StorageMap< _,
Blake2_128Concat,
T::AccountId,,
OptionQuery,
Owners
This PR also solves a Round-down problem that occurs when calculating the number of tokens: Using
Percent::from_rational
will ALWAYS do a rounding-down, hence the missing tokens. Instead we usePercent::from_rational_with_rounding
, which uses the closest value with a preference for rounding-up if we're at*.5