@orderly.network/trading 3.1.10 → 3.1.11
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/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +22 -22
package/dist/index.js
CHANGED
|
@@ -7005,7 +7005,9 @@ var Chain = (props) => {
|
|
|
7005
7005
|
ui.modal.show(uiChainSelector.ChainSelectorSheetId, {
|
|
7006
7006
|
// networkId: props.networkId,
|
|
7007
7007
|
bridgeLessOnly: false,
|
|
7008
|
-
isWrongNetwork: props.wrongNetwork
|
|
7008
|
+
isWrongNetwork: props.wrongNetwork,
|
|
7009
|
+
onChainChangeBefore: props.onChainChangeBefore,
|
|
7010
|
+
onChainChangeAfter: props.onChainChangeAfter
|
|
7009
7011
|
}).then(
|
|
7010
7012
|
(r) => {
|
|
7011
7013
|
if (r?.chainId) {
|
|
@@ -7056,19 +7058,27 @@ var Chain = (props) => {
|
|
|
7056
7058
|
}
|
|
7057
7059
|
);
|
|
7058
7060
|
};
|
|
7059
|
-
var useChainScript = () => {
|
|
7061
|
+
var useChainScript = (options = {}) => {
|
|
7060
7062
|
const config = hooks.useConfig();
|
|
7061
7063
|
const { wrongNetwork, currentChainId, setCurrentChainId } = reactApp.useAppContext();
|
|
7064
|
+
const { onChainChangeBefore, onChainChangeAfter } = uiConnector.useChainChangeValidation({
|
|
7065
|
+
onAccountValidated: options.onAccountValidated
|
|
7066
|
+
});
|
|
7062
7067
|
const networkId = config.get("networkId");
|
|
7063
7068
|
return {
|
|
7064
7069
|
currentChainId,
|
|
7065
7070
|
setCurrentChainId,
|
|
7066
7071
|
networkId,
|
|
7067
|
-
wrongNetwork
|
|
7072
|
+
wrongNetwork,
|
|
7073
|
+
onChainChangeBefore,
|
|
7074
|
+
onChainChangeAfter
|
|
7068
7075
|
};
|
|
7069
7076
|
};
|
|
7070
7077
|
var ChainWidget = () => {
|
|
7071
|
-
const
|
|
7078
|
+
const { handleAccountStatus } = uiConnector.useOnboardingModal();
|
|
7079
|
+
const state = useChainScript({
|
|
7080
|
+
onAccountValidated: handleAccountStatus
|
|
7081
|
+
});
|
|
7072
7082
|
return /* @__PURE__ */ jsxRuntime.jsx(Chain, { ...state });
|
|
7073
7083
|
};
|
|
7074
7084
|
var BottomNavBar = (props) => {
|