@multiversx/sdk-dapp-liquidity 1.1.0-alpha.24 → 1.1.0-alpha.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "homepage": "https://github.com/multiversx/mx-sdk-dapp-liquidity#readme",
30
30
  "license": "MIT",
31
- "version": "1.1.0-alpha.24",
31
+ "version": "1.1.0-alpha.25",
32
32
  "main": "index.js",
33
33
  "module": "index.mjs",
34
34
  "types": "index.d.ts",
@@ -180,9 +180,9 @@ const BridgeForm = ({
180
180
  } = reactjs_queries_useGetRate_mutation.useGetRateMutation();
181
181
  const rateValidationError = ((_a = rateError == null ? void 0 : rateError.response) == null ? void 0 : _a.status) === 400 ? (_b = rateError == null ? void 0 : rateError.response) == null ? void 0 : _b.data.message : void 0;
182
182
  const [firstToken, setFirstToken] = React.useState();
183
- const [firstAmount, setFirstAmount] = React.useState("");
183
+ const [firstAmount, setFirstAmount] = React.useState(firstTokenAmount ?? "");
184
184
  const [secondToken, setSecondToken] = React.useState();
185
- const [secondAmount, setSecondAmount] = React.useState("");
185
+ const [secondAmount, setSecondAmount] = React.useState(secondTokenAmount ?? "");
186
186
  const bridgeAddress = account.address;
187
187
  const isAuthenticated = account.isConnected && Boolean(bridgeAddress);
188
188
  const fromOptions = React.useMemo(
@@ -619,11 +619,19 @@ const BridgeForm = ({
619
619
  }, [mvxTokensWithBalances, secondToken == null ? void 0 : secondToken.address]);
620
620
  React.useEffect(() => {
621
621
  if (firstTokenAmount) {
622
+ formik.setFieldValue(
623
+ reactjs_hooks_useBridgeFormik.BridgeFormikValuesEnum.firstAmount,
624
+ firstTokenAmount
625
+ );
622
626
  handleOnChangeFirstAmount(firstTokenAmount);
623
627
  }
624
- }, [firstTokenAmount]);
628
+ }, []);
625
629
  React.useEffect(() => {
626
630
  if (secondTokenAmount) {
631
+ formik.setFieldValue(
632
+ reactjs_hooks_useBridgeFormik.BridgeFormikValuesEnum.secondAmount,
633
+ secondTokenAmount
634
+ );
627
635
  handleOnChangeSecondAmount(secondTokenAmount);
628
636
  }
629
637
  }, [secondTokenAmount]);
@@ -177,9 +177,9 @@ const BridgeForm = ({
177
177
  } = useGetRateMutation();
178
178
  const rateValidationError = ((_a = rateError == null ? void 0 : rateError.response) == null ? void 0 : _a.status) === 400 ? (_b = rateError == null ? void 0 : rateError.response) == null ? void 0 : _b.data.message : void 0;
179
179
  const [firstToken, setFirstToken] = useState();
180
- const [firstAmount, setFirstAmount] = useState("");
180
+ const [firstAmount, setFirstAmount] = useState(firstTokenAmount ?? "");
181
181
  const [secondToken, setSecondToken] = useState();
182
- const [secondAmount, setSecondAmount] = useState("");
182
+ const [secondAmount, setSecondAmount] = useState(secondTokenAmount ?? "");
183
183
  const bridgeAddress = account.address;
184
184
  const isAuthenticated = account.isConnected && Boolean(bridgeAddress);
185
185
  const fromOptions = useMemo(
@@ -616,11 +616,19 @@ const BridgeForm = ({
616
616
  }, [mvxTokensWithBalances, secondToken == null ? void 0 : secondToken.address]);
617
617
  useEffect(() => {
618
618
  if (firstTokenAmount) {
619
+ formik.setFieldValue(
620
+ BridgeFormikValuesEnum.firstAmount,
621
+ firstTokenAmount
622
+ );
619
623
  handleOnChangeFirstAmount(firstTokenAmount);
620
624
  }
621
- }, [firstTokenAmount]);
625
+ }, []);
622
626
  useEffect(() => {
623
627
  if (secondTokenAmount) {
628
+ formik.setFieldValue(
629
+ BridgeFormikValuesEnum.secondAmount,
630
+ secondTokenAmount
631
+ );
624
632
  handleOnChangeSecondAmount(secondTokenAmount);
625
633
  }
626
634
  }, [secondTokenAmount]);