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

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.23",
31
+ "version": "1.1.0-alpha.24",
32
32
  "main": "index.js",
33
33
  "module": "index.mjs",
34
34
  "types": "index.d.ts",
@@ -6,6 +6,8 @@ interface BridgeFormProps {
6
6
  callbackRoute?: string;
7
7
  firstTokenIdentifier?: string;
8
8
  secondTokenIdentifier?: string;
9
+ firstTokenAmount?: string;
10
+ secondTokenAmount?: string;
9
11
  refetchTrigger?: number;
10
12
  showHistory?: boolean;
11
13
  forcedDestinationTokenSymbol?: string;
@@ -16,5 +18,5 @@ interface BridgeFormProps {
16
18
  onMvxDisconnect?: () => void;
17
19
  onNavigate?: (url: string, options?: object) => void;
18
20
  }
19
- export declare const BridgeForm: ({ mvxChainId, mvxAddress, username, nativeAuthToken, callbackRoute, firstTokenIdentifier, secondTokenIdentifier, refetchTrigger, showHistory, forcedDestinationTokenSymbol, onSuccessfullySentTransaction, onFailedSentTransaction, onHistoryClose, onMvxConnect, onMvxDisconnect, onNavigate }: BridgeFormProps) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const BridgeForm: ({ mvxChainId, mvxAddress, username, nativeAuthToken, callbackRoute, firstTokenIdentifier, secondTokenIdentifier, firstTokenAmount, secondTokenAmount, refetchTrigger, showHistory, forcedDestinationTokenSymbol, onSuccessfullySentTransaction, onFailedSentTransaction, onHistoryClose, onMvxConnect, onMvxDisconnect, onNavigate }: BridgeFormProps) => import("react/jsx-runtime").JSX.Element;
20
22
  export {};
@@ -125,6 +125,8 @@ const BridgeForm = ({
125
125
  callbackRoute = "/",
126
126
  firstTokenIdentifier,
127
127
  secondTokenIdentifier,
128
+ firstTokenAmount,
129
+ secondTokenAmount,
128
130
  refetchTrigger,
129
131
  showHistory,
130
132
  forcedDestinationTokenSymbol,
@@ -615,6 +617,16 @@ const BridgeForm = ({
615
617
  };
616
618
  });
617
619
  }, [mvxTokensWithBalances, secondToken == null ? void 0 : secondToken.address]);
620
+ React.useEffect(() => {
621
+ if (firstTokenAmount) {
622
+ handleOnChangeFirstAmount(firstTokenAmount);
623
+ }
624
+ }, [firstTokenAmount]);
625
+ React.useEffect(() => {
626
+ if (secondTokenAmount) {
627
+ handleOnChangeSecondAmount(secondTokenAmount);
628
+ }
629
+ }, [secondTokenAmount]);
618
630
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
619
631
  "form",
620
632
  {
@@ -122,6 +122,8 @@ const BridgeForm = ({
122
122
  callbackRoute = "/",
123
123
  firstTokenIdentifier,
124
124
  secondTokenIdentifier,
125
+ firstTokenAmount,
126
+ secondTokenAmount,
125
127
  refetchTrigger,
126
128
  showHistory,
127
129
  forcedDestinationTokenSymbol,
@@ -612,6 +614,16 @@ const BridgeForm = ({
612
614
  };
613
615
  });
614
616
  }, [mvxTokensWithBalances, secondToken == null ? void 0 : secondToken.address]);
617
+ useEffect(() => {
618
+ if (firstTokenAmount) {
619
+ handleOnChangeFirstAmount(firstTokenAmount);
620
+ }
621
+ }, [firstTokenAmount]);
622
+ useEffect(() => {
623
+ if (secondTokenAmount) {
624
+ handleOnChangeSecondAmount(secondTokenAmount);
625
+ }
626
+ }, [secondTokenAmount]);
615
627
  return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
616
628
  "form",
617
629
  {