This commit is contained in:
Gala
2022-08-17 11:10:10 +02:00
parent a94a9aeaf5
commit cbe0115f01
3 changed files with 12 additions and 12 deletions
@@ -19,13 +19,13 @@ export const NodeSettings = ({
onClose,
onError,
}: {
currentPm: TBondedMixnode['profitMargin'];
isVesting: boolean;
currentPm?: TBondedMixnode['profitMargin'];
isVesting?: boolean;
onConfirm: (profitMargin: number, fee?: FeeDetails) => Promise<void>;
onClose: () => void;
onError: (err: string) => void;
}) => {
const [pm, setPm] = useState(currentPm.toString());
const [pm, setPm] = useState(currentPm?.toString());
const [error, setError] = useState(false);
const { fee, getFee, resetFeeState, isFeeLoading, feeError } = useGetFee();
+9 -9
View File
@@ -213,15 +213,15 @@ const Bonding = () => {
/>
)}
{showModal === 'node-settings' && bondedNode && isMixnode(bondedNode) && (
<NodeSettings
currentPm={bondedNode.profitMargin}
isVesting={Boolean(bondedNode.proxy)}
onConfirm={handleUpdateProfitMargin}
onClose={() => setShowModal(undefined)}
onError={handleError}
/>
)}
{/* {showModal === 'node-settings' && bondedNode && isMixnode(bondedNode) && ( */}
<NodeSettings
// currentPm={bondedNode.profitMargin}
// isVesting={Boolean(bondedNode.proxy)}
onConfirm={handleUpdateProfitMargin}
onClose={() => setShowModal(undefined)}
onError={handleError}
/>
{/* )} */}
{confirmationDetails && confirmationDetails.status === 'success' && (
<ConfirmationDetailsModal