diff --git a/apps/governance/src/routes/proposals/propose/new-asset/propose-new-asset.tsx b/apps/governance/src/routes/proposals/propose/new-asset/propose-new-asset.tsx
index f5ce50976..24a2b9349 100644
--- a/apps/governance/src/routes/proposals/propose/new-asset/propose-new-asset.tsx
+++ b/apps/governance/src/routes/proposals/propose/new-asset/propose-new-asset.tsx
@@ -8,7 +8,7 @@ import {
doesValueEquateToParam,
} from '@vegaprotocol/proposals';
import { useEnvironment, DocsLinks } from '@vegaprotocol/environment';
-import { validateJson } from '@vegaprotocol/utils';
+import { useValidateJson } from '@vegaprotocol/utils';
import {
NetworkParams,
useNetworkParams,
@@ -41,6 +41,7 @@ export interface NewAssetProposalFormFields {
const DOCS_LINK = '/new-asset-proposal';
export const ProposeNewAsset = () => {
+ const validateJson = useValidateJson();
const {
params,
loading: networkParamsLoading,
diff --git a/apps/governance/src/routes/proposals/propose/new-market/propose-new-market.tsx b/apps/governance/src/routes/proposals/propose/new-market/propose-new-market.tsx
index f659ea703..b637bb5f9 100644
--- a/apps/governance/src/routes/proposals/propose/new-market/propose-new-market.tsx
+++ b/apps/governance/src/routes/proposals/propose/new-market/propose-new-market.tsx
@@ -7,7 +7,7 @@ import {
doesValueEquateToParam,
} from '@vegaprotocol/proposals';
import { useEnvironment, DocsLinks } from '@vegaprotocol/environment';
-import { validateJson } from '@vegaprotocol/utils';
+import { useValidateJson } from '@vegaprotocol/utils';
import {
NetworkParams,
useNetworkParams,
@@ -39,6 +39,7 @@ export interface NewMarketProposalFormFields {
const DOCS_LINK = '/new-market-proposal';
export const ProposeNewMarket = () => {
+ const validateJson = useValidateJson();
const {
params,
loading: networkParamsLoading,
diff --git a/apps/governance/src/routes/proposals/propose/raw/propose-raw.tsx b/apps/governance/src/routes/proposals/propose/raw/propose-raw.tsx
index dbc002619..d43a27e92 100644
--- a/apps/governance/src/routes/proposals/propose/raw/propose-raw.tsx
+++ b/apps/governance/src/routes/proposals/propose/raw/propose-raw.tsx
@@ -14,7 +14,7 @@ import {
RoundedWrapper,
TextArea,
} from '@vegaprotocol/ui-toolkit';
-import { validateJson } from '@vegaprotocol/utils';
+import { useValidateJson } from '@vegaprotocol/utils';
import {
NetworkParams,
useNetworkParams,
@@ -31,6 +31,7 @@ export interface RawProposalFormFields {
}
export const ProposeRaw = () => {
+ const validateJson = useValidateJson();
const {
params,
loading: networkParamsLoading,
diff --git a/apps/governance/src/routes/proposals/propose/update-asset/propose-update-asset.tsx b/apps/governance/src/routes/proposals/propose/update-asset/propose-update-asset.tsx
index 77004c00a..b4aaa30e4 100644
--- a/apps/governance/src/routes/proposals/propose/update-asset/propose-update-asset.tsx
+++ b/apps/governance/src/routes/proposals/propose/update-asset/propose-update-asset.tsx
@@ -7,7 +7,7 @@ import {
doesValueEquateToParam,
} from '@vegaprotocol/proposals';
import { useEnvironment, DocsLinks } from '@vegaprotocol/environment';
-import { validateJson } from '@vegaprotocol/utils';
+import { useValidateJson } from '@vegaprotocol/utils';
import {
NetworkParams,
useNetworkParams,
@@ -39,6 +39,7 @@ export interface UpdateAssetProposalFormFields {
const DOCS_LINK = '/update-asset-proposal';
export const ProposeUpdateAsset = () => {
+ const validateJson = useValidateJson();
const {
params,
loading: networkParamsLoading,
diff --git a/apps/governance/src/routes/proposals/propose/update-market/propose-update-market.tsx b/apps/governance/src/routes/proposals/propose/update-market/propose-update-market.tsx
index 867a24fac..cef4c81ac 100644
--- a/apps/governance/src/routes/proposals/propose/update-market/propose-update-market.tsx
+++ b/apps/governance/src/routes/proposals/propose/update-market/propose-update-market.tsx
@@ -8,7 +8,7 @@ import {
useProposalSubmit,
} from '@vegaprotocol/proposals';
import { useEnvironment, DocsLinks } from '@vegaprotocol/environment';
-import { validateJson } from '@vegaprotocol/utils';
+import { useValidateJson } from '@vegaprotocol/utils';
import {
NetworkParams,
useNetworkParams,
@@ -53,6 +53,7 @@ export interface UpdateMarketProposalFormFields {
const DOCS_LINK = '/update-market-proposal';
export const ProposeUpdateMarket = () => {
+ const validateJson = useValidateJson();
const {
params,
loading: networkParamsLoading,
@@ -260,7 +261,7 @@ export const ProposeUpdateMarket = () => {
{selectedMarket && (
-
+
{t('MarketName')}
diff --git a/libs/accounts/src/lib/transfer-form.tsx b/libs/accounts/src/lib/transfer-form.tsx
index 2eef079fd..4ceff1ab2 100644
--- a/libs/accounts/src/lib/transfer-form.tsx
+++ b/libs/accounts/src/lib/transfer-form.tsx
@@ -1,8 +1,8 @@
import sortBy from 'lodash/sortBy';
import {
- maxSafe,
- required,
- vegaPublicKey,
+ useMaxSafe,
+ useRequired,
+ useVegaPublicKey,
addDecimal,
formatNumber,
addDecimalsFormatNumber,
@@ -67,6 +67,9 @@ export const TransferForm = ({
minQuantumMultiple,
}: TransferFormProps) => {
const t = useT();
+ const maxSafe = useMaxSafe();
+ const required = useRequired();
+ const vegaPublicKey = useVegaPublicKey();
const {
control,
register,
@@ -415,7 +418,7 @@ export const TransferForm = ({
{accountBalance && (