diff --git a/src/components/BankDetails/RecipientDetails/RecipientDetailsForm/RecipientDetailsForm.tsx b/src/components/BankDetails/RecipientDetails/RecipientDetailsForm/RecipientDetailsForm.tsx
index 7947c66c82..6e223cb3cb 100644
--- a/src/components/BankDetails/RecipientDetails/RecipientDetailsForm/RecipientDetailsForm.tsx
+++ b/src/components/BankDetails/RecipientDetails/RecipientDetailsForm/RecipientDetailsForm.tsx
@@ -13,6 +13,7 @@ import { Label } from "components/form";
import { isEmpty } from "helpers";
import { GENERIC_ERROR_MESSAGE } from "constants/common";
import createSchema from "./createSchema";
+import { redot, undot } from "./dot";
type Props = {
fields: Group[];
@@ -50,8 +51,6 @@ export default function RecipientDetailsForm({
async function refresh() {
const { accountHolderName, bankStatement, ...details } = getValues();
- console.log(getValues());
-
await updateRequirements({
quoteId,
amount,
@@ -62,7 +61,10 @@ export default function RecipientDetailsForm({
ownedByCustomer: false,
profile: "{{profileId}}",
type,
- details,
+ details: Object.keys(details).reduce(
+ (prev, curr) => ({ ...prev, [redot(curr)]: details[curr] }),
+ {}
+ ),
},
});
}
@@ -122,20 +124,21 @@ export default function RecipientDetailsForm({
>
{fields.map((f) => {
const labelRequired = f.required ? true : undefined;
+ const fName = undot(f.key);
if (f.type === "select") {
return (
-
-