From 1316c46ce299ad972d1524a6ed4e14fd189ffed8 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 16 Jan 2023 14:30:33 +0100 Subject: [PATCH] Fix missing unescaping for denoms --- context/AppContext.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/context/AppContext.tsx b/context/AppContext.tsx index 5348678..f58e2ca 100644 --- a/context/AppContext.tsx +++ b/context/AppContext.tsx @@ -17,14 +17,17 @@ function getChainInfoFromUrl(): ChainInfo { const params = new URLSearchParams(url); const chainInfo: ChainInfo = { nodeAddress: decodeURIComponent(params.get("nodeAddress") || ""), - denom: params.get("denom") || "", - displayDenom: params.get("displayDenom") || "", - displayDenomExponent: parseInt(params.get("displayDenomExponent") || "", 10), - gasPrice: params.get("gasPrice") || "", - chainId: params.get("chainId") || "", + denom: decodeURIComponent(params.get("denom") || ""), + displayDenom: decodeURIComponent(params.get("displayDenom") || ""), + displayDenomExponent: parseInt( + decodeURIComponent(params.get("displayDenomExponent") || ""), + 10, + ), + gasPrice: decodeURIComponent(params.get("gasPrice") || ""), + chainId: decodeURIComponent(params.get("chainId") || ""), chainDisplayName: decodeURIComponent(params.get("chainDisplayName") || ""), - registryName: params.get("registryName") || "", - addressPrefix: params.get("addressPrefix") || "", + registryName: decodeURIComponent(params.get("registryName") || ""), + addressPrefix: decodeURIComponent(params.get("addressPrefix") || ""), explorerLink: decodeURIComponent(params.get("explorerLink") || ""), };