From 58539146a41a4f4a6fee71a8808a1ec632b7aa9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Fri, 10 Jun 2022 19:34:17 +0200 Subject: [PATCH] TypeScript: ChatPanes, CryptoDonate, utils/ethereum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../features/chats/components/chat_panes.js | 127 ---------------- .../features/chats/components/chat_panes.tsx | 108 ++++++++++++++ .../crypto_donate/utils/manifest_map.js | 12 -- .../crypto_donate/utils/manifest_map.ts | 11 ++ app/soapbox/utils/ethereum.js | 26 ---- app/soapbox/utils/ethereum.ts | 28 ++++ package.json | 1 + yarn.lock | 140 +++++++++++++++++- 8 files changed, 286 insertions(+), 167 deletions(-) delete mode 100644 app/soapbox/features/chats/components/chat_panes.js create mode 100644 app/soapbox/features/chats/components/chat_panes.tsx delete mode 100644 app/soapbox/features/crypto_donate/utils/manifest_map.js create mode 100644 app/soapbox/features/crypto_donate/utils/manifest_map.ts delete mode 100644 app/soapbox/utils/ethereum.js create mode 100644 app/soapbox/utils/ethereum.ts diff --git a/app/soapbox/features/chats/components/chat_panes.js b/app/soapbox/features/chats/components/chat_panes.js deleted file mode 100644 index 74647c98c..000000000 --- a/app/soapbox/features/chats/components/chat_panes.js +++ /dev/null @@ -1,127 +0,0 @@ -import { List as ImmutableList } from 'immutable'; -import PropTypes from 'prop-types'; -import React from 'react'; -import ImmutablePropTypes from 'react-immutable-proptypes'; -import ImmutablePureComponent from 'react-immutable-pure-component'; -import { injectIntl, defineMessages, FormattedMessage } from 'react-intl'; -import { connect } from 'react-redux'; -import { withRouter } from 'react-router-dom'; -import { createSelector } from 'reselect'; - -import { openChat, launchChat, toggleMainWindow } from 'soapbox/actions/chats'; -import { getSettings } from 'soapbox/actions/settings'; -import AccountSearch from 'soapbox/components/account_search'; -import { Counter } from 'soapbox/components/ui'; -import AudioToggle from 'soapbox/features/chats/components/audio_toggle'; - -import ChatList from './chat_list'; -import ChatWindow from './chat_window'; - -const messages = defineMessages({ - searchPlaceholder: { id: 'chats.search_placeholder', defaultMessage: 'Start a chat with…' }, -}); - -const getChatsUnreadCount = state => { - const chats = state.getIn(['chats', 'items']); - return chats.reduce((acc, curr) => acc + Math.min(curr.get('unread', 0), 1), 0); -}; - -// Filter out invalid chats -const normalizePanes = (chats, panes = ImmutableList()) => ( - panes.filter(pane => chats.get(pane.get('chat_id'))) -); - -const makeNormalizeChatPanes = () => createSelector([ - state => state.getIn(['chats', 'items']), - state => getSettings(state).getIn(['chats', 'panes']), -], normalizePanes); - -const makeMapStateToProps = () => { - const mapStateToProps = state => { - const normalizeChatPanes = makeNormalizeChatPanes(); - - return { - panes: normalizeChatPanes(state), - mainWindowState: getSettings(state).getIn(['chats', 'mainWindow']), - unreadCount: getChatsUnreadCount(state), - }; - }; - - return mapStateToProps; -}; - -export default @connect(makeMapStateToProps) -@injectIntl -@withRouter -class ChatPanes extends ImmutablePureComponent { - - static propTypes = { - intl: PropTypes.object.isRequired, - dispatch: PropTypes.func.isRequired, - mainWindowState: PropTypes.string, - panes: ImmutablePropTypes.list, - history: PropTypes.object, - } - - handleClickChat = (chat) => { - this.props.dispatch(openChat(chat.get('id'))); - } - - handleSuggestion = accountId => { - this.props.dispatch(launchChat(accountId, this.props.history)); - } - - handleMainWindowToggle = () => { - this.props.dispatch(toggleMainWindow()); - } - - render() { - const { intl, panes, mainWindowState, unreadCount } = this.props; - const open = mainWindowState === 'open'; - - const mainWindowPane = ( -
-
- {unreadCount > 0 && ( -
- -
- )} - - -
-
- {open && ( - <> - - - - )} -
-
- ); - - return ( -
- {mainWindowPane} - {panes.map((pane, i) => ( - - ))} -
- ); - } - -} diff --git a/app/soapbox/features/chats/components/chat_panes.tsx b/app/soapbox/features/chats/components/chat_panes.tsx new file mode 100644 index 000000000..fa701a8a2 --- /dev/null +++ b/app/soapbox/features/chats/components/chat_panes.tsx @@ -0,0 +1,108 @@ +import { List as ImmutableList, Map as ImmutableMap } from 'immutable'; +import React from 'react'; +import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; +import { useHistory } from 'react-router-dom'; +import { createSelector } from 'reselect'; + +import { openChat, launchChat, toggleMainWindow } from 'soapbox/actions/chats'; +import { getSettings } from 'soapbox/actions/settings'; +import AccountSearch from 'soapbox/components/account_search'; +import { Counter } from 'soapbox/components/ui'; +import AudioToggle from 'soapbox/features/chats/components/audio_toggle'; +import { useAppDispatch, useAppSelector, useSettings } from 'soapbox/hooks'; +import { RootState } from 'soapbox/store'; +import { Chat } from 'soapbox/types/entities'; + +import ChatList from './chat_list'; +import ChatWindow from './chat_window'; + +const messages = defineMessages({ + searchPlaceholder: { id: 'chats.search_placeholder', defaultMessage: 'Start a chat with…' }, +}); + +const getChatsUnreadCount = (state: RootState) => { + const chats = state.chats.items; + return chats.reduce((acc, curr) => acc + Math.min(curr.get('unread', 0), 1), 0); +}; + +// Filter out invalid chats +const normalizePanes = (chats: Immutable.Map, panes = ImmutableList>()) => ( + panes.filter(pane => chats.get(pane.get('chat_id'))) +); + +const makeNormalizeChatPanes = () => createSelector([ + (state: RootState) => state.chats.items, + (state: RootState) => getSettings(state).getIn(['chats', 'panes']) as any, +], normalizePanes); + +const normalizeChatPanes = makeNormalizeChatPanes(); + +const ChatPanes = () => { + const intl = useIntl(); + const dispatch = useAppDispatch(); + const history = useHistory(); + + const panes = useAppSelector((state) => normalizeChatPanes(state)); + const mainWindowState = useSettings().getIn(['chats', 'mainWindow']); + const unreadCount = useAppSelector((state) => getChatsUnreadCount(state)); + + const handleClickChat = ((chat: Chat) => { + dispatch(openChat(chat.id)); + }); + + const handleSuggestion = (accountId: string) => { + dispatch(launchChat(accountId, history)); + }; + + const handleMainWindowToggle = () => { + dispatch(toggleMainWindow()); + }; + + const open = mainWindowState === 'open'; + + const mainWindowPane = ( +
+
+ {unreadCount > 0 && ( +
+ +
+ )} + + +
+
+ {open && ( + <> + + + + )} +
+
+ ); + + return ( +
+ {mainWindowPane} + {panes.map((pane, i) => ( + + ))} +
+ ); +}; + +export default ChatPanes; diff --git a/app/soapbox/features/crypto_donate/utils/manifest_map.js b/app/soapbox/features/crypto_donate/utils/manifest_map.js deleted file mode 100644 index bab27695f..000000000 --- a/app/soapbox/features/crypto_donate/utils/manifest_map.js +++ /dev/null @@ -1,12 +0,0 @@ -// @preval -// Converts cryptocurrency-icon's manifest file from a list to a map. -// See: https://github.com/spothq/cryptocurrency-icons/blob/master/manifest.json - -const manifest = require('cryptocurrency-icons/manifest.json'); -const { Map: ImmutableMap, fromJS } = require('immutable'); - -const manifestMap = fromJS(manifest).reduce((acc, entry) => { - return acc.set(entry.get('symbol').toLowerCase(), entry); -}, ImmutableMap()); - -module.exports = manifestMap.toJS(); diff --git a/app/soapbox/features/crypto_donate/utils/manifest_map.ts b/app/soapbox/features/crypto_donate/utils/manifest_map.ts new file mode 100644 index 000000000..b89ba6ef2 --- /dev/null +++ b/app/soapbox/features/crypto_donate/utils/manifest_map.ts @@ -0,0 +1,11 @@ +// Converts cryptocurrency-icon's manifest file from a list to a map. +// See: https://github.com/spothq/cryptocurrency-icons/blob/master/manifest.json + +import manifest from 'cryptocurrency-icons/manifest.json'; +import { List as ImmutableList, Map as ImmutableMap, fromJS } from 'immutable'; + +const manifestMap = (fromJS(manifest) as ImmutableList>).reduce((acc: ImmutableMap>, entry: ImmutableMap) => { + return acc.set(entry.get('symbol')!.toLowerCase(), entry); +}, ImmutableMap()); + +export default manifestMap.toJS(); diff --git a/app/soapbox/utils/ethereum.js b/app/soapbox/utils/ethereum.js deleted file mode 100644 index 3bd8db7b1..000000000 --- a/app/soapbox/utils/ethereum.js +++ /dev/null @@ -1,26 +0,0 @@ -export const ethereum = () => window.ethereum; - -export const hasEthereum = () => Boolean(ethereum()); - -// Requests an Ethereum wallet from the browser -// Returns a Promise containing the Ethereum wallet address (string). -export const getWallet = () => { - return ethereum().request({ method: 'eth_requestAccounts' }) - .then(wallets => wallets[0]); -}; - -// Asks the browser to sign a message with Ethereum. -// Returns a Promise containing the signature (string). -export const signMessage = (wallet, message) => { - return ethereum().request({ method: 'personal_sign', params: [message, wallet] }); -}; - -// Combines the above functions. -// Returns an object with the `wallet` and `signature` -export const getWalletAndSign = message => { - return getWallet().then(wallet => { - return signMessage(wallet, message).then(signature => { - return { wallet, signature }; - }); - }); -}; diff --git a/app/soapbox/utils/ethereum.ts b/app/soapbox/utils/ethereum.ts new file mode 100644 index 000000000..63dace72d --- /dev/null +++ b/app/soapbox/utils/ethereum.ts @@ -0,0 +1,28 @@ +import type { MetaMaskInpageProvider } from '@metamask/providers'; + +export const ethereum: () => MetaMaskInpageProvider | undefined = () => (window as any).ethereum; + +export const hasEthereum = () => Boolean(ethereum()); + +// Requests an Ethereum wallet from the browser +// Returns a Promise containing the Ethereum wallet address (string). +export const getWallet: () => Promise = () => { + return ethereum()!.request({ method: 'eth_requestAccounts' }) + .then((wallets) => (wallets as Array)[0]); +}; + +// Asks the browser to sign a message with Ethereum. +// Returns a Promise containing the signature (string). +export const signMessage = (wallet: string, message: string) => { + return ethereum()!.request({ method: 'personal_sign', params: [message, wallet] }); +}; + +// Combines the above functions. +// Returns an object with the `wallet` and `signature` +export const getWalletAndSign = (message: string) => { + return getWallet().then(wallet => { + return signMessage(wallet, message).then(signature => { + return { wallet, signature }; + }); + }); +}; diff --git a/package.json b/package.json index 4399a14f2..dbced84ea 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "@gamestdio/websocket": "^0.3.2", "@jest/globals": "^27.5.1", "@lcdp/offline-plugin": "^5.1.0", + "@metamask/providers": "^9.0.0", "@popperjs/core": "^2.4.4", "@reach/menu-button": "^0.16.2", "@reach/popover": "^0.16.2", diff --git a/yarn.lock b/yarn.lock index 16cba47d9..fbdd06355 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1848,6 +1848,38 @@ resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b" integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A== +"@metamask/object-multiplex@^1.1.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@metamask/object-multiplex/-/object-multiplex-1.2.0.tgz#38fc15c142f61939391e1b9a8eed679696c7e4f4" + integrity sha512-hksV602d3NWE2Q30Mf2Np1WfVKaGqfJRy9vpHAmelbaD0OkDt06/0KQkRR6UVYdMbTbkuEu8xN5JDUU80inGwQ== + dependencies: + end-of-stream "^1.4.4" + once "^1.4.0" + readable-stream "^2.3.3" + +"@metamask/providers@^9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@metamask/providers/-/providers-9.0.0.tgz#644684f9eceb952138e80afb9103c7e39d8350fe" + integrity sha512-9qUkaFafZUROK0CAUBqjsut+7mqKOXFhBCpAhAPVRBqj5TfUTdPI4t8S7GYzPVaDbC7M6kH/YLNCgcfaFWAS+w== + dependencies: + "@metamask/object-multiplex" "^1.1.0" + "@metamask/safe-event-emitter" "^2.0.0" + "@types/chrome" "^0.0.136" + detect-browser "^5.2.0" + eth-rpc-errors "^4.0.2" + extension-port-stream "^2.0.1" + fast-deep-equal "^2.0.1" + is-stream "^2.0.0" + json-rpc-engine "^6.1.0" + json-rpc-middleware-stream "^3.0.0" + pump "^3.0.0" + webextension-polyfill-ts "^0.25.0" + +"@metamask/safe-event-emitter@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@metamask/safe-event-emitter/-/safe-event-emitter-2.0.0.tgz#af577b477c683fad17c619a78208cede06f9605c" + integrity sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -2252,6 +2284,14 @@ dependencies: "@types/node" "*" +"@types/chrome@^0.0.136": + version "0.0.136" + resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.136.tgz#7c011b9f997b0156f25a140188a0c5689d3f368f" + integrity sha512-XDEiRhLkMd+SB7Iw3ZUIj/fov3wLd4HyTdLltVszkgl1dBfc3Rb7oPMVZ2Mz2TLqnF7Ow+StbR8E7r9lqpb4DA== + dependencies: + "@types/filesystem" "*" + "@types/har-format" "*" + "@types/connect-history-api-fallback@^1.3.5": version "1.3.5" resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz#d1f7a8a09d0ed5a57aee5ae9c18ab9b803205dae" @@ -2317,6 +2357,18 @@ "@types/qs" "*" "@types/serve-static" "*" +"@types/filesystem@*": + version "0.0.32" + resolved "https://registry.yarnpkg.com/@types/filesystem/-/filesystem-0.0.32.tgz#307df7cc084a2293c3c1a31151b178063e0a8edf" + integrity sha512-Yuf4jR5YYMR2DVgwuCiP11s0xuVRyPKmz8vo6HBY3CGdeMj8af93CFZX+T82+VD1+UqHOxTq31lO7MI7lepBtQ== + dependencies: + "@types/filewriter" "*" + +"@types/filewriter@*": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/filewriter/-/filewriter-0.0.29.tgz#a48795ecadf957f6c0d10e0c34af86c098fa5bee" + integrity sha512-BsPXH/irW0ht0Ji6iw/jJaK8Lj3FJemon2gvEqHKpCdDCeemHa+rI3WBGq5z7cDMZgoLjY40oninGxqk+8NzNQ== + "@types/fs-extra@^9.0.1": version "9.0.13" resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.13.tgz#7594fbae04fe7f1918ce8b3d213f74ff44ac1f45" @@ -2331,6 +2383,11 @@ dependencies: "@types/node" "*" +"@types/har-format@*": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@types/har-format/-/har-format-1.2.8.tgz#e6908b76d4c88be3db642846bb8b455f0bfb1c4e" + integrity sha512-OP6L9VuZNdskgNN3zFQQ54ceYD8OLq5IbqO4VK91ORLfOm7WdT/CiT/pHEBSQEqCInJ2y3O6iCm/zGtPElpgJQ== + "@types/history@^4.7.11": version "4.7.11" resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.11.tgz#56588b17ae8f50c53983a524fc3cc47437969d64" @@ -4480,6 +4537,11 @@ destroy@1.2.0: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== +detect-browser@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/detect-browser/-/detect-browser-5.3.0.tgz#9705ef2bddf46072d0f7265a1fe300e36fe7ceca" + integrity sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w== + detect-it@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/detect-it/-/detect-it-4.0.1.tgz#3f8de6b8330f5086270571251bedf10aec049e18" @@ -4742,6 +4804,13 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= +end-of-stream@^1.1.0, end-of-stream@^1.4.4: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + enhanced-resolve@^5.0.0: version "5.9.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.9.0.tgz#49ac24953ac8452ed8fed2ef1340fc8e043667ee" @@ -5149,6 +5218,13 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= +eth-rpc-errors@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/eth-rpc-errors/-/eth-rpc-errors-4.0.3.tgz#6ddb6190a4bf360afda82790bb7d9d5e724f423a" + integrity sha512-Z3ymjopaoft7JDoxZcEb3pwdGh7yiYMhOwm2doUt6ASXlMavpNlK6Cre0+IMl2VSGyEU9rkiperQhp5iRxn5Pg== + dependencies: + fast-safe-stringify "^2.0.6" + eventemitter3@^4.0.0: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" @@ -5255,6 +5331,13 @@ extend@^3.0.0: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== +extension-port-stream@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extension-port-stream/-/extension-port-stream-2.0.1.tgz#d374820c581418c2275d3c4439ade0b82c4cfac6" + integrity sha512-ltrv4Dh/979I04+D4Te6TFygfRSOc5EBzzlHRldWMS8v73V80qWluxH88hqF0qyUsBXTb8NmzlmSipcre6a+rg== + dependencies: + webextension-polyfill-ts "^0.22.0" + fake-indexeddb@^3.1.7: version "3.1.7" resolved "https://registry.yarnpkg.com/fake-indexeddb/-/fake-indexeddb-3.1.7.tgz#d9efbeade113c15efbe862e4598a4b0a1797ed9f" @@ -5262,6 +5345,11 @@ fake-indexeddb@^3.1.7: dependencies: realistic-structured-clone "^2.0.1" +fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + integrity sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w== + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -5299,6 +5387,11 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= +fast-safe-stringify@^2.0.6: + version "2.1.1" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" + integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== + fastest-levenshtein@^1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2" @@ -7052,6 +7145,22 @@ json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== +json-rpc-engine@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/json-rpc-engine/-/json-rpc-engine-6.1.0.tgz#bf5ff7d029e1c1bf20cb6c0e9f348dcd8be5a393" + integrity sha512-NEdLrtrq1jUZyfjkr9OCz9EzCNhnRyWtt1PAnvnhwy6e8XETS0Dtc+ZNCO2gvuAoKsIn2+vCSowXTYE4CkgnAQ== + dependencies: + "@metamask/safe-event-emitter" "^2.0.0" + eth-rpc-errors "^4.0.2" + +json-rpc-middleware-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/json-rpc-middleware-stream/-/json-rpc-middleware-stream-3.0.0.tgz#8540331d884f36b9e0ad31054cc68ac6b5a89b52" + integrity sha512-JmZmlehE0xF3swwORpLHny/GvW3MZxCsb2uFNBrn8TOqMqivzCfz232NSDLLOtIQlrPlgyEjiYpyzyOPFOzClw== + dependencies: + "@metamask/safe-event-emitter" "^2.0.0" + readable-stream "^2.3.3" + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -8000,7 +8109,7 @@ on-headers@~1.0.2: resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== -once@^1.3.0: +once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= @@ -8738,6 +8847,14 @@ psl@^1.1.33: resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -9166,7 +9283,7 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -readable-stream@^2.0.1: +readable-stream@^2.0.1, readable-stream@^2.3.3: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -10876,6 +10993,25 @@ wbuf@^1.1.0, wbuf@^1.7.3: dependencies: minimalistic-assert "^1.0.0" +webextension-polyfill-ts@^0.22.0: + version "0.22.0" + resolved "https://registry.yarnpkg.com/webextension-polyfill-ts/-/webextension-polyfill-ts-0.22.0.tgz#86cfd7bab4d9d779d98c8340983f4b691b2343f3" + integrity sha512-3P33ClMwZ/qiAT7UH1ROrkRC1KM78umlnPpRhdC/292UyoTTW9NcjJEqDsv83HbibcTB6qCtpVeuB2q2/oniHQ== + dependencies: + webextension-polyfill "^0.7.0" + +webextension-polyfill-ts@^0.25.0: + version "0.25.0" + resolved "https://registry.yarnpkg.com/webextension-polyfill-ts/-/webextension-polyfill-ts-0.25.0.tgz#fff041626365dbd0e29c40b197e989a55ec221ca" + integrity sha512-ikQhwwHYkpBu00pFaUzIKY26I6L87DeRI+Q6jBT1daZUNuu8dSrg5U9l/ZbqdaQ1M/TTSPKeAa3kolP5liuedw== + dependencies: + webextension-polyfill "^0.7.0" + +webextension-polyfill@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/webextension-polyfill/-/webextension-polyfill-0.7.0.tgz#0df1120ff0266056319ce1a622b09ad8d4a56505" + integrity sha512-su48BkMLxqzTTvPSE1eWxKToPS2Tv5DLGxKexLEVpwFd6Po6N8hhSLIvG6acPAg7qERoEaDL+Y5HQJeJeml5Aw== + webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"