From e2c714699e5c215497f90ff318175434fd2e517f Mon Sep 17 00:00:00 2001 From: Tom Robiquet Date: Wed, 7 Feb 2024 11:16:59 +0200 Subject: [PATCH] Cross chain proxy info and error handling --- lib/hooks/useCrossChainExtrinsic.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/hooks/useCrossChainExtrinsic.ts b/lib/hooks/useCrossChainExtrinsic.ts index 8d93f5fd4..c414662ea 100644 --- a/lib/hooks/useCrossChainExtrinsic.ts +++ b/lib/hooks/useCrossChainExtrinsic.ts @@ -57,6 +57,12 @@ export const useCrossChainExtrinsic = ( if (extrinsic && proxy?.enabled && proxy?.address) { console.info("Proxying cross chain transaction"); extrinsic = sdk.api.tx.proxy.proxy(proxy?.address, null, extrinsic); + notifications.pushNotification( + "Proxies are not supported for cross chain transactions", + { + type: "Info", + }, + ); } if (!signer || !extrinsic || !sourceChainApi || !destinationChainApi) @@ -116,7 +122,10 @@ export const useCrossChainExtrinsic = ( }, }), IOForeignAssetId.is(fee?.assetId) ? fee?.assetId.ForeignAsset : undefined, - ).catch(() => { + ).catch((error) => { + notifications.pushNotification(error?.toString() ?? "Unknown Error", { + type: "Error", + }); setIsLoading(false); }); };