diff --git a/src/pages/Funds/CreateFund/CreateFund.tsx b/src/pages/Funds/CreateFund/CreateFund.tsx
index 7aefbd2471..81ebc0cd90 100644
--- a/src/pages/Funds/CreateFund/CreateFund.tsx
+++ b/src/pages/Funds/CreateFund/CreateFund.tsx
@@ -1,7 +1,6 @@
import { yupResolver } from "@hookform/resolvers/yup";
import { ControlledImgEditor as ImgEditor } from "components/ImgEditor";
import Prompt from "components/Prompt";
-import { LockedSplitSlider } from "components/donation";
import {
NativeCheckField as CheckField,
NativeField as Field,
@@ -49,17 +48,12 @@ export default withAuth(function CreateFund() {
settings: {
from: "fund",
allowBgTip: true,
- liquidSplit: 50,
},
targetType: "smart",
},
});
const { field: banner } = useController({ control, name: "banner" });
const { field: logo } = useController({ control, name: "logo" });
- const { field: liquidSplitPct } = useController({
- control,
- name: "settings.liquidSplit",
- });
const { field: members } = useController({
control,
name: "members",
@@ -69,9 +63,6 @@ export default withAuth(function CreateFund() {
name: "targetType",
});
- //keep track of what user previously set
- //revert to it when endow is no longer 1
- const customSplitRef = useRef(50);
const customAllowBgTipRef = useRef(true);
const endowReqRef = useRef();
@@ -105,7 +96,6 @@ export default withAuth(function CreateFund() {
members: fv.members.map((m) => m.id),
featured: fv.featured,
settings: {
- liquidSplitPct: fv.settings.liquidSplit,
allowBgTip: fv.settings.allowBgTip,
},
target:
@@ -182,7 +172,6 @@ export default withAuth(function CreateFund() {
endowReqRef.current = undefined;
return setValue("settings", {
from: "fund",
- liquidSplit: customSplitRef.current,
allowBgTip: customAllowBgTipRef.current,
});
}
@@ -193,7 +182,7 @@ export default withAuth(function CreateFund() {
const endowReq = getEndow(
{
id: opt.id,
- fields: ["hide_bg_tip", "splitLiqPct", "name"],
+ fields: ["hide_bg_tip", "name"],
},
true
);
@@ -208,7 +197,6 @@ export default withAuth(function CreateFund() {
setValue("settings", {
from: endow.name,
allowBgTip: !endow.hide_bg_tip,
- liquidSplit: endow.splitLiqPct ?? 50,
});
} catch (err) {
logger.error(err);
@@ -299,19 +287,6 @@ export default withAuth(function CreateFund() {
`${withPossesive(settings.from)} config has been applied`}
-
- {
- const liq = 100 - lockedPct;
- liquidSplitPct.onChange(liq);
- customSplitRef.current = liq;
- }}
- />
-
;
+export type Endow = Pick;
export function useEndow(
members: FundMember[],
@@ -24,15 +24,14 @@ export function useEndow(
getEndow(
{
id: numId,
- fields: ["hide_bg_tip", "splitLiqPct", "name"],
+ fields: ["hide_bg_tip", "name"],
},
true
)
.unwrap()
- .then(({ hide_bg_tip, splitLiqPct, name }) => {
+ .then(({ hide_bg_tip, name }) => {
onEndowSet({
hide_bg_tip,
- splitLiqPct,
name,
});
});
diff --git a/src/types/aws/ap/index.ts b/src/types/aws/ap/index.ts
index 1bfda642f4..63ee1ea702 100644
--- a/src/types/aws/ap/index.ts
+++ b/src/types/aws/ap/index.ts
@@ -247,8 +247,6 @@ export interface Fund {
featured: boolean;
active: boolean;
settings: {
- /** 1 - 100 */
- liquidSplitPct: number;
allowBgTip: boolean;
};
/** iso */