Skip to content

Commit b8c7e70

Browse files
committed
Fixes, formatting
1 parent 61e9fa2 commit b8c7e70

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

Diff for: pallets/dapp-staking-migration/src/benchmarking.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818

1919
use super::{Pallet as Migration, *};
2020

21-
use sp_std::vec;
2221
use astar_primitives::{dapp_staking::SmartContractHandle, Balance};
2322
use frame_benchmarking::{account as benchmark_account, v2::*};
2423
use pallet_dapp_staking_v3::StakeAmount;
24+
use sp_std::vec;
2525

2626
fn smart_contract<T: Config>(idx: u8) -> T::SmartContract {
2727
let address: T::AccountId = benchmark_account("smart_contract", idx.into(), 456);

Diff for: precompiles/dapp-staking-v3/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ where
553553
// the entire amount from the origin to target contract.
554554
//
555555
// In case value comes from the past period, we don't care, since the `unstake` call will fall apart.
556-
let stake_amount = if staked_amount > 0
556+
let amount = if staked_amount > 0
557557
&& staked_amount.saturating_sub(amount) < minimum_allowed_stake_amount
558558
{
559559
staked_amount
@@ -571,7 +571,7 @@ where
571571
// Then call stake on the target smart contract
572572
let stake_call = pallet_dapp_staking_v3::Call::<R>::stake {
573573
smart_contract: target_smart_contract,
574-
amount: stake_amount,
574+
amount,
575575
};
576576
RuntimeHelper::<R>::try_dispatch(handle, Some(origin).into(), stake_call)?;
577577

Diff for: precompiles/dapp-staking-v3/src/test/tests_v2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ fn nomination_transfer_is_ok() {
768768
ExternalityBuilder::build().execute_with(|| {
769769
initialize();
770770

771-
// Register the first dApp, and stke on it.
771+
// Register the first dApp, and stake on it.
772772
let staker_h160 = ALICE;
773773
let staker_native = AddressMapper::into_account_id(staker_h160);
774774
let smart_contract_address_1 = H160::repeat_byte(0xFA);

Diff for: runtime/shibuya/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,6 @@ pub type Executive = frame_executive::Executive<
13791379
///
13801380
/// Once done, migrations should be removed from the tuple.
13811381
pub type Migrations =
1382-
// Part of shibuya-124
13831382
(pallet_dapp_staking_migration::SingularStakingInfoTranslationUpgrade<Runtime>,);
13841383

13851384
type EventRecord = frame_system::EventRecord<

0 commit comments

Comments
 (0)