mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 10:01:17 +00:00
Pay trait gets Error item (#14258)
* `Pay` trait gets `Error` item * Formatting
This commit is contained in:
@@ -436,8 +436,8 @@ pub mod pallet {
|
||||
|
||||
claimant.last_active = status.cycle_index;
|
||||
|
||||
let id = T::Paymaster::pay(&beneficiary, (), payout)
|
||||
.map_err(|()| Error::<T, I>::PayError)?;
|
||||
let id =
|
||||
T::Paymaster::pay(&beneficiary, (), payout).map_err(|_| Error::<T, I>::PayError)?;
|
||||
|
||||
claimant.status = Attempted { registered, id, amount: payout };
|
||||
|
||||
|
||||
@@ -103,12 +103,13 @@ impl Pay for TestPay {
|
||||
type Balance = u64;
|
||||
type Id = u64;
|
||||
type AssetKind = ();
|
||||
type Error = ();
|
||||
|
||||
fn pay(
|
||||
who: &Self::Beneficiary,
|
||||
_: Self::AssetKind,
|
||||
amount: Self::Balance,
|
||||
) -> Result<Self::Id, ()> {
|
||||
) -> Result<Self::Id, Self::Error> {
|
||||
PAID.with(|paid| *paid.borrow_mut().entry(*who).or_default() += amount);
|
||||
Ok(LAST_ID.with(|lid| {
|
||||
let x = *lid.borrow();
|
||||
|
||||
Reference in New Issue
Block a user