@@ -219,7 +219,7 @@ fn _build_get_payment_sources_request(command_handle: CommandHandle, wallet_hand
219
219
/// # Returns
220
220
/// * `get_utxo_txn_json` - Indy request for getting UTXO list for payment address
221
221
/// * `payment_method`
222
- pub fn build_get_payment_sources_with_from_request ( wallet_handle : WalletHandle , submitter_did : Option < & str > , payment_address : & str , from : Option < u64 > ) -> Box < Future < Item =( String , String ) , Error =IndyError > > {
222
+ pub fn build_get_payment_sources_with_from_request ( wallet_handle : WalletHandle , submitter_did : Option < & str > , payment_address : & str , from : Option < i64 > ) -> Box < Future < Item =( String , String ) , Error =IndyError > > {
223
223
let ( receiver, command_handle, cb) =
224
224
ClosureHandler :: cb_ec_string_string ( ) ;
225
225
@@ -228,11 +228,11 @@ pub fn build_get_payment_sources_with_from_request(wallet_handle: WalletHandle,
228
228
ResultHandler :: str_str ( command_handle, err, receiver)
229
229
}
230
230
231
- fn _build_get_payment_sources_with_from_request ( command_handle : CommandHandle , wallet_handle : WalletHandle , submitter_did : Option < & str > , payment_address : & str , from : Option < u64 > , cb : Option < ResponseStringStringCB > ) -> ErrorCode {
231
+ fn _build_get_payment_sources_with_from_request ( command_handle : CommandHandle , wallet_handle : WalletHandle , submitter_did : Option < & str > , payment_address : & str , from : Option < i64 > , cb : Option < ResponseStringStringCB > ) -> ErrorCode {
232
232
let submitter_did_str = opt_c_str ! ( submitter_did) ;
233
233
let payment_address = c_str ! ( payment_address) ;
234
234
235
- ErrorCode :: from ( unsafe { payments:: indy_build_get_payment_sources_with_from_request ( command_handle, wallet_handle, opt_c_ptr ! ( submitter_did, submitter_did_str) , payment_address. as_ptr ( ) , from. map ( |a| a as i64 ) . unwrap_or ( -1 ) , cb) } )
235
+ ErrorCode :: from ( unsafe { payments:: indy_build_get_payment_sources_with_from_request ( command_handle, wallet_handle, opt_c_ptr ! ( submitter_did, submitter_did_str) , payment_address. as_ptr ( ) , from. unwrap_or ( -1 ) , cb) } )
236
236
}
237
237
238
238
/// Parses response for Indy request for getting UTXO list.
@@ -283,12 +283,12 @@ fn _parse_get_payment_sources_response(command_handle: CommandHandle, payment_me
283
283
/// extra: <str>, // optional data from payment transaction
284
284
/// }]
285
285
/// next -- pointer to the next slice of payment sources
286
- pub fn parse_get_payment_sources_with_from_response ( payment_method : & str , resp_json : & str ) -> Box < Future < Item =( String , Option < u64 > ) , Error =IndyError > > {
286
+ pub fn parse_get_payment_sources_with_from_response ( payment_method : & str , resp_json : & str ) -> Box < Future < Item =( String , Option < i64 > ) , Error =IndyError > > {
287
287
let ( receiver, command_handle, cb) = ClosureHandler :: cb_ec_string_i64 ( ) ;
288
288
289
289
let err = _parse_get_payment_sources_with_from_response ( command_handle, payment_method, resp_json, cb) ;
290
290
291
- Box :: new ( ResultHandler :: str_i64 ( command_handle, err, receiver) . map ( |( s, i) | ( s, if i >= 0 { Some ( i as u64 ) } else { None } ) ) . into_future ( ) )
291
+ Box :: new ( ResultHandler :: str_i64 ( command_handle, err, receiver) . map ( |( s, i) | ( s, if i >= 0 { Some ( i) } else { None } ) ) . into_future ( ) )
292
292
}
293
293
294
294
fn _parse_get_payment_sources_with_from_response ( command_handle : CommandHandle , payment_method : & str , resp_json : & str , cb : Option < ResponseStringI64CB > ) -> ErrorCode {
0 commit comments