Skip to content

Commit

Permalink
set mock runtime AllowMint to correct type
Browse files Browse the repository at this point in the history
  • Loading branch information
akildemir committed Oct 14, 2024
1 parent 7c60baa commit b0f946f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion substrate/in-instructions/pallet/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl grandpa::Config for Test {

impl coins::Config for Test {
type RuntimeEvent = RuntimeEvent;
type AllowMint = ();
type AllowMint = ValidatorSets;
}

impl coins::Config<coins::Instance1> for Test {
Expand Down
10 changes: 10 additions & 0 deletions substrate/in-instructions/pallet/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,16 @@ fn swap_to_staked_sri_instruction() {
// make a pool so that can actually swap
make_liquid_pool(coin, 5 * 10u64.pow(coin.decimals()));

// set the keys to set the TAS for the network
ValidatorSets::<Test>::set_keys(
RawOrigin::None.into(),
coin.network(),
Vec::new().try_into().unwrap(),
KeyPair(insecure_pair_from_name("random-key").public(), Vec::new().try_into().unwrap()),
Signature([0u8; 64]),
)
.unwrap();

// make sure account doesn't already have lTs or allocation
let current_liq_tokens = LiquidityTokens::balance(POL_ACCOUNT.into(), coin.into()).0;
assert_eq!(current_liq_tokens, 0);
Expand Down

0 comments on commit b0f946f

Please sign in to comment.