From b44d34d1e5e71644ede0142a3fc6c23b943b0fb5 Mon Sep 17 00:00:00 2001 From: Kami Date: Fri, 6 Dec 2024 02:15:26 +0330 Subject: [PATCH] fix: improve input checks --- packages/dapp/package.json | 2 +- packages/dapp/setDappPath.js | 1 + packages/snap/snap.manifest.json | 2 +- packages/snap/src/constants.ts | 1 + packages/snap/src/listeners/onUserInput.tsx | 2 +- packages/snap/src/ui/send/SendForm.tsx | 10 +- packages/snap/src/ui/send/index.tsx | 20 +- packages/snap/src/util/handleBalancesAll.tsx | 15 +- yarn.lock | 264 ++----------------- 9 files changed, 57 insertions(+), 260 deletions(-) diff --git a/packages/dapp/package.json b/packages/dapp/package.json index c8c8361..054caf6 100644 --- a/packages/dapp/package.json +++ b/packages/dapp/package.json @@ -14,7 +14,7 @@ "@polkadot/api-derive": "^12.1.1", "@polkadot/apps-config": "^0.141.1", "@polkadot/extension-inject": "^0.48.2", - "@polkagate/extension-dapp": "../../../polkadot-js-extension/packages/extension-dapp/build", + "@polkagate/extension-dapp": "^0.48.2", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", diff --git a/packages/dapp/setDappPath.js b/packages/dapp/setDappPath.js index 7451b20..97d05ab 100644 --- a/packages/dapp/setDappPath.js +++ b/packages/dapp/setDappPath.js @@ -2,6 +2,7 @@ const fs = require('fs'); const packageJson = require('./package.json'); const isProduction = process.env.NODE_ENV === 'production'; +console.log(`set path says isProduction is ${isProduction}`) packageJson.dependencies['@polkagate/extension-dapp'] = isProduction ? '^0.48.2' : '../../../polkadot-js-extension/packages/extension-dapp/build'; diff --git a/packages/snap/snap.manifest.json b/packages/snap/snap.manifest.json index f7a7ab0..41c24e2 100644 --- a/packages/snap/snap.manifest.json +++ b/packages/snap/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/polkagate/snap.git" }, "source": { - "shasum": "DQnCLJLh1R+vr3YG+b2R0WNQya1/ibMwh5nFDBlOu0s=", + "shasum": "DDrta0szZSiMMKzpnkStW2D//DKsT5I8JjgyC0CDi5Y=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/snap/src/constants.ts b/packages/snap/src/constants.ts index e488317..677918c 100644 --- a/packages/snap/src/constants.ts +++ b/packages/snap/src/constants.ts @@ -18,6 +18,7 @@ export const NOT_LISTED_CHAINS = [ '0xcdedc8eadbfa209d3f207bba541e57c3c58a667b05a2e1d1e86353c9000758da', // Integritee '0xfe1b4c55fd4d668101126434206571a7838a8b6b93a6d1b95d607e78e6c53763', // Vara '0x4a587bf17a404e3572747add7aab7bbe56e805a5479c6c436f07f36fcc8d3ae1', // Frequency + '0xb3db41421702df9a7fcac62b53ffeac85f7853cc4e689e0b93aeb3db18c09d82', // Centrifuge ] export const PRICE_VALIDITY_PERIOD = 2 * 60 * 1000; diff --git a/packages/snap/src/listeners/onUserInput.tsx b/packages/snap/src/listeners/onUserInput.tsx index 63b8eb7..be528a9 100644 --- a/packages/snap/src/listeners/onUserInput.tsx +++ b/packages/snap/src/listeners/onUserInput.tsx @@ -53,7 +53,7 @@ export const onUserInput: OnUserInputHandler = async ({ id, event, context }) => const clearAddress = event.name === 'clear'; const displayClearIcon = !clearAddress && sendForm && Boolean(sendForm.to) && sendForm.to !== ''; - await send(id, sendForm?.tokenSelector, sendForm?.amount, sendForm?.to, formErrors, displayClearIcon, clearAddress); + await send(id, sendForm?.amount, formErrors, sendForm?.to, sendForm?.tokenSelector, displayClearIcon, clearAddress); break; case 'sendReview': diff --git a/packages/snap/src/ui/send/SendForm.tsx b/packages/snap/src/ui/send/SendForm.tsx index 8269556..4207812 100644 --- a/packages/snap/src/ui/send/SendForm.tsx +++ b/packages/snap/src/ui/send/SendForm.tsx @@ -53,9 +53,15 @@ export const SendForm: SnapComponent = ({ - + - {_selectedToken.token} + + {_selectedToken.token} + diff --git a/packages/snap/src/ui/send/index.tsx b/packages/snap/src/ui/send/index.tsx index 3e24e6e..b634f26 100644 --- a/packages/snap/src/ui/send/index.tsx +++ b/packages/snap/src/ui/send/index.tsx @@ -12,22 +12,26 @@ import { FlowHeader } from "./FlowHeader"; export async function send( id: string, - selectedTokenGenesisHash: string | undefined, amount: string | undefined, - recipient: string | undefined, formErrors: SendFormErrors, + recipient: string | undefined, + selectedTokenGenesisHash: string | undefined, displayClearIcon?: boolean, - clearAddress?: boolean + clearAddress?: boolean, ) { - const { address, balancesAll, logos, pricesInUsd } = await handleBalancesAll(); + const { address, balancesAll, logos, pricesInUsd } = await handleBalancesAll(true); const nonZeroBalances = balancesAll.filter(({ total }) => !total.isZero()); const tokenGenesis = selectedTokenGenesisHash?.split(','); const maybeSelectedToken = tokenGenesis && balancesAll.find(({ token, genesisHash }) => tokenGenesis[0] === token && tokenGenesis[1] === genesisHash); const selectedToken = maybeSelectedToken || nonZeroBalances[0]; const noError = !formErrors || Object.keys(formErrors).length === 0; - const formIsFilledOut = amount && recipient; - const fee: Balance | undefined = tokenGenesis && formIsFilledOut && noError ? await getTransferFee(address, amount, tokenGenesis[1] as HexString, recipient) : undefined; + const formIsFilledOut = amount && Number(amount)!==0 && recipient; + + const fee: Balance | undefined = tokenGenesis && formIsFilledOut && noError && !clearAddress + ? await getTransferFee(address, amount, tokenGenesis[1] as HexString, recipient) + : undefined; + const total: number = (fee ? Number(amountToHuman(fee, selectedToken.decimal)) : 0) + (amount ? Number(amount) : 0); const selectedTokenPrice = pricesInUsd.find((price) => price.genesisHash === selectedToken.genesisHash)?.price?.value || 0; @@ -37,8 +41,8 @@ export async function send( id, ui: ui(fee, nonZeroBalances, logos, pricesInUsd, selectedToken, formErrors, displayClearIcon, clearAddress, selectedTokenPrice, total), context: { - transferable: selectedToken.transferable.toString(), - decimal: selectedToken.decimal + decimal: selectedToken.decimal, + transferable: selectedToken.transferable.toString() } }, }); diff --git a/packages/snap/src/util/handleBalancesAll.tsx b/packages/snap/src/util/handleBalancesAll.tsx index a021027..72f45c7 100644 --- a/packages/snap/src/util/handleBalancesAll.tsx +++ b/packages/snap/src/util/handleBalancesAll.tsx @@ -12,7 +12,7 @@ import { DEFAULT_CHAIN_NAME, NOT_LISTED_CHAINS, PRICE_VALIDITY_PERIOD } from '.. import { updateTokenPrices } from './getCurrentChainTokenPrice'; import { isHexToBn } from '../utils'; -export const handleBalancesAll = async () => { +export const handleBalancesAll = async (savedOnly?: boolean) => { const options = getChainOptions() const selectedOptions = options.filter(({ value }) => !NOT_LISTED_CHAINS.includes(value))//.slice(0, 3); @@ -21,13 +21,7 @@ export const handleBalancesAll = async () => { let balancesAll: Balances[]; const savedBalancesAll = await getSnapState(); - const logoList = await Promise.all(selectedOptions.map(({ value }) => getLogoByGenesisHash(value as HexString))); - - const logos = selectedOptions.map(({ value }, index) => { - return { genesisHash: value, logo: logoList[index] } - }); - - if (savedBalancesAll.balancesAll && Date.now() - Number(savedBalancesAll.balancesAll.date) < PRICE_VALIDITY_PERIOD) { + if (savedBalancesAll.balancesAll && (savedOnly || Date.now() - Number(savedBalancesAll.balancesAll.date) < PRICE_VALIDITY_PERIOD)) { const temp = JSON.parse(savedBalancesAll.balancesAll.data); temp.forEach((item) => { @@ -46,6 +40,11 @@ export const handleBalancesAll = async () => { await updateSnapState('balancesAll', { date: Date.now(), data: JSON.stringify(balancesAll) }); } + const logoList = await Promise.all(selectedOptions.map(({ value }) => getLogoByGenesisHash(value as HexString))); + const logos = selectedOptions.map(({ value }, index) => { + return { genesisHash: value, logo: logoList[index] } + }); + await updateTokenPrices(); const pricesInUsd = await Promise.all(selectedOptions.map(({ value }) => getNativeTokenPrice(value as HexString))); diff --git a/yarn.lock b/yarn.lock index 2fd32f2..a443f91 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4631,21 +4631,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/api-augment@npm:12.4.2": - version: 12.4.2 - resolution: "@polkadot/api-augment@npm:12.4.2" - dependencies: - "@polkadot/api-base": 12.4.2 - "@polkadot/rpc-augment": 12.4.2 - "@polkadot/types": 12.4.2 - "@polkadot/types-augment": 12.4.2 - "@polkadot/types-codec": 12.4.2 - "@polkadot/util": ^13.0.2 - tslib: ^2.6.3 - checksum: 95ca6ad35b682918d989523ec25153dc1d4beab51b7dba2d8cf0a699b6337db85715dbe32bd704e47ffe964226ee2054def76f87f2c932f5d4ee2be0164c1131 - languageName: node - linkType: hard - "@polkadot/api-augment@npm:14.3.1": version: 14.3.1 resolution: "@polkadot/api-augment@npm:14.3.1" @@ -4745,19 +4730,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/api-base@npm:12.4.2": - version: 12.4.2 - resolution: "@polkadot/api-base@npm:12.4.2" - dependencies: - "@polkadot/rpc-core": 12.4.2 - "@polkadot/types": 12.4.2 - "@polkadot/util": ^13.0.2 - rxjs: ^7.8.1 - tslib: ^2.6.3 - checksum: 56c5933217f14e034db39c81f6fa308f2604507bbde820ca67f316ba6a390200dafade1d990ba4d6f1d2bedb94d567cb27435efe341dabf06af2388d457fc4b7 - languageName: node - linkType: hard - "@polkadot/api-base@npm:14.3.1": version: 14.3.1 resolution: "@polkadot/api-base@npm:14.3.1" @@ -4864,24 +4836,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/api-derive@npm:12.4.2": - version: 12.4.2 - resolution: "@polkadot/api-derive@npm:12.4.2" - dependencies: - "@polkadot/api": 12.4.2 - "@polkadot/api-augment": 12.4.2 - "@polkadot/api-base": 12.4.2 - "@polkadot/rpc-core": 12.4.2 - "@polkadot/types": 12.4.2 - "@polkadot/types-codec": 12.4.2 - "@polkadot/util": ^13.0.2 - "@polkadot/util-crypto": ^13.0.2 - rxjs: ^7.8.1 - tslib: ^2.6.3 - checksum: a209e498772ea33fe587327196f13b9779b7054bd986c48c8efeb8fe9c298a375ef478c72fe39f0afec303d418859deb2d8822b554b55640caf1c06e12beeaf1 - languageName: node - linkType: hard - "@polkadot/api-derive@npm:14.3.1": version: 14.3.1 resolution: "@polkadot/api-derive@npm:14.3.1" @@ -5029,31 +4983,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/api@npm:12.4.2, @polkadot/api@npm:^12.2.1": - version: 12.4.2 - resolution: "@polkadot/api@npm:12.4.2" - dependencies: - "@polkadot/api-augment": 12.4.2 - "@polkadot/api-base": 12.4.2 - "@polkadot/api-derive": 12.4.2 - "@polkadot/keyring": ^13.0.2 - "@polkadot/rpc-augment": 12.4.2 - "@polkadot/rpc-core": 12.4.2 - "@polkadot/rpc-provider": 12.4.2 - "@polkadot/types": 12.4.2 - "@polkadot/types-augment": 12.4.2 - "@polkadot/types-codec": 12.4.2 - "@polkadot/types-create": 12.4.2 - "@polkadot/types-known": 12.4.2 - "@polkadot/util": ^13.0.2 - "@polkadot/util-crypto": ^13.0.2 - eventemitter3: ^5.0.1 - rxjs: ^7.8.1 - tslib: ^2.6.3 - checksum: 763e24b6d65c6a573d5d02153b35be9a4f7fa76101e3ad163dbfb46d7c0cd27904d28e92058c405dcd5ea2585788663ccaae406da09479b4bce4496e8f8a6f11 - languageName: node - linkType: hard - "@polkadot/api@npm:14.3.1, @polkadot/api@npm:^14.3.1": version: 14.3.1 resolution: "@polkadot/api@npm:14.3.1" @@ -5258,21 +5187,21 @@ __metadata: languageName: node linkType: hard -"@polkadot/extension-inject@npm:0.50.1": - version: 0.50.1 - resolution: "@polkadot/extension-inject@npm:0.50.1" +"@polkadot/extension-inject@npm:0.48.2, @polkadot/extension-inject@npm:^0.48.2": + version: 0.48.2 + resolution: "@polkadot/extension-inject@npm:0.48.2" dependencies: - "@polkadot/api": ^12.2.1 - "@polkadot/rpc-provider": ^12.2.1 - "@polkadot/types": ^12.2.1 - "@polkadot/util": ^13.0.2 - "@polkadot/util-crypto": ^13.0.2 - "@polkadot/x-global": ^13.0.2 + "@polkadot/api": ^12.0.2 + "@polkadot/rpc-provider": ^12.0.2 + "@polkadot/types": ^12.0.2 + "@polkadot/util": ^12.6.2 + "@polkadot/util-crypto": ^12.6.2 + "@polkadot/x-global": ^12.6.2 tslib: ^2.6.2 peerDependencies: "@polkadot/api": "*" "@polkadot/util": "*" - checksum: 2cff1aca27e94778a38b0c51dc81c2437f64dfe07126061d1965c4d33cd620b62955e2266eb023798cd3472231083cbabb5f16de1c990dd9a413561545383efe + checksum: 53f53249b18e7384c92c3ae72663729e1306cbb24591d5cc9f35afddfb4cb2f4367e6ae7038a8f0b6edf40eae60497d67a2ef27c1ceeebd9a506a4bad885fb2e languageName: node linkType: hard @@ -5294,24 +5223,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/extension-inject@npm:^0.48.2": - version: 0.48.2 - resolution: "@polkadot/extension-inject@npm:0.48.2" - dependencies: - "@polkadot/api": ^12.0.2 - "@polkadot/rpc-provider": ^12.0.2 - "@polkadot/types": ^12.0.2 - "@polkadot/util": ^12.6.2 - "@polkadot/util-crypto": ^12.6.2 - "@polkadot/x-global": ^12.6.2 - tslib: ^2.6.2 - peerDependencies: - "@polkadot/api": "*" - "@polkadot/util": "*" - checksum: 53f53249b18e7384c92c3ae72663729e1306cbb24591d5cc9f35afddfb4cb2f4367e6ae7038a8f0b6edf40eae60497d67a2ef27c1ceeebd9a506a4bad885fb2e - languageName: node - linkType: hard - "@polkadot/keyring@npm:^10.4.2": version: 10.4.2 resolution: "@polkadot/keyring@npm:10.4.2" @@ -5585,19 +5496,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/rpc-augment@npm:12.4.2": - version: 12.4.2 - resolution: "@polkadot/rpc-augment@npm:12.4.2" - dependencies: - "@polkadot/rpc-core": 12.4.2 - "@polkadot/types": 12.4.2 - "@polkadot/types-codec": 12.4.2 - "@polkadot/util": ^13.0.2 - tslib: ^2.6.3 - checksum: 0b329278b8b7217cdb87d451ed16e57f0d357db4e62f06d0315eea3f18db5be0078594dd0984896483f78c81d12e9bb62314c141d0a895f4e997ff49e981d2c5 - languageName: node - linkType: hard - "@polkadot/rpc-augment@npm:14.3.1": version: 14.3.1 resolution: "@polkadot/rpc-augment@npm:14.3.1" @@ -5692,20 +5590,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/rpc-core@npm:12.4.2": - version: 12.4.2 - resolution: "@polkadot/rpc-core@npm:12.4.2" - dependencies: - "@polkadot/rpc-augment": 12.4.2 - "@polkadot/rpc-provider": 12.4.2 - "@polkadot/types": 12.4.2 - "@polkadot/util": ^13.0.2 - rxjs: ^7.8.1 - tslib: ^2.6.3 - checksum: 5a925296e14b4db61b1e37597934ad6a75b8cd7c195d5ef4a50dc200b453fdd86908770308076fe89364be280ad5777b187657b465486767baae67c163906258 - languageName: node - linkType: hard - "@polkadot/rpc-core@npm:14.3.1": version: 14.3.1 resolution: "@polkadot/rpc-core@npm:14.3.1" @@ -5834,30 +5718,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/rpc-provider@npm:12.4.2, @polkadot/rpc-provider@npm:^12.2.1": - version: 12.4.2 - resolution: "@polkadot/rpc-provider@npm:12.4.2" - dependencies: - "@polkadot/keyring": ^13.0.2 - "@polkadot/types": 12.4.2 - "@polkadot/types-support": 12.4.2 - "@polkadot/util": ^13.0.2 - "@polkadot/util-crypto": ^13.0.2 - "@polkadot/x-fetch": ^13.0.2 - "@polkadot/x-global": ^13.0.2 - "@polkadot/x-ws": ^13.0.2 - "@substrate/connect": 0.8.11 - eventemitter3: ^5.0.1 - mock-socket: ^9.3.1 - nock: ^13.5.4 - tslib: ^2.6.3 - dependenciesMeta: - "@substrate/connect": - optional: true - checksum: 029c2e7628271f5bb7ab4688adc14dcb3a6d13c00a2e1404f96f8a81188c51573d116e4c869b55faae54979afe319e4121404b956487784d52b5fd4a4c59bf26 - languageName: node - linkType: hard - "@polkadot/rpc-provider@npm:14.3.1, @polkadot/rpc-provider@npm:^14.3.1": version: 14.3.1 resolution: "@polkadot/rpc-provider@npm:14.3.1" @@ -5987,18 +5847,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/types-augment@npm:12.4.2": - version: 12.4.2 - resolution: "@polkadot/types-augment@npm:12.4.2" - dependencies: - "@polkadot/types": 12.4.2 - "@polkadot/types-codec": 12.4.2 - "@polkadot/util": ^13.0.2 - tslib: ^2.6.3 - checksum: 15c0d82e190e97dd91df068d3cd9717364fbdfb1c8f3f873ff5c9156b76ee0ae78550d935dd2f4cf7e47d477e7132575d1154c27f3eccb78676e001fea9945c1 - languageName: node - linkType: hard - "@polkadot/types-augment@npm:14.3.1": version: 14.3.1 resolution: "@polkadot/types-augment@npm:14.3.1" @@ -6080,17 +5928,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/types-codec@npm:12.4.2": - version: 12.4.2 - resolution: "@polkadot/types-codec@npm:12.4.2" - dependencies: - "@polkadot/util": ^13.0.2 - "@polkadot/x-bigint": ^13.0.2 - tslib: ^2.6.3 - checksum: d5357e70c1e48a3e34bfffdbc1c88d59fa014c984bcdb09fa61153ed0afe96908852c235112b215b26e4ff8cd86e7167fad8a73a57cc6da473ef5d0e214ee8ec - languageName: node - linkType: hard - "@polkadot/types-codec@npm:14.3.1": version: 14.3.1 resolution: "@polkadot/types-codec@npm:14.3.1" @@ -6167,17 +6004,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/types-create@npm:12.4.2": - version: 12.4.2 - resolution: "@polkadot/types-create@npm:12.4.2" - dependencies: - "@polkadot/types-codec": 12.4.2 - "@polkadot/util": ^13.0.2 - tslib: ^2.6.3 - checksum: 44b2491a1feaba192f818e9ab3ace507e8c6d155f5451f3324342edee1bd2a21b65020a41c4e258ce4900c7209d7dffe7f31b1a9425dad44a26d7f28fe8480a5 - languageName: node - linkType: hard - "@polkadot/types-create@npm:14.3.1": version: 14.3.1 resolution: "@polkadot/types-create@npm:14.3.1" @@ -6264,20 +6090,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/types-known@npm:12.4.2": - version: 12.4.2 - resolution: "@polkadot/types-known@npm:12.4.2" - dependencies: - "@polkadot/networks": ^13.0.2 - "@polkadot/types": 12.4.2 - "@polkadot/types-codec": 12.4.2 - "@polkadot/types-create": 12.4.2 - "@polkadot/util": ^13.0.2 - tslib: ^2.6.3 - checksum: 9410347693b1c14d8a1fa52e3a633b1345ceae34ca6e63f86dd87666bf752da47dff7f8aa60f249d640151025034078cf837c18929ac0d72d626159c045a1a02 - languageName: node - linkType: hard - "@polkadot/types-known@npm:14.3.1": version: 14.3.1 resolution: "@polkadot/types-known@npm:14.3.1" @@ -6388,16 +6200,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/types-support@npm:12.4.2": - version: 12.4.2 - resolution: "@polkadot/types-support@npm:12.4.2" - dependencies: - "@polkadot/util": ^13.0.2 - tslib: ^2.6.3 - checksum: 77b96fa39717fbe0104b995a95b90e51e849f151de8d922e75f03a99c1b60aa1ee65029832b16e791692b4f3c17668ad8777fb6d2ce3f6019ca9aa01ba2135b0 - languageName: node - linkType: hard - "@polkadot/types-support@npm:14.3.1": version: 14.3.1 resolution: "@polkadot/types-support@npm:14.3.1" @@ -6486,22 +6288,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/types@npm:12.4.2, @polkadot/types@npm:^12.2.1": - version: 12.4.2 - resolution: "@polkadot/types@npm:12.4.2" - dependencies: - "@polkadot/keyring": ^13.0.2 - "@polkadot/types-augment": 12.4.2 - "@polkadot/types-codec": 12.4.2 - "@polkadot/types-create": 12.4.2 - "@polkadot/util": ^13.0.2 - "@polkadot/util-crypto": ^13.0.2 - rxjs: ^7.8.1 - tslib: ^2.6.3 - checksum: 7916d6ce73bc36e03582113114df01677f0cbfb780349d630f0da7a3413da42dbf9e9d5c97abdfb1918d67f6954c06ea3380cb162297c26503aa18b220ecec9d - languageName: node - linkType: hard - "@polkadot/types@npm:14.3.1, @polkadot/types@npm:^14.3.1": version: 14.3.1 resolution: "@polkadot/types@npm:14.3.1" @@ -7306,7 +7092,7 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-bigint@npm:13.2.3, @polkadot/x-bigint@npm:^13.0.2, @polkadot/x-bigint@npm:^13.2.3": +"@polkadot/x-bigint@npm:13.2.3, @polkadot/x-bigint@npm:^13.2.3": version: 13.2.3 resolution: "@polkadot/x-bigint@npm:13.2.3" dependencies: @@ -7349,7 +7135,7 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-fetch@npm:^13.0.2, @polkadot/x-fetch@npm:^13.2.3": +"@polkadot/x-fetch@npm:^13.2.3": version: 13.2.3 resolution: "@polkadot/x-fetch@npm:13.2.3" dependencies: @@ -7399,7 +7185,7 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-global@npm:13.2.3, @polkadot/x-global@npm:^13.0.2, @polkadot/x-global@npm:^13.2.3": +"@polkadot/x-global@npm:13.2.3, @polkadot/x-global@npm:^13.2.3": version: 13.2.3 resolution: "@polkadot/x-global@npm:13.2.3" dependencies: @@ -7687,7 +7473,7 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-ws@npm:^13.0.2, @polkadot/x-ws@npm:^13.2.3": +"@polkadot/x-ws@npm:^13.2.3": version: 13.2.3 resolution: "@polkadot/x-ws@npm:13.2.3" dependencies: @@ -7763,21 +7549,21 @@ __metadata: languageName: node linkType: hard -"@polkagate/extension-dapp@file:../../../polkadot-js-extension/packages/extension-dapp/build::locator=polkamask_dapp%40workspace%3Apackages%2Fdapp": - version: 0.50.2-1-x - resolution: "@polkagate/extension-dapp@file:../../../polkadot-js-extension/packages/extension-dapp/build#../../../polkadot-js-extension/packages/extension-dapp/build::hash=6f58d1&locator=polkamask_dapp%40workspace%3Apackages%2Fdapp" +"@polkagate/extension-dapp@npm:^0.48.2": + version: 0.48.2 + resolution: "@polkagate/extension-dapp@npm:0.48.2" dependencies: "@metamask/utils": ^9.0.0 - "@polkadot/extension-inject": 0.50.1 - "@polkadot/types": ^12.2.1 - "@polkadot/util": ^13.0.2 - "@polkadot/util-crypto": ^13.0.2 + "@polkadot/extension-inject": 0.48.2 + "@polkadot/types": 12.1.1 + "@polkadot/util": ^12.6.2 + "@polkadot/util-crypto": ^12.6.2 tslib: ^2.6.2 peerDependencies: "@polkadot/api": "*" "@polkadot/util": "*" "@polkadot/util-crypto": "*" - checksum: adb24513107d016c1006549001da5289bf560dba0fa639f99f4bdddf2a8bb410e379c907e8b8d711b17fe0b185789fd5b73a272b917e5b0a48dd3f993ef3ec59 + checksum: 94be1e09fcd665df1286f7f65c7cf71b6cf01a677e877ad3523e34cca0514915f12c18d0aac7ccecef621852863393182f256c1e183384d1097d1ce078d426b7 languageName: node linkType: hard @@ -19147,7 +18933,7 @@ __metadata: languageName: node linkType: hard -"nock@npm:^13.5.4, nock@npm:^13.5.5": +"nock@npm:^13.5.5": version: 13.5.6 resolution: "nock@npm:13.5.6" dependencies: @@ -20064,7 +19850,7 @@ __metadata: "@polkadot/api-derive": ^12.1.1 "@polkadot/apps-config": ^0.141.1 "@polkadot/extension-inject": ^0.48.2 - "@polkagate/extension-dapp": ../../../polkadot-js-extension/packages/extension-dapp/build + "@polkagate/extension-dapp": ^0.48.2 "@testing-library/jest-dom": ^5.17.0 "@testing-library/react": ^13.4.0 "@testing-library/user-event": ^13.5.0 @@ -24056,7 +23842,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.6.3, tslib@npm:^2.7.0, tslib@npm:^2.8.0, tslib@npm:^2.8.1": +"tslib@npm:^2.7.0, tslib@npm:^2.8.0, tslib@npm:^2.8.1": version: 2.8.1 resolution: "tslib@npm:2.8.1" checksum: e4aba30e632b8c8902b47587fd13345e2827fa639e7c3121074d5ee0880723282411a8838f830b55100cbe4517672f84a2472667d355b81e8af165a55dc6203a