Skip to content

Commit

Permalink
chore: billing reports renamed to payouts receipts
Browse files Browse the repository at this point in the history
  • Loading branch information
yahortsaryk committed Jan 22, 2025
1 parent e11acd8 commit 92f07e7
Show file tree
Hide file tree
Showing 14 changed files with 378 additions and 392 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- [C,D] Updated Substrate to polkadot-v0.9.38
- [C] Added pallet-preimage to support democracy functionality.
- Changes in `pallet-ddc-payouts::begin_billing_report` crate to accept start and end of the era.
- Changes in `pallet-ddc-payouts::begin_payout` crate to accept start and end of the era.
- More explicit events in `pallet-ddc-payouts` and `pallet-ddc-customers`

## [4.8.6]
Expand Down
6 changes: 3 additions & 3 deletions pallets/ddc-customers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -754,9 +754,9 @@ pub mod pallet {
}

impl<T: Config> CustomerCharger<T> for Pallet<T> {
fn charge_bucket_owner(
fn charge_customer(
bucket_owner: T::AccountId,
billing_vault: T::AccountId,
payout_vault: T::AccountId,
amount: u128,
) -> Result<u128, DispatchError> {
let actually_charged: BalanceOf<T>;
Expand Down Expand Up @@ -793,7 +793,7 @@ pub mod pallet {

<T as pallet::Config>::Currency::transfer(
&Self::account_id(),
&billing_vault,
&payout_vault,
actually_charged,
ExistenceRequirement::AllowDeath,
)?;
Expand Down
4 changes: 2 additions & 2 deletions pallets/ddc-customers/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ fn charge_bucket_owner_works() {

// successful transfer
let charge1 = 10;
let charged = DdcCustomers::charge_bucket_owner(account_3, vault, charge1).unwrap();
let charged = DdcCustomers::charge_customer(account_3, vault, charge1).unwrap();
assert_eq!(charge1, charged);

let vault_balance = Balances::free_balance(vault);
Expand Down Expand Up @@ -246,7 +246,7 @@ fn charge_bucket_owner_works() {

// failed transfer
let charge2 = 100u128;
let charge_result = DdcCustomers::charge_bucket_owner(account_3, vault, charge2).unwrap();
let charge_result = DdcCustomers::charge_customer(account_3, vault, charge2).unwrap();
assert_eq!(
Ledger::<Test>::get(account_3),
Some(AccountsLedger {
Expand Down
Loading

0 comments on commit 92f07e7

Please sign in to comment.