@@ -48,19 +48,19 @@ pub enum PaymentsCommand {
4848 ParseResponseWithFeesAck (
4949 i32 , //handle
5050 Result < String , PaymentsError > ) ,
51- BuildGetUtxoRequest (
51+ BuildGetSourcesRequest (
5252 i32 , //wallet_handle
5353 String , //submitter did
5454 String , //payment address
5555 Box < Fn ( Result < ( String , String ) , IndyError > ) + Send > ) ,
56- BuildGetUtxoRequestAck (
56+ BuildGetSourcesRequestAck (
5757 i32 , //handle
5858 Result < String , PaymentsError > ) ,
59- ParseGetUtxoResponse (
59+ ParseGetSourcesResponse (
6060 String , //type
6161 String , //response
6262 Box < Fn ( Result < String , IndyError > ) + Send > ) ,
63- ParseGetUtxoResponseAck (
63+ ParseGetSourcesResponseAck (
6464 i32 , //cmd_handle
6565 Result < String , PaymentsError > ) ,
6666 BuildPaymentReq (
@@ -164,21 +164,21 @@ impl PaymentsCommandExecutor {
164164 info ! ( target: "payments_command_executor" , "ParseResponseWithFeesAck command received" ) ;
165165 self . parse_response_with_fees_ack ( cmd_handle, result) ;
166166 }
167- PaymentsCommand :: BuildGetUtxoRequest ( wallet_handle, submitter_did, payment_address, cb) => {
168- info ! ( target: "payments_command_executor" , "BuildGetUtxoRequest command received" ) ;
169- self . build_get_utxo_request ( wallet_handle, & submitter_did, & payment_address, cb) ;
167+ PaymentsCommand :: BuildGetSourcesRequest ( wallet_handle, submitter_did, payment_address, cb) => {
168+ info ! ( target: "payments_command_executor" , "BuildGetSourcesRequest command received" ) ;
169+ self . build_get_sources_request ( wallet_handle, & submitter_did, & payment_address, cb) ;
170170 }
171- PaymentsCommand :: BuildGetUtxoRequestAck ( cmd_handle, result) => {
172- info ! ( target: "payments_command_executor" , "BuildGetUtxoRequestAck command received" ) ;
173- self . build_get_utxo_request_ack ( cmd_handle, result) ;
171+ PaymentsCommand :: BuildGetSourcesRequestAck ( cmd_handle, result) => {
172+ info ! ( target: "payments_command_executor" , "BuildGetSourcesRequestAck command received" ) ;
173+ self . build_get_sources_request_ack ( cmd_handle, result) ;
174174 }
175- PaymentsCommand :: ParseGetUtxoResponse ( type_, response, cb) => {
176- info ! ( target: "payments_command_executor" , "ParseGetUtxoResponse command received" ) ;
177- self . parse_get_utxo_response ( & type_, & response, cb) ;
175+ PaymentsCommand :: ParseGetSourcesResponse ( type_, response, cb) => {
176+ info ! ( target: "payments_command_executor" , "ParseGetSourcesResponse command received" ) ;
177+ self . parse_get_sources_response ( & type_, & response, cb) ;
178178 }
179- PaymentsCommand :: ParseGetUtxoResponseAck ( cmd_handle, result) => {
180- info ! ( target: "payments_command_executor" , "ParseGetUtxoResponseAck command received" ) ;
181- self . parse_get_utxo_response_ack ( cmd_handle, result) ;
179+ PaymentsCommand :: ParseGetSourcesResponseAck ( cmd_handle, result) => {
180+ info ! ( target: "payments_command_executor" , "ParseGetSourcesResponseAck command received" ) ;
181+ self . parse_get_sources_response_ack ( cmd_handle, result) ;
182182 }
183183 PaymentsCommand :: BuildPaymentReq ( wallet_handle, submitter_did, inputs, outputs, cb) => {
184184 info ! ( target: "payments_command_executor" , "BuildPaymentReq command received" ) ;
@@ -351,8 +351,8 @@ impl PaymentsCommandExecutor {
351351 trace ! ( "parse_response_with_fees_ack <<<" ) ;
352352 }
353353
354- fn build_get_utxo_request ( & self , wallet_handle : i32 , submitter_did : & str , payment_address : & str , cb : Box < Fn ( Result < ( String , String ) , IndyError > ) + Send > ) {
355- trace ! ( "build_get_utxo_request >>> wallet_handle: {:?}, submitter_did: {:?}, payment_address: {:?}" , wallet_handle, submitter_did, payment_address) ;
354+ fn build_get_sources_request ( & self , wallet_handle : i32 , submitter_did : & str , payment_address : & str , cb : Box < Fn ( Result < ( String , String ) , IndyError > ) + Send > ) {
355+ trace ! ( "build_get_sources_request >>> wallet_handle: {:?}, submitter_did: {:?}, payment_address: {:?}" , wallet_handle, submitter_did, payment_address) ;
356356 match self . crypto_service . validate_did ( submitter_did) . map_err ( map_err_err ! ( ) ) {
357357 Err ( err) => return cb ( Err ( IndyError :: from ( err) ) ) ,
358358 _ => ( )
@@ -372,28 +372,28 @@ impl PaymentsCommandExecutor {
372372 let method_copy = method. to_string ( ) ;
373373
374374 self . _process_method (
375- Box :: new ( move |get_utxo_txn_json | cb ( get_utxo_txn_json . map ( |s| ( s, method. to_string ( ) ) ) ) ) ,
376- & |i| self . payments_service . build_get_utxo_request ( i, & method_copy, wallet_handle, & submitter_did, payment_address)
375+ Box :: new ( move |get_sources_txn_json | cb ( get_sources_txn_json . map ( |s| ( s, method. to_string ( ) ) ) ) ) ,
376+ & |i| self . payments_service . build_get_sources_request ( i, & method_copy, wallet_handle, & submitter_did, payment_address)
377377 ) ;
378- trace ! ( "build_get_utxo_request <<<" ) ;
378+ trace ! ( "build_get_sources_request <<<" ) ;
379379 }
380380
381- fn build_get_utxo_request_ack ( & self , cmd_handle : i32 , result : Result < String , PaymentsError > ) {
382- trace ! ( "build_get_utxo_request_ack >>> result: {:?}" , result) ;
383- self . _common_ack_payments ( cmd_handle, result, "BuildGetUtxoRequestAck " ) ;
384- trace ! ( "build_get_utxo_request_ack <<<" ) ;
381+ fn build_get_sources_request_ack ( & self , cmd_handle : i32 , result : Result < String , PaymentsError > ) {
382+ trace ! ( "build_get_sources_request_ack >>> result: {:?}" , result) ;
383+ self . _common_ack_payments ( cmd_handle, result, "BuildGetSourcesRequestAck " ) ;
384+ trace ! ( "build_get_sources_request_ack <<<" ) ;
385385 }
386386
387- fn parse_get_utxo_response ( & self , type_ : & str , response : & str , cb : Box < Fn ( Result < String , IndyError > ) + Send > ) {
388- trace ! ( "parse_get_utxo_response >>> response: {:?}" , response) ;
389- self . _process_method ( cb, & |i| self . payments_service . parse_get_utxo_response ( i, type_, response) ) ;
390- trace ! ( "parse_get_utxo_response <<<" ) ;
387+ fn parse_get_sources_response ( & self , type_ : & str , response : & str , cb : Box < Fn ( Result < String , IndyError > ) + Send > ) {
388+ trace ! ( "parse_get_sources_response >>> response: {:?}" , response) ;
389+ self . _process_method ( cb, & |i| self . payments_service . parse_get_sources_response ( i, type_, response) ) ;
390+ trace ! ( "parse_get_sources_response <<<" ) ;
391391 }
392392
393- fn parse_get_utxo_response_ack ( & self , cmd_handle : i32 , result : Result < String , PaymentsError > ) {
394- trace ! ( "parse_get_utxo_response_ack >>> result: {:?}" , result) ;
395- self . _common_ack_payments ( cmd_handle, result, "ParseGetUtxoResponseAck " ) ;
396- trace ! ( "parse_get_utxo_response_ack <<<" ) ;
393+ fn parse_get_sources_response_ack ( & self , cmd_handle : i32 , result : Result < String , PaymentsError > ) {
394+ trace ! ( "parse_get_sources_response_ack >>> result: {:?}" , result) ;
395+ self . _common_ack_payments ( cmd_handle, result, "ParseGetSourcesResponseAck " ) ;
396+ trace ! ( "parse_get_sources_response_ack <<<" ) ;
397397 }
398398
399399 fn build_payment_req ( & self , wallet_handle : i32 , submitter_did : & str , inputs : & str , outputs : & str , cb : Box < Fn ( Result < ( String , String ) , IndyError > ) + Send > ) {
0 commit comments