13
13
// limitations under the License.
14
14
15
15
//! Stubs for testing.
16
+ //!
17
+ //! NOTE: This is on the way out - we use the Workflows trait and TestingWorkflow to unit test
18
+ //! workflows now.
16
19
17
20
pub use super :: types:: {
18
21
AcceptRejectCb , ConfirmParams , ContinueCancelCb , Font , MenuParams , SelectWordCb , TrinaryChoice ,
@@ -48,61 +51,41 @@ impl Drop for Component<'_> {
48
51
}
49
52
50
53
pub fn trinary_input_string_create < ' a , F > (
51
- params : & TrinaryInputStringParams ,
52
- mut confirm_callback : F ,
54
+ _params : & TrinaryInputStringParams ,
55
+ _confirm_callback : F ,
53
56
_cancel_callback : Option < ContinueCancelCb < ' a > > ,
54
57
) -> Component < ' a >
55
58
where
56
59
F : FnMut ( zeroize:: Zeroizing < String > ) + ' a ,
57
60
{
58
- let data = crate :: testing:: DATA . 0 . borrow ( ) ;
59
- let input_string = data. ui_trinary_input_string_create . as_ref ( ) . unwrap ( ) ( params) ;
60
- confirm_callback ( zeroize:: Zeroizing :: new ( input_string) ) ;
61
- Component {
62
- is_pushed : false ,
63
- _p : PhantomData ,
64
- }
61
+ panic ! ( "not used" ) ;
65
62
}
66
63
67
- pub fn confirm_create < ' a , F > ( params : & ConfirmParams , mut result_callback : F ) -> Component < ' a >
64
+ pub fn confirm_create < ' a , F > ( _params : & ConfirmParams , _result_callback : F ) -> Component < ' a >
68
65
where
69
66
F : FnMut ( bool ) + ' a ,
70
67
{
71
- let data = crate :: testing:: DATA . 0 . borrow ( ) ;
72
- let result = data. ui_confirm_create . as_ref ( ) . unwrap ( ) ( params) ;
73
- result_callback ( result) ;
74
- Component {
75
- is_pushed : false ,
76
- _p : PhantomData ,
77
- }
68
+ panic ! ( "not used" ) ;
78
69
}
79
70
80
71
pub fn screen_process ( ) { }
81
72
82
- pub fn status_create < ' a , F > ( _text : & str , _status_success : bool , mut callback : F ) -> Component < ' a >
73
+ pub fn status_create < ' a , F > ( _text : & str , _status_success : bool , _callback : F ) -> Component < ' a >
83
74
where
84
75
F : FnMut ( ) + ' a ,
85
76
{
86
- callback ( ) ;
87
- Component {
88
- is_pushed : false ,
89
- _p : PhantomData ,
90
- }
77
+ panic ! ( "not used" ) ;
91
78
}
92
79
93
- pub fn sdcard_create < ' a , F > ( mut callback : F ) -> Component < ' a >
80
+ pub fn sdcard_create < ' a , F > ( _callback : F ) -> Component < ' a >
94
81
where
95
82
F : FnMut ( bool ) + ' a ,
96
83
{
97
- callback ( true ) ;
98
- Component {
99
- is_pushed : false ,
100
- _p : PhantomData ,
101
- }
84
+ panic ! ( "not used" ) ;
102
85
}
103
86
104
87
pub fn menu_create ( _params : MenuParams < ' _ > ) -> Component < ' _ > {
105
- panic ! ( "not implemented " ) ;
88
+ panic ! ( "not used " ) ;
106
89
}
107
90
108
91
pub fn trinary_choice_create < ' a > (
@@ -112,40 +95,28 @@ pub fn trinary_choice_create<'a>(
112
95
_label_right : & ' a str ,
113
96
_chosen_callback : TrinaryChoiceCb ,
114
97
) -> Component < ' a > {
115
- panic ! ( "not implemented " )
98
+ panic ! ( "not used " )
116
99
}
117
100
118
101
pub fn confirm_transaction_address_create < ' a , ' b > (
119
- amount : & ' a str ,
120
- address : & ' a str ,
121
- mut callback : AcceptRejectCb < ' b > ,
102
+ _amount : & ' a str ,
103
+ _address : & ' a str ,
104
+ _callback : AcceptRejectCb < ' b > ,
122
105
) -> Component < ' b > {
123
- let data = crate :: testing:: DATA . 0 . borrow ( ) ;
124
- let result = data. ui_transaction_address_create . as_ref ( ) . unwrap ( ) ( amount, address) ;
125
- callback ( result) ;
126
- Component {
127
- is_pushed : false ,
128
- _p : PhantomData ,
129
- }
106
+ panic ! ( "not used" ) ;
130
107
}
131
108
132
109
pub fn confirm_transaction_fee_create < ' a , ' b > (
133
- amount : & ' a str ,
134
- fee : & ' a str ,
135
- longtouch : bool ,
136
- mut callback : AcceptRejectCb < ' b > ,
110
+ _amount : & ' a str ,
111
+ _fee : & ' a str ,
112
+ _longtouch : bool ,
113
+ _callback : AcceptRejectCb < ' b > ,
137
114
) -> Component < ' b > {
138
- let data = crate :: testing:: DATA . 0 . borrow ( ) ;
139
- let result = data. ui_transaction_fee_create . as_ref ( ) . unwrap ( ) ( amount, fee, longtouch) ;
140
- callback ( result) ;
141
- Component {
142
- is_pushed : false ,
143
- _p : PhantomData ,
144
- }
115
+ panic ! ( "not used" ) ;
145
116
}
146
117
147
118
pub fn trinary_input_string_set_input ( _component : & mut Component , _word : & str ) {
148
- panic ! ( "not implemented " )
119
+ panic ! ( "not used " )
149
120
}
150
121
151
122
pub fn with_lock_animation < F : Fn ( ) -> R , R > ( f : F ) -> R {
0 commit comments