Skip to content

Commit

Permalink
fix: Correctly set parent flow name in GovPayMetadata (#3826)
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr authored Oct 18, 2024
1 parent cb140bb commit 33ff4d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions editor.planx.uk/src/@planx/components/Pay/Public/Pay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ function Component(props: Props) {
state.flowSlug,
]);
const fee = props.fn ? Number(passport.data?.[props.fn]) : 0;

const defaultMetadata = [
{ key: "source", value: "PlanX" },
{ key: "flow", value: flowSlug },
{ key: "paidViaInviteToPay", value: "@paidViaInviteToPay" },
];
const metadata = props.govPayMetadata?.length
? props.govPayMetadata
: defaultMetadata;

const metadata = [...(props.govPayMetadata || []), ...defaultMetadata];

// Handles UI states
const reducer = (_state: ComponentState, action: Action): ComponentState => {
Expand Down

0 comments on commit 33ff4d7

Please sign in to comment.