Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions apps/namadillo/src/utils/sdk.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { Sdk } from "@namada/sdk-multicore";
// TODO: The following should work! moduleResolution: "node" prevents this from working.
// import { initSdk } from "@namada/sdk-multicore/inline";
// TODO: Remove the following work-around once the above is fixed!
import { initSdk } from "@namada/sdk-multicore/inline";
import { nativeTokenAddressAtom } from "atoms/chain";
import { maspIndexerUrlAtom, rpcUrlAtom } from "atoms/settings";
import { getDefaultStore } from "jotai";
import { initSdk } from "../../../../node_modules/@namada/sdk-multicore/dist/sdk-multicore/src/initInline";

const initializeSdk = async (): Promise<Sdk> => {
const store = getDefaultStore();
Expand Down
2 changes: 1 addition & 1 deletion apps/namadillo/src/workers/MaspTxWorker.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Sdk } from "@namada/sdk-multicore";
import { initSdk } from "@namada/sdk-multicore/inline";
import {
IbcTransferMsgValue,
ShieldedTransferMsgValue,
Expand All @@ -10,7 +11,6 @@ import BigNumber from "bignumber.js";
import * as Comlink from "comlink";
import { buildTx, EncodedTxData } from "lib/query";
import { namadaAsset, toDisplayAmount } from "utils";
import { initSdk } from "../../../../node_modules/@namada/sdk-multicore/dist/sdk-multicore/src/initInline";
import {
Broadcast,
BroadcastDone,
Expand Down
2 changes: 1 addition & 1 deletion apps/namadillo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"jsx": "react-jsx",
"lib": ["dom", "dom.iterable", "esnext"],
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"noEmit": false,
"noFallthroughCasesInSwitch": true,
"resolveJsonModule": true,
Expand Down
8 changes: 4 additions & 4 deletions packages/hooks/src/useSanitizedLocation.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { sanitize } from "isomorphic-dompurify";
import dompurify from "isomorphic-dompurify";
import { Location, useLocation } from "react-router-dom";

export const useSanitizedLocation = (): Location => {
const location = useLocation();
return {
...location,
pathname: sanitize(location.pathname),
search: sanitize(location.search),
hash: sanitize(location.hash),
pathname: dompurify.sanitize(location.pathname),
search: dompurify.sanitize(location.search),
hash: dompurify.sanitize(location.hash),
};
};
4 changes: 2 additions & 2 deletions packages/hooks/src/useSanitizedParams.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { sanitize } from "isomorphic-dompurify";
import dompurify from "isomorphic-dompurify";
import { Params, useParams } from "react-router-dom";

type ParamsT<ParamsOrKey> = Readonly<
Expand All @@ -12,7 +12,7 @@ export function useSanitizedParams<
return Object.entries(params).reduce(
(acc, [key, value]) => ({
...acc,
[key]: typeof value === "string" ? sanitize(value) : value,
[key]: typeof value === "string" ? dompurify.sanitize(value) : value,
}),
{} as ParamsT<ParamsOrKey>
);
Expand Down
Loading