From 1c72a858adc34e4101f43387026833d2dd6fc33e Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Tue, 2 Apr 2024 13:20:35 -0400 Subject: [PATCH] reuse existing `transform` method for wrapping transactions --- tuxedo-parachain-runtime/src/genesis.rs | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/tuxedo-parachain-runtime/src/genesis.rs b/tuxedo-parachain-runtime/src/genesis.rs index 57f887d2..2ca2f242 100644 --- a/tuxedo-parachain-runtime/src/genesis.rs +++ b/tuxedo-parachain-runtime/src/genesis.rs @@ -5,7 +5,6 @@ use hex_literal::hex; use inner_runtime::{money::Coin, OuterConstraintChecker as InnerConstraintChecker}; use tuxedo_parachain_core::tuxedo_core::{ genesis::TuxedoGenesisConfig, - types::Transaction, verifier::{Sr25519Signature, ThresholdMultiSignature}, ConstraintChecker, }; @@ -22,15 +21,15 @@ pub fn development_genesis_config() -> RuntimeGenesisConfig { let signatories = vec![SHAWN_PUB_KEY_BYTES.into(), ANDREW_PUB_KEY_BYTES.into()]; let user_genesis_transactions = [ - // Money Transactions - wrap_transaction(Coin::<0>::mint( + // Money Transactions + Coin::<0>::mint::<_, _, InnerConstraintChecker>( 100, Sr25519Signature::new(SHAWN_PUB_KEY_BYTES), - )), - wrap_transaction(Coin::<0>::mint( + ).transform(), + Coin::<0>::mint::<_, _, InnerConstraintChecker>( 100, ThresholdMultiSignature::new(1, signatories), - )), + ).transform(), // No Kitty or anything else in this one. Keep it simple. ] .into_iter() @@ -48,15 +47,3 @@ pub fn development_genesis_config() -> RuntimeGenesisConfig { genesis_transactions, ) } - -// TODO this part is ugly. We need to make this work better for the runtime dev eventually. -fn wrap_transaction( - t: Transaction, -) -> Transaction { - Transaction { - inputs: t.inputs, - peeks: t.peeks, - outputs: t.outputs, - checker: OuterConstraintChecker::Inner(t.checker), - } -}