Commit 00e7148 1 parent 583de6a commit 00e7148 Copy full SHA for 00e7148
File tree 3 files changed +5
-8
lines changed
3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -480,7 +480,7 @@ impl ZCoin {
480
480
// and saving them to the wallet database for future spends
481
481
store_change_output ( self . consensus_params_ref ( ) , & self . z_fields . light_wallet_db , & tx)
482
482
. await
483
- . mm_err ( GenTxError :: SaveChangeNotesError ) ?;
483
+ . map_to_mm ( GenTxError :: SaveChangeNotesError ) ?;
484
484
485
485
let additional_data = AdditionalTxData {
486
486
received_by_me,
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ pub use blockdb::*;
5
5
6
6
pub mod walletdb;
7
7
#[ cfg( target_arch = "wasm32" ) ] mod z_params;
8
- use mm2_err_handle:: prelude:: MapToMmResult ;
9
8
#[ cfg( target_arch = "wasm32" ) ]
10
9
pub ( crate ) use z_params:: ZcashParamsWasmImpl ;
11
10
@@ -202,11 +201,9 @@ pub(crate) async fn store_change_output(
202
201
params : & ZcoinConsensusParams ,
203
202
shared_db : & WalletDbShared ,
204
203
tx : & Transaction ,
205
- ) -> MmResult < ( ) , String > {
206
- let mut data = shared_db. db . get_update_ops ( ) . map_to_mm ( |err| err. to_string ( ) ) ?;
207
- decrypt_and_store_transaction ( params, & mut data, tx)
208
- . await
209
- . map_to_mm ( |err| err. to_string ( ) ) ?;
204
+ ) -> Result < ( ) , String > {
205
+ let mut data = try_s ! ( shared_db. db. get_update_ops( ) ) ;
206
+ try_s ! ( decrypt_and_store_transaction( params, & mut data, tx) . await ) ;
210
207
211
208
Ok ( ( ) )
212
209
}
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ pub async fn z_p2sh_spend(
195
195
// and saving them to the wallet database for future spends
196
196
store_change_output ( coin. consensus_params_ref ( ) , & coin. z_fields . light_wallet_db , & zcash_tx)
197
197
. await
198
- . mm_err ( |err| ZP2SHSpendError :: GenTxError ( GenTxError :: SaveChangeNotesError ( err) ) ) ?;
198
+ . map_to_mm ( |err| ZP2SHSpendError :: GenTxError ( GenTxError :: SaveChangeNotesError ( err) ) ) ?;
199
199
200
200
coin. utxo_rpc_client ( )
201
201
. send_raw_transaction ( tx_buffer. into ( ) )
You can’t perform that action at this time.
0 commit comments