Skip to content

Commit

Permalink
fix: policy details in exchange policy details (#859)
Browse files Browse the repository at this point in the history
  • Loading branch information
albertfolch-redeemeum authored Sep 28, 2023
1 parent 4686df4 commit c7f70c8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/components/modal/components/ExchangePolicyDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { offers, subgraph } from "@bosonprotocol/react-kit";
import { customisedExchangePolicy } from "lib/constants/policies";
import { getExchangePolicyName } from "lib/utils/policy/getExchangePolicyName";
import {
CaretDown,
Expand Down Expand Up @@ -33,10 +34,12 @@ export default function ExchangePolicyDetails({
(error) => error.path === "metadata.exchangePolicy.template"
));
const exchangePolicy = {
name: getExchangePolicyName(
(offerData?.metadata as subgraph.ProductV1MetadataEntity)?.exchangePolicy
?.label
),
name: exchangePolicyCheckResult?.isValid
? getExchangePolicyName(
(offerData?.metadata as subgraph.ProductV1MetadataEntity)
?.exchangePolicy?.label
)
: customisedExchangePolicy,
version: (offerData?.metadata as subgraph.ProductV1MetadataEntity)
?.exchangePolicy?.version
? "v" +
Expand Down

0 comments on commit c7f70c8

Please sign in to comment.