mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 11:24:45 +08:00
refactor(router): better mapping funtion handling for metadata (#326)
This commit is contained in:
@ -566,7 +566,8 @@ impl TryFrom<PaymentsRequest> for PaymentsResponse {
|
||||
};
|
||||
let metadata = item
|
||||
.metadata
|
||||
.map(|a| Encode::<Metadata>::encode_to_value(&a))
|
||||
.as_ref()
|
||||
.map(Encode::<Metadata>::encode_to_value)
|
||||
.transpose()?;
|
||||
Ok(Self {
|
||||
payment_id,
|
||||
|
||||
Reference in New Issue
Block a user