diff --git a/src/components/finutils/src/common/evm.rs b/src/components/finutils/src/common/evm.rs index d2554c240..14dfde63e 100644 --- a/src/components/finutils/src/common/evm.rs +++ b/src/components/finutils/src/common/evm.rs @@ -41,10 +41,18 @@ pub fn transfer_to_account( let mut builder = utils::new_tx_builder().c(d!())?; let kp = get_keypair().c(d!())?; + + let asset = if let Some(asset) = asset { + let asset = AssetTypeCode::new_from_base64(asset)?; + Some(asset) + } else { + None + }; + let transfer_op = utils::gen_transfer_op( &kp, vec![(&BLACK_HOLE_PUBKEY_STAKING, amount)], - None, + asset, false, false, Some(AssetRecordType::NonConfidentialAmount_NonConfidentialAssetType), @@ -55,13 +63,6 @@ pub fn transfer_to_account( None => MultiSigner::Xfr(kp.get_pk()), }; - let asset = if let Some(asset) = asset { - let asset = AssetTypeCode::new_from_base64(asset)?; - Some(asset) - } else { - None - }; - let lowlevel_data = if let Some(data) = lowlevel_data { let data = hex::decode(data).c(d!())?; Some(data) diff --git a/src/components/finutils/src/common/mod.rs b/src/components/finutils/src/common/mod.rs index 9b5c0bb3d..d0226f508 100644 --- a/src/components/finutils/src/common/mod.rs +++ b/src/components/finutils/src/common/mod.rs @@ -721,7 +721,9 @@ pub fn create_asset( create_asset_x(&kp, memo, decimal, max_units, transferable, Some(code)) .c(d!()) - .map(|_| ()) + .map(|code| { + println!("type: {}", code.to_base64()); + }) } #[allow(missing_docs)]