File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 1
1
//! LightClient function do_propose generates a proposal to send to specified addresses.
2
2
3
3
use crate :: {
4
+ data:: proposal:: ZingoProposal ,
4
5
lightclient:: LightClient ,
5
6
wallet:: tx_map_and_maybe_trees:: { TxMapAndMaybeTrees , TxMapAndMaybeTreesTraitError } ,
6
7
} ;
@@ -169,10 +170,8 @@ impl LightClient {
169
170
)
170
171
. map_err ( DoProposeError :: Proposal ) ?;
171
172
172
- self . update_latest_proposal ( crate :: data:: proposal:: ZingoProposal :: Transfer (
173
- proposal. clone ( ) ,
174
- ) )
175
- . await ;
173
+ self . update_latest_proposal ( ZingoProposal :: Transfer ( proposal. clone ( ) ) )
174
+ . await ;
176
175
Ok ( proposal)
177
176
}
178
177
@@ -245,14 +244,12 @@ impl LightClient {
245
244
)
246
245
. map_err ( DoProposeError :: ShieldProposal ) ?;
247
246
248
- self . update_latest_proposal ( crate :: data:: proposal:: ZingoProposal :: Shield (
249
- proposed_shield. clone ( ) ,
250
- ) )
251
- . await ;
247
+ self . update_latest_proposal ( ZingoProposal :: Shield ( proposed_shield. clone ( ) ) )
248
+ . await ;
252
249
Ok ( proposed_shield)
253
250
}
254
251
/// A helper method that standardizes latest_proposal update
255
- async fn update_latest_proposal ( & self , proposal : crate :: data :: proposal :: ZingoProposal ) {
252
+ async fn update_latest_proposal ( & self , proposal : ZingoProposal ) {
256
253
* ( self . latest_proposal . write ( ) . await ) = Some ( proposal. clone ( ) ) ;
257
254
}
258
255
}
You can’t perform that action at this time.
0 commit comments