Skip to content

Commit

Permalink
remove set_balance from test_api as a duplicate fn (#1529)
Browse files Browse the repository at this point in the history
  • Loading branch information
agryaznov authored and HCastano committed Jan 23, 2023
1 parent 0144e2d commit ed54aa2
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions crates/env/src/engine/off_chain/test_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,6 @@ where
})
}

/// Sets the balance of `account_id` to `new_balance`.
pub fn set_balance<T>(account_id: T::AccountId, new_balance: T::Balance)
where
T: Environment<Balance = u128>, // Just temporary for the MVP!
<T as Environment>::AccountId: From<[u8; 32]>,
{
<EnvInstance as OnInstance>::on_instance(|instance| {
instance
.engine
.set_balance(scale::Encode::encode(&account_id), new_balance);
})
}

/// Sets the value transferred from the caller to the callee as part of the call.
///
/// Please note that the acting accounts should be set with [`set_caller()`] and [`set_callee()`] beforehand.
Expand Down

0 comments on commit ed54aa2

Please sign in to comment.