Просмотр исходного кода

app/schema/wallet: cleanup make fn names

epiphany 2 месяцев назад
Родитель
Сommit
cbeb660121

+ 1 - 1
bin/app/src/app/schema/wallet/main.rs

@@ -37,7 +37,7 @@ use crate::{
 
 use super::{super::ColorScheme, data::*, util::*};
 
-pub async fn make_main_wallet_layer(
+pub async fn make(
     app: &App,
     wallet_layer: SceneNodePtr,
     i18n_fish: &I18nBabelFish,

+ 3 - 7
bin/app/src/app/schema/wallet/mod.rs

@@ -41,10 +41,6 @@ use crate::{
     util::i18n::I18nBabelFish,
 };
 
-use main::make_main_wallet_layer;
-use receive::make_receive_layer;
-use send::make_send_layer;
-
 pub async fn make(app: &App, content: SceneNodePtr, i18n_fish: &I18nBabelFish) {
     let window_scale = PropertyFloat32::wrap(
         &app.sg_root.lookup_node("/window").unwrap(),
@@ -67,13 +63,13 @@ pub async fn make(app: &App, content: SceneNodePtr, i18n_fish: &I18nBabelFish) {
     content.link(wallet_layer.clone());
 
     // Create main wallet layer
-    let _ = make_main_wallet_layer(app, wallet_layer.clone(), i18n_fish, window_scale.clone()).await;
+    let _ = main::make(app, wallet_layer.clone(), i18n_fish, window_scale.clone()).await;
 
     // Create blockchain network status indicator layer
     let _ = netstatus::make(app, wallet_layer.clone(), i18n_fish, window_scale.clone()).await;
 
     // Create receive layer
-    let _ = make_receive_layer(
+    let _ = receive::make(
         app,
         wallet_layer.clone(),
         i18n_fish,
@@ -81,7 +77,7 @@ pub async fn make(app: &App, content: SceneNodePtr, i18n_fish: &I18nBabelFish) {
     ).await;
 
     // Create send layer
-    let _ = make_send_layer(
+    let _ = send::make(
         app,
         wallet_layer.clone(),
         i18n_fish,

+ 1 - 1
bin/app/src/app/schema/wallet/receive.rs

@@ -34,7 +34,7 @@ use crate::{
 
 use super::{super::ColorScheme, data::*, util::*};
 
-pub async fn make_receive_layer(
+pub async fn make(
     app: &App,
     wallet_layer: SceneNodePtr,
     i18n_fish: &I18nBabelFish,

+ 7 - 7
bin/app/src/app/schema/wallet/send.rs

@@ -29,9 +29,9 @@ use crate::{
     util::i18n::I18nBabelFish,
 };
 
-use super::{data::SendTxData, data::BALANCE_BASE10_DECIMALS, send_step1::*, send_step2::*, send_step3::*, send_step4::*, tx_status::*};
+use super::{data::SendTxData, data::BALANCE_BASE10_DECIMALS, send_step1, send_step2, send_step3, send_step4, tx_status};
 
-pub async fn make_send_layer(
+pub async fn make(
     app: &App,
     wallet_layer: SceneNodePtr,
     i18n_fish: &I18nBabelFish,
@@ -39,7 +39,7 @@ pub async fn make_send_layer(
 ) -> SceneNodePtr {
     let send_tx_data = std::sync::Arc::new(std::sync::Mutex::new(SendTxData::new()));
 
-    let send_step1_layer = make_send_step1_layer(
+    let send_step1_layer = send_step1::make(
         app,
         wallet_layer.clone(),
         i18n_fish,
@@ -49,7 +49,7 @@ pub async fn make_send_layer(
 
     let step1_is_visible = PropertyBool::wrap(&send_step1_layer, Role::App, "is_visible", 0).unwrap();
 
-    let send_step2_layer = make_send_step2_layer(
+    let send_step2_layer = send_step2::make(
         app,
         wallet_layer.clone(),
         i18n_fish,
@@ -60,7 +60,7 @@ pub async fn make_send_layer(
 
     let step2_is_visible = PropertyBool::wrap(&send_step2_layer, Role::App, "is_visible", 0).unwrap();
 
-    let send_step3_layer = make_send_step3_layer(
+    let send_step3_layer = send_step3::make(
         app,
         wallet_layer.clone(),
         i18n_fish,
@@ -72,7 +72,7 @@ pub async fn make_send_layer(
 
     let step3_is_visible = PropertyBool::wrap(&send_step3_layer, Role::App, "is_visible", 0).unwrap();
 
-    let send_step4_layer = make_send_step4_layer(
+    let send_step4_layer = send_step4::make(
         app,
         wallet_layer.clone(),
         i18n_fish,
@@ -85,7 +85,7 @@ pub async fn make_send_layer(
 
     let step4_is_visible = PropertyBool::wrap(&send_step4_layer, Role::App, "is_visible", 0).unwrap();
 
-    let tx_status_layer = make_tx_status_layer(
+    let tx_status_layer = tx_status::make(
         app,
         wallet_layer.clone(),
         i18n_fish,

+ 1 - 1
bin/app/src/app/schema/wallet/send_step1.rs

@@ -39,7 +39,7 @@ use crate::{
 
 use super::{super::ColorScheme, data::*, util::*};
 
-pub async fn make_send_step1_layer(
+pub async fn make(
     app: &App,
     wallet_layer: SceneNodePtr,
     i18n_fish: &I18nBabelFish,

+ 1 - 1
bin/app/src/app/schema/wallet/send_step2.rs

@@ -38,7 +38,7 @@ use crate::{
 
 use super::{super::ColorScheme, data::*, util::*};
 
-pub async fn make_send_step2_layer(
+pub async fn make(
     app: &App,
     wallet_layer: SceneNodePtr,
     i18n_fish: &I18nBabelFish,

+ 1 - 1
bin/app/src/app/schema/wallet/send_step3.rs

@@ -39,7 +39,7 @@ use crate::{
 
 use super::{super::ColorScheme, data::*, util::*};
 
-pub async fn make_send_step3_layer(
+pub async fn make(
     app: &App,
     wallet_layer: SceneNodePtr,
     i18n_fish: &I18nBabelFish,

+ 1 - 1
bin/app/src/app/schema/wallet/send_step4.rs

@@ -37,7 +37,7 @@ use crate::{
 
 use super::{super::ColorScheme, data::*, util::*};
 
-pub async fn make_send_step4_layer(
+pub async fn make(
     app: &App,
     wallet_layer: SceneNodePtr,
     i18n_fish: &I18nBabelFish,

+ 1 - 1
bin/app/src/app/schema/wallet/tx_status.rs

@@ -37,7 +37,7 @@ use crate::{
 
 use super::{super::ColorScheme, data::*, util::*};
 
-pub async fn make_tx_status_layer(
+pub async fn make(
     app: &App,
     wallet_layer: SceneNodePtr,
     i18n_fish: &I18nBabelFish,