mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 12:06:56 +08:00
refactor(ext_traits): simplify the signatures of some methods in Encode extension trait (#3687)
This commit is contained in:
@ -299,7 +299,8 @@ impl ParentPaymentMethodToken {
|
||||
token: PaymentTokenData,
|
||||
state: &AppState,
|
||||
) -> CustomResult<(), errors::ApiErrorResponse> {
|
||||
let token_json_str = Encode::<PaymentTokenData>::encode_to_string_of_json(&token)
|
||||
let token_json_str = token
|
||||
.encode_to_string_of_json()
|
||||
.change_context(errors::ApiErrorResponse::InternalServerError)
|
||||
.attach_printable("failed to serialize hyperswitch token to json")?;
|
||||
let redis_conn = state
|
||||
|
||||
Reference in New Issue
Block a user