diff --git a/package-lock.json b/package-lock.json index 9e24c038..864d01d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -106,7 +106,7 @@ "prettier-plugin-tailwindcss": "^0.5.12", "semantic-release-export-data": "^1.0.1", "tailwindcss": "^3.4.1", - "typescript": "^5.2.2", + "typescript": "^5.6.3", "vite": "^5.4.2", "vite-plugin-node-polyfills": "^0.22.0", "vitest": "^2.0.5" @@ -1315,15 +1315,15 @@ } }, "node_modules/@mswjs/interceptors": { - "version": "0.29.1", - "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.29.1.tgz", - "integrity": "sha512-3rDakgJZ77+RiQUuSK69t1F0m8BQKA8Vh5DCS5V0DWvNY67zob2JhhQrhCO0AKLGINTRSFd1tBaHcJTkhefoSw==", + "version": "0.35.9", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.35.9.tgz", + "integrity": "sha512-SSnyl/4ni/2ViHKkiZb8eajA/eN1DNFaHjhGiLUdZvDz6PKF4COSf/17xqSz64nOo2Ia29SA6B2KNCsyCbVmaQ==", "dependencies": { "@open-draft/deferred-promise": "^2.2.0", "@open-draft/logger": "^0.3.0", "@open-draft/until": "^2.0.0", "is-node-process": "^1.2.0", - "outvariant": "^1.2.1", + "outvariant": "^1.4.3", "strict-event-emitter": "^0.5.1" }, "engines": { @@ -8014,6 +8014,14 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, + "node_modules/graphql": { + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz", + "integrity": "sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==", + "engines": { + "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" + } + }, "node_modules/handlebars": { "version": "4.7.8", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", @@ -9590,26 +9598,27 @@ "dev": true }, "node_modules/msw": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/msw/-/msw-2.4.1.tgz", - "integrity": "sha512-HXcoQPzYTwEmVk+BGIcRa0vLabBT+J20SSSeYh/QfajaK5ceA6dlD4ZZjfz2dqGEq4vRNCPLP6eXsB94KllPFg==", + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/msw/-/msw-2.4.11.tgz", + "integrity": "sha512-TVEw9NOPTc6ufOQLJ53234S9NBRxQbu7xFMxs+OCP43JQcNEIOKiZHxEm2nDzYIrwccoIhUxUf8wr99SukD76A==", "hasInstallScript": true, "dependencies": { "@bundled-es-modules/cookie": "^2.0.0", "@bundled-es-modules/statuses": "^1.0.1", "@bundled-es-modules/tough-cookie": "^0.1.6", "@inquirer/confirm": "^3.0.0", - "@mswjs/interceptors": "^0.29.0", + "@mswjs/interceptors": "^0.35.8", "@open-draft/until": "^2.1.0", "@types/cookie": "^0.6.0", "@types/statuses": "^2.0.4", "chalk": "^4.1.2", + "graphql": "^16.8.1", "headers-polyfill": "^4.0.2", "is-node-process": "^1.2.0", - "outvariant": "^1.4.2", - "path-to-regexp": "^6.2.0", + "outvariant": "^1.4.3", + "path-to-regexp": "^6.3.0", "strict-event-emitter": "^0.5.1", - "type-fest": "^4.9.0", + "type-fest": "^4.26.1", "yargs": "^17.7.2" }, "bin": { @@ -9622,22 +9631,18 @@ "url": "https://github.com/sponsors/mswjs" }, "peerDependencies": { - "graphql": ">= 16.8.x", - "typescript": ">= 4.7.x" + "typescript": ">= 4.8.x" }, "peerDependenciesMeta": { - "graphql": { - "optional": true - }, "typescript": { "optional": true } } }, "node_modules/msw/node_modules/type-fest": { - "version": "4.26.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.26.0.tgz", - "integrity": "sha512-OduNjVJsFbifKb57UqZ2EMP1i4u64Xwow3NYXUtBbD4vIwJdQd4+xl8YDou1dlm4DVrtwT/7Ky8z8WyCULVfxw==", + "version": "4.26.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.26.1.tgz", + "integrity": "sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==", "engines": { "node": ">=16" }, @@ -9740,9 +9745,9 @@ "dev": true }, "node_modules/node-stdlib-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/node-stdlib-browser/-/node-stdlib-browser-1.2.0.tgz", - "integrity": "sha512-VSjFxUhRhkyed8AtLwSCkMrJRfQ3e2lGtG3sP6FEgaLKBBbxM/dLfjRe1+iLhjvyLFW3tBQ8+c0pcOtXGbAZJg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/node-stdlib-browser/-/node-stdlib-browser-1.2.1.tgz", + "integrity": "sha512-dZezG3D88Lg22DwyjsDuUs7cCT/XGr8WwJgg/S3ZnkcWuPet2Tt/W1d2Eytb1Z73JpZv+XVCDI5TWv6UMRq0Gg==", "dev": true, "dependencies": { "assert": "^2.0.0", @@ -9769,7 +9774,7 @@ "string_decoder": "^1.0.0", "timers-browserify": "^2.0.4", "tty-browserify": "0.0.1", - "url": "^0.11.0", + "url": "^0.11.4", "util": "^0.12.4", "vm-browserify": "^1.0.1" }, @@ -14112,9 +14117,9 @@ "integrity": "sha512-HM7yY8O2ilqhmULxGMpcHSF1EhJJ9yBj8gvDEuZ6M+KGJ0YY2hKpnXvRD+hZPLrDVck3ExIGhmPtSdcjC+guuw==" }, "node_modules/qs": { - "version": "6.12.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz", - "integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "dev": true, "dependencies": { "side-channel": "^1.0.6" @@ -16159,9 +16164,9 @@ } }, "node_modules/typescript": { - "version": "5.4.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz", - "integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "devOptional": true, "bin": { "tsc": "bin/tsc", @@ -16312,13 +16317,16 @@ } }, "node_modules/url": { - "version": "0.11.3", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.3.tgz", - "integrity": "sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw==", + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.4.tgz", + "integrity": "sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==", "dev": true, "dependencies": { "punycode": "^1.4.1", - "qs": "^6.11.2" + "qs": "^6.12.3" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/url-join": { diff --git a/package.json b/package.json index e363668f..be988217 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "prettier-plugin-tailwindcss": "^0.5.12", "semantic-release-export-data": "^1.0.1", "tailwindcss": "^3.4.1", - "typescript": "^5.2.2", + "typescript": "^5.6.3", "vite": "^5.4.2", "vite-plugin-node-polyfills": "^0.22.0", "vitest": "^2.0.5" @@ -196,4 +196,4 @@ "method-call-transaction-builder.tsx" ] } -} \ No newline at end of file +} diff --git a/src/features/applications/mappers/index.ts b/src/features/applications/mappers/index.ts index 3e720d48..a30a526e 100644 --- a/src/features/applications/mappers/index.ts +++ b/src/features/applications/mappers/index.ts @@ -166,7 +166,9 @@ export const asApplicationAbiMethods = (appSpec: Arc32AppSpec | Arc4AppSpec): Ap const methodArgs = abiMethod.args.map((arg) => { const argHint = - hint && arg.name && (hint.structs?.[arg.name] || hint.default_arguments?.[arg.name]) + hint && + arg.name && + (('structs' in hint && hint.structs?.[arg.name]) || ('default_arguments' in hint && hint.default_arguments?.[arg.name])) ? ({ struct: hint.structs?.[arg.name], defaultArgument: hint.default_arguments?.[arg.name], @@ -218,7 +220,7 @@ export const asApplicationAbiMethods = (appSpec: Arc32AppSpec | Arc4AppSpec): Ap returns: { ...abiMethod.returns, hint: - hint && hint.structs?.['output'] + hint && 'structs' in hint && hint.structs?.['output'] ? { struct: hint.structs?.['output'], } diff --git a/src/features/common/data/atom-storage.ts b/src/features/common/data/atom-storage.ts new file mode 100644 index 00000000..0882339d --- /dev/null +++ b/src/features/common/data/atom-storage.ts @@ -0,0 +1,7 @@ +import { createJSONStorage } from 'jotai/utils' + +export const createAtomStorageWithoutSubscription = () => { + const localStorage = createJSONStorage() + localStorage.subscribe = () => () => {} //No op subscriber, so localstorage state changes will not automatically update the atom + return localStorage +} diff --git a/src/features/layout/components/left-side-bar-menu.tsx b/src/features/layout/components/left-side-bar-menu.tsx index 5ddaaf49..3cde0a47 100644 --- a/src/features/layout/components/left-side-bar-menu.tsx +++ b/src/features/layout/components/left-side-bar-menu.tsx @@ -9,6 +9,7 @@ import { Telescope, Settings, PanelLeftClose, PanelLeftOpen, ArrowLeft, Coins, F import { ThemeToggle } from '@/features/settings/components/theme-toggle' import { useNavigate } from 'react-router-dom' import { useLayout } from '@/features/settings/data' +import SvgWizard from '@/features/common/components/icons/wizard' type Props = { className?: string @@ -26,7 +27,7 @@ export function LeftSideBarMenu({ className }: Props) { const menuItems = [ { urlTemplate: Urls.Explore, icon: , text: 'Explore' }, { urlTemplate: Urls.AppLab, icon: , text: 'App Lab' }, - // { urlTemplate: Urls.TransactionWizard, icon: , text: 'Txn Wizard' }, + { urlTemplate: Urls.TransactionWizard, icon: , text: 'Txn Wizard' }, { urlTemplate: Urls.Fund, icon: , text: 'Fund' }, ] const [layout, setLayout] = useLayout() diff --git a/src/features/network/data/index.ts b/src/features/network/data/index.ts index ce96cf1d..00653128 100644 --- a/src/features/network/data/index.ts +++ b/src/features/network/data/index.ts @@ -5,6 +5,7 @@ import { useCallback } from 'react' import { NetworkConfig, NetworkConfigWithId, NetworkId, NetworkTokens, localnetId, testnetId, mainnetId, fnetId, betanetId } from './types' import { settingsStore } from '@/features/settings/data' import config from '@/config' +import { createAtomStorageWithoutSubscription } from '@/features/common/data/atom-storage' export { localnetId, testnetId, mainnetId, fnetId } from './types' export const localnetWalletProviders = [PROVIDER_ID.KMD, PROVIDER_ID.MNEMONIC, PROVIDER_ID.LUTE] @@ -216,7 +217,7 @@ export const useDeleteCustomNetworkConfig = () => { ) } -const storedSelectedNetworkIdAtom = atomWithStorage('network', localnetId, undefined, { getOnInit: true }) +const storedSelectedNetworkIdAtom = atomWithStorage('network', localnetId, createAtomStorageWithoutSubscription(), { getOnInit: true }) export const selectedNetworkAtomId = atomWithRefresh((get) => { const networkId = window.location.pathname.split('/')[1] const networkConfigs = get(networkConfigsAtom)