diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..0cd66705 --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +WALLET_CONNECT_PROJECT_ID="Go to WalletConnect and get project ID" diff --git a/.github/actions/create-env-file/action.yml b/.github/actions/create-env-file/action.yml new file mode 100644 index 00000000..7cd76055 --- /dev/null +++ b/.github/actions/create-env-file/action.yml @@ -0,0 +1,17 @@ +name: "Create Env File" + +description: "Creates an .env file" + +inputs: + walletconnect_project_id: + description: "WalletConnect project ID" + required: true + +runs: + using: "composite" + steps: + - name: "📝 Create .env file" + run: | + rm -f .env + echo "WALLET_CONNECT_PROJECT_ID=${{ inputs.walletconnect_project_id }}" >> .env + shell: bash diff --git a/.github/workflows/pull_request_checks.yml b/.github/workflows/pull_request_checks.yml index a61be18d..01ba3b77 100644 --- a/.github/workflows/pull_request_checks.yml +++ b/.github/workflows/pull_request_checks.yml @@ -4,6 +4,10 @@ on: pull_request: jobs: + ## + # install + ## + install: name: "Install" runs-on: ubuntu-latest @@ -14,7 +18,7 @@ jobs: uses: ./.github/actions/use-dependencies ## - # needs install + # lint, build and test ## lint: @@ -29,8 +33,31 @@ jobs: - name: "👕 Lint" run: yarn lint - build: - name: "Build" + build_chrome: + name: "Build Chrome" + needs: install + runs-on: ubuntu-latest + steps: + - name: "🛎 Checkout" + uses: actions/checkout@v3 + - name: "🔧 Setup" + uses: ./.github/actions/use-dependencies + - name: "📝 Create .env file" + uses: ./.github/actions/create-env-file + with: + walletconnect_project_id: ${{ secrets.DEVELOPMENT_WALLETCONNECT_PROJECT_ID }} + - name: "🏗️ Build" + run: yarn build:chrome + - name: "🗜️ Zip build" + run: zip -qr chrome_build.zip .chrome_build/ + - name: "📤 Upload build" + uses: actions/upload-artifact@v3 + with: + name: chrome_build + path: chrome_build.zip + + build_firefox: + name: "Build Firefox" needs: install runs-on: ubuntu-latest steps: @@ -38,15 +65,19 @@ jobs: uses: actions/checkout@v3 - name: "🔧 Setup" uses: ./.github/actions/use-dependencies + - name: "📝 Create .env file" + uses: ./.github/actions/create-env-file + with: + walletconnect_project_id: ${{ secrets.DEVELOPMENT_WALLETCONNECT_PROJECT_ID }} - name: "🏗️ Build" - run: yarn build + run: yarn build:firefox - name: "🗜️ Zip build" - run: zip -r build.zip .build/ + run: zip -qr firefox_build.zip .firefox_build/ - name: "📤 Upload build" uses: actions/upload-artifact@v3 with: - name: build - path: build.zip + name: firefox_build + path: firefox_build.zip test: name: "Test" @@ -61,12 +92,12 @@ jobs: run: yarn test ## - # needs [install, build] + # build validation ## validate_firefox: name: "Validate Firefox" - needs: [install, build] + needs: [install, build_firefox] runs-on: ubuntu-latest steps: - name: "🛎 Checkout" @@ -76,14 +107,14 @@ jobs: - name: "📥 Download build" uses: actions/download-artifact@v3 with: - name: build + name: firefox_build - name: "🗜️ Unzip build" - run: unzip build.zip + run: unzip -q firefox_build.zip - name: "✅ Validate" run: yarn validate:firefox ## - # needs validate_firefox + # clean up ## clean_up: @@ -96,4 +127,5 @@ jobs: with: failOnError: false name: | - build + chrome_build + firefox_build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5d86d45a..f813756e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,20 +7,100 @@ on: - main jobs: + ## + # install + ## + + install: + name: "Install" + runs-on: ubuntu-latest + steps: + - name: "🛎 Checkout" + uses: actions/checkout@v3 + - name: "🔧 Setup" + uses: ./.github/actions/use-dependencies + + ## + # package + ## + + build_chrome: + name: "Build Chrome" + needs: install + runs-on: ubuntu-latest + steps: + - name: "🛎 Checkout" + uses: actions/checkout@v3 + - name: "🔧 Setup" + uses: ./.github/actions/use-dependencies + - name: "📝 Create .env file" + uses: ./.github/actions/create-env-file + with: + walletconnect_project_id: ${{ secrets.PRODUCTION_WALLETCONNECT_PROJECT_ID }} + - name: "🏗️ Build" + run: yarn build:chrome + - name: "🗜️ Zip build" + run: zip -qr chrome_build.zip .chrome_build/ + - name: "📤 Upload build" + uses: actions/upload-artifact@v3 + with: + name: chrome_build + path: chrome_build.zip + + build_firefox: + name: "Build Firefox" + needs: install + runs-on: ubuntu-latest + steps: + - name: "🛎 Checkout" + uses: actions/checkout@v3 + - name: "🔧 Setup" + uses: ./.github/actions/use-dependencies + - name: "📝 Create .env file" + uses: ./.github/actions/create-env-file + with: + walletconnect_project_id: ${{ secrets.PRODUCTION_WALLETCONNECT_PROJECT_ID }} + - name: "🏗️ Build" + run: yarn build:firefox + - name: "🗜️ Zip build" + run: zip -qr firefox_build.zip .firefox_build/ + - name: "📤 Upload build" + uses: actions/upload-artifact@v3 + with: + name: firefox_build + path: firefox_build.zip + + ## + # release + ## + release: name: "Release" + needs: [install, build_chrome, build_firefox] runs-on: ubuntu-latest steps: - name: "🛎 Checkout" uses: actions/checkout@v3 - name: "🔧 Setup" - uses: actions/setup-node@v3 + uses: ./.github/actions/use-dependencies + # download & package chrome build + - name: "📥 Download Chrome build" + uses: actions/download-artifact@v3 with: - node-version: 'lts/*' - - name: "📦 Install" - run: yarn install --ignore-scripts - - name: "🏗️ Build" - run: yarn build + name: chrome_build + - name: "🗜️ Unzip Chrome build" + run: unzip -q chrome_build.zip + - name: "📦 Package Chrome build" + run: yarn package:chrome + # download & package firefox build + - name: "📥 Download Firefox build" + uses: actions/download-artifact@v3 + with: + name: firefox_build + - name: "🗜️ Unzip Firefox build" + run: unzip -q firefox_build.zip + - name: "📦 Package Firefox build" + run: yarn package:firefox - name: "🔖 Release" env: # appears on the release commits @@ -31,3 +111,20 @@ jobs: # used to push the release commit and create the tags GITHUB_TOKEN: ${{ secrets.WRITE_REPOS_TOKEN }} run: yarn semantic-release + + ## + # clean up + ## + + clean_up: + name: "Clean Up" + needs: release + runs-on: ubuntu-latest + steps: + - name: "🗑️ Delete artifacts" + uses: geekyeggo/delete-artifact@v2 + with: + failOnError: false + name: | + chrome_build + firefox_build diff --git a/.gitignore b/.gitignore index f1c57dd5..00cc003c 100644 --- a/.gitignore +++ b/.gitignore @@ -279,7 +279,11 @@ fabric.properties /coverage # intermediary directories -.build/ +.chrome/ +.chrome_build/ +.chrome_profile/ .dapp/ .firefox/ +.firefox_build/ .firefox_profile/ +.tmp/ diff --git a/.releaserc b/.releaserc index 2e8320a5..2d9e2ec7 100644 --- a/.releaserc +++ b/.releaserc @@ -8,14 +8,13 @@ [ "@semantic-release/exec", { - "prepareCmd": "./bin/update_manifest_version.sh ${nextRelease.version}", - "publishCmd": "yarn package" + "prepareCmd": "./bin/update_manifest_version.sh ${nextRelease.version}" } ], [ "@semantic-release/git", { - "assets": ["src/manifest.json", "package.json", "CHANGELOG.md"], + "assets": ["src/manifest.common.json", "package.json", "CHANGELOG.md"], "message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}" } ], diff --git a/README.md b/README.md index 1c875b2c..2ba0193d 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@

- - Build, lint and test + + Pull Request Checks Mozilla add-on @@ -18,7 +18,7 @@

- An Algorand wallet browser extension to sign data, send transactions and rekey with another account. + An AVM wallet in your browser that goes beyond just DeFi.

### Table of contents @@ -59,6 +59,7 @@ Coming soon... ### 3.1. Requirements * Install [Yarn v1.22.5+][yarn] +* Install [jq][jq] [Back to top ^][table-of-contents] @@ -69,16 +70,20 @@ Coming soon... $ yarn install ``` +> ⚠️ **NOTE:** a couple of post install scripts will run that will download and install Chrome and Firefox browser binaries at the project root. These binaries will be used for running development versions of the extension. + +2. In the newly created `.env` file, replace the environment values with the desired values. + [Back to top ^][table-of-contents] ### 3.3. Run * To run simply use: ```bash -$ yarn start +$ yarn start: ``` -This will bundle the Typescript source code and the add-on assets into a `build/` directory and once the build files have been bundled, Webpack will start the locally installed Firefox Developer Edition (located at [`./.firefox/`][local-firefox-dir]) with the local extension as a temporary add-on. +> ⚠️ **NOTE:** this command will bundle the TypeScript source code and extension assets into the `.build/` directory and depending on your intended target (you can choose '`chrome`' or '`firefox`') the corresponding browser will start up with the unpacked extension as a temporary extension. [Back to top ^][table-of-contents] @@ -86,13 +91,18 @@ This will bundle the Typescript source code and the add-on assets into a `build/ ### 4.1 Useful Commands -| Command | Description | -|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `yarn build` | Bundles the source code and the add-on assets in the `build/` directory. | -| `yarn package` | Packages the contents of the `build/` directory into a `.zip` file, ready for submission. See [use `web-ext`][use-web-ext]. | -| `yarn prettier` | Runs `prettier` with the same configuration that is run on the pre-commit hooks. | -| `yarn start` | Bundles the source code & the add-on assets, starts the Firefox Developer edition with the add-on installed. This will watch for changes in the source code and reload the extension. | -| `yarn start:firefox` | Starts up the local Firefox Developer edition and installs the local add-on as a temporary add-on. | +| Command | Description | +|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `yarn build:chrome` | Bundles the source code and Chrome specific assets into the `.chrome_build/` directory. | +| `yarn build:firefox` | Bundles the source code and Firefox specific assets into the `.firefox_build/` directory. | +| `yarn install:chrome` | Installs the latest version of Chrome For Testing browser to the project root. This removes the existing version if it exists. | +| `yarn install:firefox` | Installs the latest version of Firefox Developer Edition browser to the project root. This removes the existing version if it exists. | +| `yarn package:chrome` | Packages the contents of the `.chrome_build/` directory into a `kibisis-chrome-{version}.zip` file, ready for submission. | +| `yarn package:firefox` | Packages the contents of the `.firefox_build/` directory into a `kibisis-firefox-{version}.zip` file, ready for submission. | +| `yarn prettier` | Runs `prettier` with the same configuration that is run on the pre-commit hooks. | +| `yarn start:chrome` | Bundles the source code & the add-on assets, starts the local Chrome For Testing Developer edition with the add-on installed. This will watch for changes in the source code and reload the extension. | +| `yarn start:firefox` | Bundles the source code & the add-on assets, starts the local Firefox Developer edition with the add-on installed. This will watch for changes in the source code and reload the extension. | +| `yarn start:dapp` | Starts the example dApp at [http://localhost:8080](http://localhost:8080) | [Back to top ^][table-of-contents] @@ -110,8 +120,8 @@ Please refer to the [LICENSE][license] file. [contribute]: ./CONTRIBUTING.md +[jq]: https://github.com/jqlang/jq [license]: ./LICENSE -[local-firefox-dir]: ./.firefox [table-of-contents]: #table-of-contents [use-web-ext]: https://extensionworkshop.com/documentation/develop/getting-started-with-web-ext/#using-web-ext-section [yarn]: https://yarnpkg.com/ diff --git a/bin/install_chrome.sh b/bin/install_chrome.sh new file mode 100755 index 00000000..20e5ee10 --- /dev/null +++ b/bin/install_chrome.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash + +SCRIPT_DIR=$(dirname "${0}") + +source "${SCRIPT_DIR}"/set_vars.sh + +# Public: Downloads the latest version of Chrome Developer edition. +# +# Examples +# +# ./bin/install_chrome.sh +# +# Returns exit code 0 if Chrome was successfully installed, or exit code 1 if it is a mac. +function main() { + local chrome_dir + local download_url + local os_param + local tmp_dir + + set_vars + + chrome_dir="${PWD}/.chrome" + tmp_dir="${PWD}/.tmp" + + # remove any previous installations + rm -rf "${chrome_dir}" + + # determine which os package to download + if [[ "${OSTYPE}" == "darwin"* ]]; + then + os_param="mac-x64" + else + # now we have established linux, check if it is 64-bit + if [[ $(uname -m) == "x86_64" ]]; + then + os_param="linux64" + else + printf "%b 32-bit is not supported \n" "${ERROR_PREFIX}" + exit 1 + fi + fi + + if [[ -d "${tmp_dir}" ]]; + then + printf "%b deleting previous .tmp directory... \n" "${INFO_PREFIX}" + rm -rf "${tmp_dir}" + fi + + mkdir -p "${tmp_dir}" + + # get the download url + download_url=$(curl -s "https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json" | jq -r --arg os_param "${os_param}" '.channels.Dev.downloads.chrome[] | select(.platform==$os_param).url') + + # download the latest chrome dev edition + printf "%b downloading the latest version of chrome... \n" "${INFO_PREFIX}" + wget -O "${tmp_dir}/chrome.zip" "${download_url}" + + printf "%b unzipping chrome archive... \n" "${INFO_PREFIX}" + unzip -oq "${tmp_dir}/chrome.zip" -d "${tmp_dir}" + + mkdir -p "${chrome_dir}" + cp -r "${tmp_dir}/chrome-${os_param}/." "${chrome_dir}" + + # clean up + rm -rf "${tmp_dir}" +} + +# And so, it begins... +main diff --git a/bin/install_firefox.sh b/bin/install_firefox.sh index df0f68d2..6d18b3fc 100755 --- a/bin/install_firefox.sh +++ b/bin/install_firefox.sh @@ -21,11 +21,8 @@ function main() { firefox_dir="${PWD}/.firefox" tmp_dir="${PWD}/.tmp" - if [[ -d "${firefox_dir}" ]]; - then - printf "%b firefox already installed \n" "${INFO_PREFIX}" - exit 0 - fi + # remove any previous installations + rm -rf "${firefox_dir}" # determine which os package to download if [[ "${OSTYPE}" == "darwin"* ]]; diff --git a/bin/package.sh b/bin/package.sh new file mode 100755 index 00000000..80a55005 --- /dev/null +++ b/bin/package.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash + +SCRIPT_DIR=$(dirname "${0}") + +source "${SCRIPT_DIR}/set_vars.sh" + +# Public: Zips up the extension build. +# +# $1 - The browser target. +# +# Examples +# +# ./bin/package.sh "firefox" +# +# Returns exit code 0 if successfully packaged, or exit code 1 the target is not specified or invalid and if no build +# directory for the target was found. +function main() { + local build_dir + local dist_dir + local file_name + local name + local version + + set_vars + + if [ -z "${1}" ]; then + printf "%b no target specified, use: ./bin/package.sh [target] \n" "${ERROR_PREFIX}" + exit 1 + fi + + case "${1}" in + chrome) + build_dir="${PWD}/.chrome_build" + ;; + firefox) + build_dir="${PWD}/.firefox_build" + ;; + *) + printf "%b unknown target specified \"${1}\" \n" "${ERROR_PREFIX}" + exit 1 + ;; + esac + + # check if the build directory exists + if [ ! -d "${build_dir}" ]; then + printf "%b no ${1} build found \n" "${ERROR_PREFIX}" + exit 1 + fi + + dist_dir="${PWD}/dist" + + # extract the name and version from the manifest + name=$(jq -r '.name' "${build_dir}/manifest.json" | tr '[:upper:]' '[:lower:]') + version=$(jq -r '.version' "${build_dir}/manifest.json") + + # create the dist diretory if it does not exist + if [ ! -d "${dist_dir}" ]; then + printf "%b no \"dist\" directory found, creating a new one \n" "${INFO_PREFIX}" + + mkdir -p "${dist_dir}" + fi + + file_name="${name}-${1}-${version}.zip" + + # remove files (-f will suppress the error if the file does not exist) + rm -f "${dist_dir}/${file_name}" + + # zip up build directory + # shellcheck disable=SC2164 + (cd "${build_dir}"; zip -qr "${dist_dir}/${file_name}" ./*) + + printf "%b packaged ${1} build at \"${dist_dir}/${file_name}\" \n" "${INFO_PREFIX}" + + exit 0 +} + +# And so, it begins... +main "$1" diff --git a/bin/post_install.sh b/bin/post_install.sh new file mode 100755 index 00000000..0b5b86e6 --- /dev/null +++ b/bin/post_install.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +SCRIPT_DIR=$(dirname "${0}") + +source "${SCRIPT_DIR}/set_vars.sh" + +# Public: Convenience script that handles the post install steps: +# * install firefox browser +# * install chrome browser +# * create .env file +# +# Examples +# +# ./bin/post_install.sh +# +# Returns exit code 0. +function main() { + local chrome_dir + local firefox_dir + + set_vars + + chrome_dir="${PWD}/.chrome" + + # check if firefox is installed, if not, install it + if [[ -f "${chrome_dir}/chrome" ]]; then + printf "%b chrome already installed \n" "${INFO_PREFIX}" + else + "${SCRIPT_DIR}"/chrome_install.sh + fi + + firefox_dir="${PWD}/.firefox" + + # check if firefox is installed, if not, install it + if [[ -f "${firefox_dir}/firefox" ]]; then + printf "%b firefox already installed \n" "${INFO_PREFIX}" + else + "${SCRIPT_DIR}"/firefox_install.sh + fi + + # copy .env, if it doesn't exist + cp -n "${PWD}/.env.example" "${PWD}/.env" +} + +# And so, it begins... +main diff --git a/bin/update_manifest_version.sh b/bin/update_manifest_version.sh index d6190b7e..713788a3 100755 --- a/bin/update_manifest_version.sh +++ b/bin/update_manifest_version.sh @@ -2,9 +2,9 @@ SCRIPT_DIR=$(dirname "${0}") -source "${SCRIPT_DIR}"/set_vars.sh +source "${SCRIPT_DIR}/set_vars.sh" -# Public: Updates the src/manifest.json "version" with the release version. +# Public: Updates the src/manifest.common.json "version" with the release version. # # $1 - The version to bump. # @@ -17,7 +17,7 @@ function main { set_vars if [ -z "${1}" ]; then - printf "%b no version specified, use: ./bin/update_version.sh [version] \n" "${ERROR_PREFIX}" + printf "%b no version specified, use: ./bin/update_manifest_version.sh [version] \n" "${ERROR_PREFIX}" exit 1 fi @@ -27,8 +27,8 @@ function main { exit 1 fi - printf "%b updating manifest.json#version to version '%s' \n" "${INFO_PREFIX}" "${1}" - cat <<< $(jq --arg version "${1}" '.version = $version' src/manifest.json) > src/manifest.json + printf "%b updating manifest.common.json#version to version '%s' \n" "${INFO_PREFIX}" "${1}" + cat <<< $(jq --arg version "${1}" '.version = $version' src/manifest.common.json) > manifest.common.json exit 0 } diff --git a/dapp/App.tsx b/dapp/App.tsx index 645e0d04..06436740 100644 --- a/dapp/App.tsx +++ b/dapp/App.tsx @@ -33,14 +33,14 @@ import { SessionTypes } from '@walletconnect/types'; import { Web3ModalSign, useConnect } from '@web3modal/sign-react'; import React, { ChangeEvent, FC, useEffect, useState } from 'react'; -// Components +// components import Fonts from '@extension/components/Fonts'; import WalletConnectIcon from '@extension/components/WalletConnectIcon'; -// Config +// config import { networks } from '@extension/config'; -// Tabs +// tabs import ApplicationActionsTab from './ApplicationActionsTab'; import AssetActionsTab from './AssetActionsTab'; import AtomicTransactionActionsTab from './AtomicTransactionActionsTab'; @@ -49,15 +49,15 @@ import PaymentActionsTab from './PaymentActionsTab'; import SignDataTab from './SignDataTab'; import SignJwtTab from './SignJwtTab'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { IWindow } from '@external/types'; import { INetwork } from '@extension/types'; import { IAccountInformation } from './types'; -// Utils +// utils import { getAccountInformation } from './utils'; const App: FC = () => { @@ -67,12 +67,18 @@ const App: FC = () => { position: 'top', }); const { connect } = useConnect({ - requiredNamespaces: { + optionalNamespaces: { + // testnets algorand: { - chains: ['algorand:SGO1GKSzyE7IEPItTxCByw9x8FmnrCDe'], // testnet + chains: ['algorand:SGO1GKSzyE7IEPItTxCByw9x8FmnrCDe'], events: [], methods: ['algorand_signTransaction', 'algorand_signMessage'], }, + voi: { + chains: ['voi:xK6y2kD4Rnq9EYD1Ta1JTf56TBQTu2_z'], + events: [], + methods: ['voi_signTransaction', 'voi_signMessage'], + }, }, }); // states diff --git a/dapp/ApplicationActionsTab.tsx b/dapp/ApplicationActionsTab.tsx index ffddbfb8..986ba841 100644 --- a/dapp/ApplicationActionsTab.tsx +++ b/dapp/ApplicationActionsTab.tsx @@ -30,18 +30,18 @@ import { } from 'algosdk'; import React, { ChangeEvent, FC, useState } from 'react'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { INetwork } from '@extension/types'; import { IWindow } from '@external/types'; import { IAccountInformation } from './types'; -// Utils +// utils import { convertToStandardUnit } from '@common/utils'; import { createAppCallTransaction } from './utils'; diff --git a/dapp/AssetActionsTab.tsx b/dapp/AssetActionsTab.tsx index f0b87cf2..2e92f50c 100644 --- a/dapp/AssetActionsTab.tsx +++ b/dapp/AssetActionsTab.tsx @@ -39,18 +39,18 @@ import { import BigNumber from 'bignumber.js'; import React, { ChangeEvent, FC, useEffect, useState } from 'react'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { INetwork } from '@extension/types'; import { IWindow } from '@external/types'; import { IAccountInformation, IAssetInformation } from './types'; -// Utils +// utils import { convertToAtomicUnit, convertToStandardUnit } from '@common/utils'; import { createAssetConfigTransaction, diff --git a/dapp/AtomicTransactionActionsTab.tsx b/dapp/AtomicTransactionActionsTab.tsx index dc34b7f5..268640bc 100644 --- a/dapp/AtomicTransactionActionsTab.tsx +++ b/dapp/AtomicTransactionActionsTab.tsx @@ -47,18 +47,18 @@ import { import BigNumber from 'bignumber.js'; import React, { FC, useEffect, useState } from 'react'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { INetwork } from '@extension/types'; import { IWindow } from '@external/types'; import { IAccountInformation, IAssetInformation } from './types'; -// Utils +// utils import { convertToAtomicUnit, convertToStandardUnit, diff --git a/dapp/KeyRegistrationActionsTab.tsx b/dapp/KeyRegistrationActionsTab.tsx index a63f8c14..7d13128b 100644 --- a/dapp/KeyRegistrationActionsTab.tsx +++ b/dapp/KeyRegistrationActionsTab.tsx @@ -28,15 +28,15 @@ import { } from 'algosdk'; import React, { ChangeEvent, FC, useState } from 'react'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { INetwork } from '@extension/types'; import { IWindow } from '@external/types'; import { IAccountInformation } from './types'; -// Utils +// utils import { convertToStandardUnit } from '@common/utils'; import { createKeyRegistrationTransaction } from './utils'; diff --git a/dapp/PaymentActionsTab.tsx b/dapp/PaymentActionsTab.tsx index 6631315c..4d139925 100644 --- a/dapp/PaymentActionsTab.tsx +++ b/dapp/PaymentActionsTab.tsx @@ -34,15 +34,15 @@ import { import BigNumber from 'bignumber.js'; import React, { ChangeEvent, FC, useState } from 'react'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { INetwork } from '@extension/types'; import { IWindow } from '@external/types'; import { IAccountInformation } from './types'; -// Utils +// utils import { convertToAtomicUnit, convertToStandardUnit } from '@common/utils'; import { createPaymentTransaction } from './utils'; diff --git a/dapp/SignDataTab.tsx b/dapp/SignDataTab.tsx index 6a10ae89..68983e23 100644 --- a/dapp/SignDataTab.tsx +++ b/dapp/SignDataTab.tsx @@ -18,10 +18,10 @@ import { encode as encodeHex } from '@stablelib/hex'; import { verifyBytes } from 'algosdk'; import React, { ChangeEvent, FC, useState } from 'react'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { IWindow } from '@external/types'; import { IAccountInformation } from './types'; diff --git a/dapp/SignJwtTab.tsx b/dapp/SignJwtTab.tsx index b7dfe927..6e08dc09 100644 --- a/dapp/SignJwtTab.tsx +++ b/dapp/SignJwtTab.tsx @@ -22,14 +22,14 @@ import React, { ChangeEvent, FC, useState } from 'react'; import { IoCheckmarkCircleSharp, IoCloseCircleSharp } from 'react-icons/io5'; import { v4 as uuid } from 'uuid'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { IWindow } from '@external/types'; import { IAccountInformation } from './types'; -// Utils +// utils import { isValidJwt } from './utils'; interface IProps { diff --git a/dapp/index.ts b/dapp/index.ts index 84493296..129145ce 100644 --- a/dapp/index.ts +++ b/dapp/index.ts @@ -1,7 +1,7 @@ import { createElement } from 'react'; import { createRoot, Root } from 'react-dom/client'; -// Components +// components import App from './App'; async function onLoad(): Promise { diff --git a/dapp/types/IAccountInformation.ts b/dapp/types/IAccountInformation.ts index 5190213a..d27f411a 100644 --- a/dapp/types/IAccountInformation.ts +++ b/dapp/types/IAccountInformation.ts @@ -1,6 +1,6 @@ import BigNumber from 'bignumber.js'; -// Types +// types import IAssetInformation from './IAssetInformation'; interface IAccountInformation { diff --git a/dapp/utils/createAppCallTransaction.ts b/dapp/utils/createAppCallTransaction.ts index 02686c6f..07d38214 100644 --- a/dapp/utils/createAppCallTransaction.ts +++ b/dapp/utils/createAppCallTransaction.ts @@ -13,16 +13,16 @@ import { OnApplicationComplete, } from 'algosdk'; -// Constants +// constants import { TESTNET_APP_INDEX } from '../constants'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import { INetwork } from '@extension/types'; -// Utils +// utils import getNotPureStakeAlgodClient from './getNotPureStakeAlgodClient'; interface IOptions { diff --git a/dapp/utils/createAppOptInTransaction.ts b/dapp/utils/createAppOptInTransaction.ts index 3576bd65..94e72df3 100644 --- a/dapp/utils/createAppOptInTransaction.ts +++ b/dapp/utils/createAppOptInTransaction.ts @@ -5,13 +5,13 @@ import { Transaction, } from 'algosdk'; -// Constants +// constants import { TESTNET_APP_INDEX } from '../constants'; -// Types +// types import { INetwork } from '@extension/types'; -// Utils +// utils import getNotPureStakeAlgodClient from './getNotPureStakeAlgodClient'; interface IOptions { diff --git a/dapp/utils/createAssetConfigTransaction.ts b/dapp/utils/createAssetConfigTransaction.ts index 963a6545..fab255cf 100644 --- a/dapp/utils/createAssetConfigTransaction.ts +++ b/dapp/utils/createAssetConfigTransaction.ts @@ -6,10 +6,10 @@ import { Transaction, } from 'algosdk'; -// Types +// types import { INetwork } from '@extension/types'; -// Utils +// utils import getNotPureStakeAlgodClient from './getNotPureStakeAlgodClient'; interface IOptions { diff --git a/dapp/utils/createAssetCreateTransaction.ts b/dapp/utils/createAssetCreateTransaction.ts index ae5d71bf..7785e607 100644 --- a/dapp/utils/createAssetCreateTransaction.ts +++ b/dapp/utils/createAssetCreateTransaction.ts @@ -7,10 +7,10 @@ import { } from 'algosdk'; import { faker } from '@faker-js/faker'; -// Types +// types import { INetwork } from '@extension/types'; -// Utils +// utils import getNotPureStakeAlgodClient from './getNotPureStakeAlgodClient'; interface IOptions { diff --git a/dapp/utils/createAssetDestroyTransaction.ts b/dapp/utils/createAssetDestroyTransaction.ts index b07e49d3..9f1fe9b0 100644 --- a/dapp/utils/createAssetDestroyTransaction.ts +++ b/dapp/utils/createAssetDestroyTransaction.ts @@ -5,10 +5,10 @@ import { Transaction, } from 'algosdk'; -// Types +// types import { INetwork } from '@extension/types'; -// Utils +// utils import getNotPureStakeAlgodClient from './getNotPureStakeAlgodClient'; interface IOptions { diff --git a/dapp/utils/createAssetFreezeTransaction.ts b/dapp/utils/createAssetFreezeTransaction.ts index 11c5269c..90a46821 100644 --- a/dapp/utils/createAssetFreezeTransaction.ts +++ b/dapp/utils/createAssetFreezeTransaction.ts @@ -5,10 +5,10 @@ import { Transaction, } from 'algosdk'; -// Types +// types import { INetwork } from '@extension/types'; -// Utils +// utils import getNotPureStakeAlgodClient from './getNotPureStakeAlgodClient'; interface IOptions { diff --git a/dapp/utils/createAssetTransferTransaction.ts b/dapp/utils/createAssetTransferTransaction.ts index bf9db178..f5585d02 100644 --- a/dapp/utils/createAssetTransferTransaction.ts +++ b/dapp/utils/createAssetTransferTransaction.ts @@ -6,10 +6,10 @@ import { } from 'algosdk'; import BigNumber from 'bignumber.js'; -// Types +// types import { INetwork } from '@extension/types'; -// Utils +// utils import getNotPureStakeAlgodClient from './getNotPureStakeAlgodClient'; interface IOptions { diff --git a/dapp/utils/createKeyRegistrationTransaction.ts b/dapp/utils/createKeyRegistrationTransaction.ts index f3314a9a..3930c2c0 100644 --- a/dapp/utils/createKeyRegistrationTransaction.ts +++ b/dapp/utils/createKeyRegistrationTransaction.ts @@ -5,10 +5,10 @@ import { Transaction, } from 'algosdk'; -// Types +// types import { INetwork } from '@extension/types'; -// Utils +// utils import getNotPureStakeAlgodClient from './getNotPureStakeAlgodClient'; interface IOptions { diff --git a/dapp/utils/createPaymentTransaction.ts b/dapp/utils/createPaymentTransaction.ts index 858b65b8..7da311fc 100644 --- a/dapp/utils/createPaymentTransaction.ts +++ b/dapp/utils/createPaymentTransaction.ts @@ -6,10 +6,10 @@ import { } from 'algosdk'; import BigNumber from 'bignumber.js'; -// Types +// types import { INetwork } from '@extension/types'; -// Utils +// utils import getNotPureStakeAlgodClient from './getNotPureStakeAlgodClient'; interface IOptions { diff --git a/dapp/utils/getAccountInformation.ts b/dapp/utils/getAccountInformation.ts index 4b91e718..7a118f15 100644 --- a/dapp/utils/getAccountInformation.ts +++ b/dapp/utils/getAccountInformation.ts @@ -2,7 +2,7 @@ import { IWalletAccount } from '@agoralabs-sh/algorand-provider'; import { Algodv2, IntDecoding } from 'algosdk'; import BigNumber from 'bignumber.js'; -// Types +// types import { IAlgorandAccountInformation, IAlgorandAsset, @@ -10,7 +10,7 @@ import { } from '@extension/types'; import { IAccountInformation, IAssetInformation } from '../types'; -// Utils +// utils import getNotPureStakeAlgodClient from './getNotPureStakeAlgodClient'; export default async function getAccountInformation( diff --git a/dapp/utils/getNotPureStakeAlgodClient.ts b/dapp/utils/getNotPureStakeAlgodClient.ts index 28e74c22..fd47d028 100644 --- a/dapp/utils/getNotPureStakeAlgodClient.ts +++ b/dapp/utils/getNotPureStakeAlgodClient.ts @@ -1,6 +1,6 @@ import { Algodv2 } from 'algosdk'; -// Types +// types import { INetwork, INode } from '@extension/types'; /** diff --git a/package.json b/package.json index 6ebc5feb..f4d02bf3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@agoralabs-sh/kibisis-web-extension", "version": "1.2.0", - "description": "An Algorand wallet browser extension to sign data, send transactions and rekey with another account.", + "description": "An AVM wallet in your browser that goes beyond just DeFi.", "main": "build/main.js", "repository": { "type": "git", @@ -16,9 +16,11 @@ "keywords": [ "algorand", "algosdk", + "avm", "blockchain", "browser", "firefox", + "voi", "wallet" ], "private": true, @@ -26,17 +28,21 @@ "node": ">=15.0.0" }, "scripts": { - "build": "cross-env TS_NODE_PROJECT=\"webpack/tsconfig.webpack.json\" webpack --config webpack/webpack.config.ts --config-name production", + "build:chrome": "cross-env TS_NODE_PROJECT=\"webpack/tsconfig.webpack.json\" webpack --config webpack/webpack.config.ts --config-name production --env target=chrome", + "build:firefox": "cross-env TS_NODE_PROJECT=\"webpack/tsconfig.webpack.json\" webpack --config webpack/webpack.config.ts --config-name production --env target=firefox", + "install:chrome": "./bin/install_chrome.sh", + "install:firefox": "./bin/install_firefox.sh", "lint": "eslint . --ext .ts --ext .tsx --ext .js", - "package": "web-ext build", - "prepare": "husky install && ./bin/install_firefox.sh", + "package:chrome": "./bin/package.sh chrome", + "package:firefox": "./bin/package.sh firefox", + "prepare": "husky install && ./bin/post_install.sh", "prettier": "prettier --config .prettierrc --write \"**/*.{js,json,ts,tsx}\"", - "start": "concurrently --names \"DAPP,EXTENSION\" -c \"bgBlue.bold,bgMagenta.bold\" \"yarn start:dapp\" \"yarn start:extension\"", - "start:extension": "cross-env TS_NODE_PROJECT=\"webpack/tsconfig.webpack.json\" webpack --config webpack/webpack.config.ts --config-name development --watch", + "start:chrome": "concurrently --names \"DAPP,EXTENSION\" -c \"blue.bold,magenta.bold\" \"yarn start:dapp\" \"yarn start:extension --env target=chrome\"", "start:dapp": "cross-env TS_NODE_PROJECT=\"webpack/tsconfig.webpack.json\" webpack serve --config webpack/webpack.config.ts --config-name dapp", - "start:firefox": "web-ext run", + "start:extension": "cross-env TS_NODE_PROJECT=\"webpack/tsconfig.webpack.json\" webpack --config webpack/webpack.config.ts --config-name development --watch", + "start:firefox": "concurrently --names \"DAPP,EXTENSION\" -c \"blue.bold,magenta.bold\" \"yarn start:dapp\" \"yarn start:extension --env target=firefox\"", "test": "jest", - "validate:firefox": "addons-linter .build/" + "validate:firefox": "addons-linter .firefox_build/" }, "devDependencies": { "@commitlint/cli": "^17.4.4", @@ -66,6 +72,7 @@ "concurrently": "^7.6.0", "copy-webpack-plugin": "^11.0.0", "cross-env": "^7.0.3", + "dotenv": "^16.3.1", "eslint": "^8.35.0", "eslint-config-prettier": "^8.6.0", "handlebars-loader": "^1.7.3", @@ -83,7 +90,7 @@ "ts-node": "^10.9.1", "tsconfig-paths": "^3.14.2", "typescript": "4.9.5", - "web-ext": "^7.5.0", + "web-ext": "^7.8.0", "webpack": "^5.76.3", "webpack-cli": "^5.0.1", "webpack-dev-server": "^4.13.0", diff --git a/src/@types/global/index.d.ts b/src/@types/global/index.d.ts index 0efaf747..5eaf709b 100644 --- a/src/@types/global/index.d.ts +++ b/src/@types/global/index.d.ts @@ -1,4 +1,4 @@ declare const __APP_TITLE__: string; -declare const __EXTENSION_ID__: string; declare const __ENV__: 'development' | 'production'; declare const __VERSION__: string; +declare const __WALLET_CONNECT_PROJECT_ID__: string; diff --git a/src/background.ts b/src/background.ts index e8fffde9..89b2404d 100644 --- a/src/background.ts +++ b/src/background.ts @@ -1,12 +1,12 @@ -import browser from 'webextension-polyfill'; +import browser, { Action, BrowserAction } from 'webextension-polyfill'; -// Services +// services import { BackgroundService } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; -// Utils +// utils import { createLogger } from '@common/utils'; (() => { @@ -16,6 +16,8 @@ import { createLogger } from '@common/utils'; const backgroundService: BackgroundService = new BackgroundService({ logger, }); + const browserAction: Action.Static | BrowserAction.Static = + browser.action || browser.browserAction; // TODO: use browser.action for v3 // listen to extension messages browser.runtime.onMessage.addListener( @@ -23,7 +25,7 @@ import { createLogger } from '@common/utils'; ); // listen to special events - browser.browserAction.onClicked.addListener( + browserAction.onClicked.addListener( backgroundService.onExtensionClick.bind(backgroundService) ); browser.windows.onRemoved.addListener( diff --git a/src/common/errors/SerializableInvalidGroupIdError.ts b/src/common/errors/SerializableInvalidGroupIdError.ts index 36fc0396..531e43ab 100644 --- a/src/common/errors/SerializableInvalidGroupIdError.ts +++ b/src/common/errors/SerializableInvalidGroupIdError.ts @@ -1,6 +1,6 @@ import { ErrorCodeEnum } from '@agoralabs-sh/algorand-provider'; -// Errors +// errors import BaseSerializableError from './BaseSerializableError'; export default class SerializableInvalidGroupIdError extends BaseSerializableError { diff --git a/src/common/errors/SerializableInvalidInputError.ts b/src/common/errors/SerializableInvalidInputError.ts index 09b4e014..5a6cc7ea 100644 --- a/src/common/errors/SerializableInvalidInputError.ts +++ b/src/common/errors/SerializableInvalidInputError.ts @@ -1,6 +1,6 @@ import { ErrorCodeEnum } from '@agoralabs-sh/algorand-provider'; -// Errors +// errors import BaseSerializableError from './BaseSerializableError'; export default class SerializableInvalidInputError extends BaseSerializableError { diff --git a/src/common/errors/SerializableNetworkNotSupportedError.ts b/src/common/errors/SerializableNetworkNotSupportedError.ts index 71c7d04b..541354d5 100644 --- a/src/common/errors/SerializableNetworkNotSupportedError.ts +++ b/src/common/errors/SerializableNetworkNotSupportedError.ts @@ -1,6 +1,6 @@ import { ErrorCodeEnum } from '@agoralabs-sh/algorand-provider'; -// Errors +// errors import BaseSerializableError from './BaseSerializableError'; export default class SerializableNetworkNotSupportedError extends BaseSerializableError { diff --git a/src/common/errors/SerializableOperationCanceledError.ts b/src/common/errors/SerializableOperationCanceledError.ts index c1e7cc8f..86186b8a 100644 --- a/src/common/errors/SerializableOperationCanceledError.ts +++ b/src/common/errors/SerializableOperationCanceledError.ts @@ -1,6 +1,6 @@ import { ErrorCodeEnum } from '@agoralabs-sh/algorand-provider'; -// Errors +// errors import BaseSerializableError from './BaseSerializableError'; export default class SerializableOperationCanceledError extends BaseSerializableError { diff --git a/src/common/errors/SerializableUnauthorizedSignerError.ts b/src/common/errors/SerializableUnauthorizedSignerError.ts index 0c894642..4c9267a4 100644 --- a/src/common/errors/SerializableUnauthorizedSignerError.ts +++ b/src/common/errors/SerializableUnauthorizedSignerError.ts @@ -1,6 +1,6 @@ import { ErrorCodeEnum } from '@agoralabs-sh/algorand-provider'; -// Errors +// errors import BaseSerializableError from './BaseSerializableError'; export default class SerializableUnauthorizedSignerError extends BaseSerializableError { diff --git a/src/common/errors/SerializableUnknownError.ts b/src/common/errors/SerializableUnknownError.ts index 1d866676..0b7f5f5a 100644 --- a/src/common/errors/SerializableUnknownError.ts +++ b/src/common/errors/SerializableUnknownError.ts @@ -1,6 +1,6 @@ import { ErrorCodeEnum } from '@agoralabs-sh/algorand-provider'; -// Errors +// errors import BaseSerializableError from './BaseSerializableError'; export default class SerializableUnknownError extends BaseSerializableError { diff --git a/src/common/events/BaseEvent.ts b/src/common/events/BaseEvent.ts index 86036d6f..e77fb2ab 100644 --- a/src/common/events/BaseEvent.ts +++ b/src/common/events/BaseEvent.ts @@ -1,6 +1,6 @@ import { v4 as uuid } from 'uuid'; -// Enums +// enums import { EventNameEnum } from '@common/enums'; export default class BaseEvent { diff --git a/src/common/events/BaseExtensionResponseEvent.ts b/src/common/events/BaseExtensionResponseEvent.ts index c6a7760f..2fde7ed5 100644 --- a/src/common/events/BaseExtensionResponseEvent.ts +++ b/src/common/events/BaseExtensionResponseEvent.ts @@ -1,10 +1,10 @@ -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Errors +// errors import { BaseSerializableError } from '@common/errors'; -// Events +// events import BaseResponseEvent from './BaseResponseEvent'; export default class BaseExtensionResponseEvent extends BaseResponseEvent { diff --git a/src/common/events/BaseResponseEvent.ts b/src/common/events/BaseResponseEvent.ts index 45993689..0daa8c60 100644 --- a/src/common/events/BaseResponseEvent.ts +++ b/src/common/events/BaseResponseEvent.ts @@ -1,10 +1,10 @@ -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Errors +// errors import { BaseSerializableError } from '@common/errors'; -// Events +// events import BaseEvent from './BaseEvent'; export default class BaseResponseEvent extends BaseEvent { diff --git a/src/common/events/ExtensionBackgroundAppLoadEvent.ts b/src/common/events/ExtensionBackgroundAppLoadEvent.ts index c6b34c63..85d235a7 100644 --- a/src/common/events/ExtensionBackgroundAppLoadEvent.ts +++ b/src/common/events/ExtensionBackgroundAppLoadEvent.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Events +// events import { BaseEvent } from '@common/events'; interface IPayload { diff --git a/src/common/events/ExtensionEnableRequestEvent.ts b/src/common/events/ExtensionEnableRequestEvent.ts index 0c1663ad..1b55c5f5 100644 --- a/src/common/events/ExtensionEnableRequestEvent.ts +++ b/src/common/events/ExtensionEnableRequestEvent.ts @@ -1,10 +1,10 @@ -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Events +// events import BaseEvent from './BaseEvent'; -// Types +// types import { IExtensionEnableRequestPayload } from '@common/types'; type IPayload = IExtensionEnableRequestPayload; diff --git a/src/common/events/ExtensionEnableResponseEvent.ts b/src/common/events/ExtensionEnableResponseEvent.ts index 1573ff2d..e7af2835 100644 --- a/src/common/events/ExtensionEnableResponseEvent.ts +++ b/src/common/events/ExtensionEnableResponseEvent.ts @@ -1,12 +1,12 @@ import { IEnableResult } from '@agoralabs-sh/algorand-provider'; -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Errors +// errors import { BaseSerializableError } from '@common/errors'; -// Events +// events import BaseExtensionResponseEvent from './BaseExtensionResponseEvent'; type IPayload = IEnableResult; diff --git a/src/common/events/ExtensionRegistrationCompletedEvent.ts b/src/common/events/ExtensionRegistrationCompletedEvent.ts index ce02113d..0c5a66a9 100644 --- a/src/common/events/ExtensionRegistrationCompletedEvent.ts +++ b/src/common/events/ExtensionRegistrationCompletedEvent.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Events +// events import { BaseEvent } from '@common/events'; export default class ExtensionRegistrationCompletedEvent extends BaseEvent { diff --git a/src/common/events/ExtensionResetEvent.ts b/src/common/events/ExtensionResetEvent.ts index f2ecd5e1..742eedc3 100644 --- a/src/common/events/ExtensionResetEvent.ts +++ b/src/common/events/ExtensionResetEvent.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Events +// events import { BaseEvent } from '@common/events'; export default class ExtensionResetEvent extends BaseEvent { diff --git a/src/common/events/ExtensionSignBytesRequestEvent.ts b/src/common/events/ExtensionSignBytesRequestEvent.ts index 709c8cb9..7c615d76 100644 --- a/src/common/events/ExtensionSignBytesRequestEvent.ts +++ b/src/common/events/ExtensionSignBytesRequestEvent.ts @@ -1,10 +1,10 @@ -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Events +// events import BaseEvent from './BaseEvent'; -// Types +// types import { IExtensionSignBytesRequestPayload } from '@common/types'; type IPayload = IExtensionSignBytesRequestPayload; diff --git a/src/common/events/ExtensionSignBytesResponseEvent.ts b/src/common/events/ExtensionSignBytesResponseEvent.ts index d218e154..03878b59 100644 --- a/src/common/events/ExtensionSignBytesResponseEvent.ts +++ b/src/common/events/ExtensionSignBytesResponseEvent.ts @@ -1,13 +1,13 @@ -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Errors +// errors import { BaseSerializableError } from '@common/errors'; -// Events +// events import BaseExtensionResponseEvent from './BaseExtensionResponseEvent'; -// Types +// types import { IBaseSignBytesResponsePayload } from '@common/types'; type IPayload = IBaseSignBytesResponsePayload; diff --git a/src/common/events/ExtensionSignTxnsRequestEvent.ts b/src/common/events/ExtensionSignTxnsRequestEvent.ts index b7254863..efc56661 100644 --- a/src/common/events/ExtensionSignTxnsRequestEvent.ts +++ b/src/common/events/ExtensionSignTxnsRequestEvent.ts @@ -1,10 +1,10 @@ -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Events +// events import BaseEvent from './BaseEvent'; -// Types +// types import { IExtensionSignTxnsRequestPayload } from '@common/types'; type IPayload = IExtensionSignTxnsRequestPayload; diff --git a/src/common/events/ExtensionSignTxnsResponseEvent.ts b/src/common/events/ExtensionSignTxnsResponseEvent.ts index ac29d9ba..090405b0 100644 --- a/src/common/events/ExtensionSignTxnsResponseEvent.ts +++ b/src/common/events/ExtensionSignTxnsResponseEvent.ts @@ -1,12 +1,12 @@ import { ISignTxnsResult } from '@agoralabs-sh/algorand-provider'; -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Errors +// errors import { BaseSerializableError } from '@common/errors'; -// Events +// events import BaseExtensionResponseEvent from './BaseExtensionResponseEvent'; type IPayload = ISignTxnsResult; diff --git a/src/common/events/ExternalEnableRequestEvent.ts b/src/common/events/ExternalEnableRequestEvent.ts index 7af75ca4..cf6ca747 100644 --- a/src/common/events/ExternalEnableRequestEvent.ts +++ b/src/common/events/ExternalEnableRequestEvent.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Events +// events import BaseEvent from './BaseEvent'; interface IPayload { diff --git a/src/common/events/ExternalEnableResponseEvent.ts b/src/common/events/ExternalEnableResponseEvent.ts index 4b1cd121..c1810cec 100644 --- a/src/common/events/ExternalEnableResponseEvent.ts +++ b/src/common/events/ExternalEnableResponseEvent.ts @@ -1,12 +1,12 @@ import { IEnableResult } from '@agoralabs-sh/algorand-provider'; -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Errors +// errors import { BaseSerializableError } from '@common/errors'; -// Events +// events import BaseResponseEvent from './BaseResponseEvent'; export default class ExternalEnableResponseEvent extends BaseResponseEvent { diff --git a/src/common/events/ExternalSignBytesRequestEvent.ts b/src/common/events/ExternalSignBytesRequestEvent.ts index c15ddf50..4eeb2e1e 100644 --- a/src/common/events/ExternalSignBytesRequestEvent.ts +++ b/src/common/events/ExternalSignBytesRequestEvent.ts @@ -1,10 +1,10 @@ -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Events +// events import BaseEvent from './BaseEvent'; -// Types +// types import { IBaseSignBytesRequestPayload } from '@common/types'; type IPayload = IBaseSignBytesRequestPayload; diff --git a/src/common/events/ExternalSignBytesResponseEvent.ts b/src/common/events/ExternalSignBytesResponseEvent.ts index 020d5d27..4891fa09 100644 --- a/src/common/events/ExternalSignBytesResponseEvent.ts +++ b/src/common/events/ExternalSignBytesResponseEvent.ts @@ -1,13 +1,13 @@ -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Errors +// errors import { BaseSerializableError } from '@common/errors'; -// Events +// events import BaseResponseEvent from './BaseResponseEvent'; -// Types +// types import { IBaseSignBytesResponsePayload } from '@common/types'; type IPayload = IBaseSignBytesResponsePayload; diff --git a/src/common/events/ExternalSignTxnsRequestEvent.ts b/src/common/events/ExternalSignTxnsRequestEvent.ts index 9e8597ad..f67b54d4 100644 --- a/src/common/events/ExternalSignTxnsRequestEvent.ts +++ b/src/common/events/ExternalSignTxnsRequestEvent.ts @@ -1,9 +1,9 @@ import { ISignTxnsOptions } from '@agoralabs-sh/algorand-provider'; -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Events +// events import BaseEvent from './BaseEvent'; type IPayload = ISignTxnsOptions; diff --git a/src/common/events/ExternalSignTxnsResponseEvent.ts b/src/common/events/ExternalSignTxnsResponseEvent.ts index d92f054e..328c26f2 100644 --- a/src/common/events/ExternalSignTxnsResponseEvent.ts +++ b/src/common/events/ExternalSignTxnsResponseEvent.ts @@ -1,12 +1,12 @@ import { ISignTxnsResult } from '@agoralabs-sh/algorand-provider'; -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Errors +// errors import { BaseSerializableError } from '@common/errors'; -// Events +// events import BaseResponseEvent from './BaseResponseEvent'; type IPayload = ISignTxnsResult; diff --git a/src/common/types/IAllExtensionEvents.ts b/src/common/types/IAllExtensionEvents.ts index e93f9e36..7a42284b 100644 --- a/src/common/types/IAllExtensionEvents.ts +++ b/src/common/types/IAllExtensionEvents.ts @@ -1,11 +1,11 @@ -// Events +// events import { ExtensionBackgroundAppLoadEvent, ExtensionRegistrationCompletedEvent, ExtensionResetEvent, } from '@common/events'; -// Types +// types import IExtensionRequestEvents from './IExternalRequestEvents'; import IExtensionResponseEvents from './IExtensionResponseEvents'; diff --git a/src/common/types/IBaseOptions.ts b/src/common/types/IBaseOptions.ts index 7b383aed..e7cf9bd4 100644 --- a/src/common/types/IBaseOptions.ts +++ b/src/common/types/IBaseOptions.ts @@ -1,4 +1,4 @@ -// Types +// types import ILogger from './ILogger'; interface IBaseOptions { diff --git a/src/common/types/IExtensionEnableRequestPayload.ts b/src/common/types/IExtensionEnableRequestPayload.ts index b5705b46..e58127ae 100644 --- a/src/common/types/IExtensionEnableRequestPayload.ts +++ b/src/common/types/IExtensionEnableRequestPayload.ts @@ -1,4 +1,4 @@ -// Types +// types import { INetwork } from '@extension/types'; import IBaseExtensionRequestPayload from './IBaseExtensionRequestPayload'; diff --git a/src/common/types/IExtensionRequestEvents.ts b/src/common/types/IExtensionRequestEvents.ts index b43dd0d5..29a5bcb6 100644 --- a/src/common/types/IExtensionRequestEvents.ts +++ b/src/common/types/IExtensionRequestEvents.ts @@ -1,4 +1,4 @@ -// Events +// events import { ExtensionEnableRequestEvent, ExtensionSignBytesRequestEvent, diff --git a/src/common/types/IExtensionResponseEvents.ts b/src/common/types/IExtensionResponseEvents.ts index bfec07be..eca6ace0 100644 --- a/src/common/types/IExtensionResponseEvents.ts +++ b/src/common/types/IExtensionResponseEvents.ts @@ -1,4 +1,4 @@ -// Events +// events import { ExtensionEnableResponseEvent, ExtensionSignBytesResponseEvent, diff --git a/src/common/types/IExtensionSignBytesRequestPayload.ts b/src/common/types/IExtensionSignBytesRequestPayload.ts index c9fe3482..e03f70a6 100644 --- a/src/common/types/IExtensionSignBytesRequestPayload.ts +++ b/src/common/types/IExtensionSignBytesRequestPayload.ts @@ -1,4 +1,4 @@ -// Types +// types import IBaseExtensionRequestPayload from './IBaseExtensionRequestPayload'; import IBaseSignBytesRequestPayload from './IBaseSignBytesRequestPayload'; diff --git a/src/common/types/IExtensionSignTxnsRequestPayload.ts b/src/common/types/IExtensionSignTxnsRequestPayload.ts index 53bbd6e4..c9b41cb0 100644 --- a/src/common/types/IExtensionSignTxnsRequestPayload.ts +++ b/src/common/types/IExtensionSignTxnsRequestPayload.ts @@ -1,6 +1,6 @@ import { ISignTxnsOptions } from '@agoralabs-sh/algorand-provider'; -// Types +// types import { INetwork } from '@extension/types'; import IBaseExtensionRequestPayload from './IBaseExtensionRequestPayload'; diff --git a/src/common/types/IExternalRequestEvents.ts b/src/common/types/IExternalRequestEvents.ts index 02dd1e09..9dcb1974 100644 --- a/src/common/types/IExternalRequestEvents.ts +++ b/src/common/types/IExternalRequestEvents.ts @@ -1,4 +1,4 @@ -// Events +// events import { ExternalEnableRequestEvent, ExternalSignBytesRequestEvent, diff --git a/src/common/types/IExternalResponseEvents.ts b/src/common/types/IExternalResponseEvents.ts index 71566a67..f8c5e17f 100644 --- a/src/common/types/IExternalResponseEvents.ts +++ b/src/common/types/IExternalResponseEvents.ts @@ -1,4 +1,4 @@ -// Events +// events import { ExternalEnableResponseEvent, ExternalSignBytesResponseEvent, diff --git a/src/common/utils/convertToAtomicUnit.test.ts b/src/common/utils/convertToAtomicUnit.test.ts index e18b649b..3c0040e2 100644 --- a/src/common/utils/convertToAtomicUnit.test.ts +++ b/src/common/utils/convertToAtomicUnit.test.ts @@ -1,6 +1,6 @@ import BigNumber from 'bignumber.js'; -// Utils +// utils import convertToAtomicUnit from './convertToAtomicUnit'; interface ITestParams { diff --git a/src/common/utils/convertToStandardUnit.test.ts b/src/common/utils/convertToStandardUnit.test.ts index bf746dd5..df67909f 100644 --- a/src/common/utils/convertToStandardUnit.test.ts +++ b/src/common/utils/convertToStandardUnit.test.ts @@ -1,6 +1,6 @@ import BigNumber from 'bignumber.js'; -// Utils +// utils import convertToStandardUnit from './convertToStandardUnit'; interface ITestParams { diff --git a/src/common/utils/createLogger.ts b/src/common/utils/createLogger.ts index aa98ca99..96b06e57 100644 --- a/src/common/utils/createLogger.ts +++ b/src/common/utils/createLogger.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -// Types +// types import { ILogger, ILogLevel } from '@common/types'; /** diff --git a/src/common/utils/formatCurrencyUnit.test.ts b/src/common/utils/formatCurrencyUnit.test.ts index 6bd92569..34d1e859 100644 --- a/src/common/utils/formatCurrencyUnit.test.ts +++ b/src/common/utils/formatCurrencyUnit.test.ts @@ -1,6 +1,6 @@ import BigNumber from 'bignumber.js'; -// Utils +// utils import formatCurrencyUnit from './formatCurrencyUnit'; interface ITestParams { diff --git a/src/common/utils/getAlgodClient.ts b/src/common/utils/getAlgodClient.ts index 50a8da86..30c08911 100644 --- a/src/common/utils/getAlgodClient.ts +++ b/src/common/utils/getAlgodClient.ts @@ -1,6 +1,6 @@ import { Algodv2 } from 'algosdk'; -// Types +// types import { IBaseOptions } from '@common/types'; import { INetwork, INode } from '@extension/types'; diff --git a/src/common/utils/getIndexerClient.ts b/src/common/utils/getIndexerClient.ts index 44d70a05..f196dfcd 100644 --- a/src/common/utils/getIndexerClient.ts +++ b/src/common/utils/getIndexerClient.ts @@ -1,6 +1,6 @@ import { Indexer } from 'algosdk'; -// Types +// types import { IBaseOptions } from '@common/types'; import { INetwork, INode } from '@extension/types'; diff --git a/src/common/utils/mapSerializableErrors.ts b/src/common/utils/mapSerializableErrors.ts index 5c142a3c..d9532748 100644 --- a/src/common/utils/mapSerializableErrors.ts +++ b/src/common/utils/mapSerializableErrors.ts @@ -6,7 +6,7 @@ import { UnknownError, } from '@agoralabs-sh/algorand-provider'; -// Errors +// errors import { BaseSerializableError, SerializableNetworkNotSupportedError, diff --git a/src/content-script.ts b/src/content-script.ts index 7e4c1f41..ecca9527 100644 --- a/src/content-script.ts +++ b/src/content-script.ts @@ -1,12 +1,12 @@ import browser from 'webextension-polyfill'; -// Services +// servcies import { ExternalEventService } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; -// Utils +// utils import { createLogger } from '@common/utils'; import { injectScript } from '@extension/utils'; diff --git a/src/extension/apps/background/App.tsx b/src/extension/apps/background/App.tsx index 05654786..37b324a6 100644 --- a/src/extension/apps/background/App.tsx +++ b/src/extension/apps/background/App.tsx @@ -3,11 +3,11 @@ import React, { FC } from 'react'; import { I18nextProvider } from 'react-i18next'; import { Provider } from 'react-redux'; -// Components +// components import ThemeProvider from '@extension/components/ThemeProvider'; import Root from './Root'; -// Features +// features import { reducer as accountsReducer } from '@extension/features/accounts'; import { reducer as assetsReducer } from '@extension/features/assets'; import { reducer as messagesReducer } from '@extension/features/messages'; @@ -17,10 +17,10 @@ import { reducer as settingsReducer } from '@extension/features/settings'; import { reducer as systemReducer } from '@extension/features/system'; import { reducer as transactionsReducer } from '@extension/features/transactions'; -// Types +// types import { IAppProps, IMainRootState } from '@extension/types'; -// Utils +// utils import { makeStore } from '@extension/utils'; const App: FC = ({ i18next, initialColorMode }: IAppProps) => { diff --git a/src/extension/apps/background/Root.tsx b/src/extension/apps/background/Root.tsx index 03fc354f..ab3444d1 100644 --- a/src/extension/apps/background/Root.tsx +++ b/src/extension/apps/background/Root.tsx @@ -1,16 +1,16 @@ import React, { FC, useEffect } from 'react'; import { useDispatch } from 'react-redux'; -// Components +// components import EnableModal from '@extension/components/EnableModal'; import LoadingPage from '@extension/components/LoadingPage'; import SignTxnsModal from '@extension/components/SignTxnsModal'; import SignBytesModal from '@extension/components/SignBytesModal'; -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Features +// features import { fetchAccountsFromStorageThunk } from '@extension/features/accounts'; import { closeCurrentWindowThunk, @@ -22,16 +22,16 @@ import { import { fetchSessionsThunk } from '@extension/features/sessions'; import { fetchSettings } from '@extension/features/settings'; -// Hooks +// hooks import useOnBackgroundAppMessage from '@extension/hooks/useOnBackgroundAppMessage'; -// Selectors +// selectors import { useSelectSelectedNetwork } from '@extension/selectors'; -// Types +// types import { IAppThunkDispatch, INetwork } from '@extension/types'; -// Utils +// utils import { decodeURLSearchParam } from '@extension/utils'; enum ModalTypeEnum { diff --git a/src/extension/apps/background/index.ts b/src/extension/apps/background/index.ts index ac7e565a..18b9e665 100644 --- a/src/extension/apps/background/index.ts +++ b/src/extension/apps/background/index.ts @@ -1,7 +1,7 @@ // Apps import App from './App'; -// Utils +// utils import { bootstrapApp } from '@extension/utils'; window.onload = bootstrapApp(App); diff --git a/src/extension/apps/main/App.tsx b/src/extension/apps/main/App.tsx index 523ddb59..eb7f3dd5 100644 --- a/src/extension/apps/main/App.tsx +++ b/src/extension/apps/main/App.tsx @@ -4,18 +4,18 @@ import { I18nextProvider } from 'react-i18next'; import { Provider } from 'react-redux'; import { createHashRouter, Navigate, RouterProvider } from 'react-router-dom'; -// Components +// components import ThemeProvider from '@extension/components/ThemeProvider'; import Root from './Root'; -// Constants +// constants import { ADD_ACCOUNT_ROUTE, ACCOUNTS_ROUTE, SETTINGS_ROUTE, } from '@extension/constants'; -// Features +// features import { reducer as accountsReducer } from '@extension/features/accounts'; import { reducer as assetsReducer } from '@extension/features/assets'; import { reducer as messagesReducer } from '@extension/features/messages'; @@ -33,10 +33,10 @@ import AccountRouter from '@extension/pages/AccountRouter'; import AddAccountRouter from '@extension/pages/MainAddAccountRouter'; import SettingsRouter from '@extension/pages/SettingsRouter'; -// Types +// types import { IAppProps, IAppThunkDispatch, IMainRootState } from '@extension/types'; -// Utils +// utils import { makeStore } from '@extension/utils'; const createRouter = (dispatch: IAppThunkDispatch) => diff --git a/src/extension/apps/main/Root.tsx b/src/extension/apps/main/Root.tsx index 83eb15ee..271e315f 100644 --- a/src/extension/apps/main/Root.tsx +++ b/src/extension/apps/main/Root.tsx @@ -3,7 +3,7 @@ import React, { FC, useEffect } from 'react'; import { useDispatch } from 'react-redux'; import { NavigateFunction, Outlet, useNavigate } from 'react-router-dom'; -// Components +// components import ConfirmModal from '@extension/components/ConfirmModal'; import EnableModal from '@extension/components/EnableModal'; import ErrorModal from '@extension/components/ErrorModal'; @@ -12,7 +12,7 @@ import SignBytesModal from '@extension/components/SignBytesModal'; import SignTxnsModal from '@extension/components/SignTxnsModal'; import WalletConnectModal from '@extension/components/WalletConnectModal'; -// Features +// features import { fetchAccountsFromStorageThunk, startPollingForAccountInformationThunk, @@ -39,21 +39,21 @@ import { } from '@extension/features/sessions'; import { fetchSettings } from '@extension/features/settings'; -// Hooks +// hooks import useOnMainAppMessage from '@extension/hooks/useOnMainAppMessage'; import useOnNetworkConnectivity from '@extension/hooks/useOnNetworkConnectivity'; -// Selectors +// selectors import { useSelectAccounts, useSelectAssets, useSelectSelectedNetwork, } from '@extension/selectors'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { IAccount, IAccountInformation, @@ -63,7 +63,7 @@ import { INetwork, } from '@extension/types'; -// Utils +// utils import { convertGenesisHashToHex } from '@extension/utils'; const Root: FC = () => { diff --git a/src/extension/apps/main/index.ts b/src/extension/apps/main/index.ts index ac7e565a..12ee4b1e 100644 --- a/src/extension/apps/main/index.ts +++ b/src/extension/apps/main/index.ts @@ -1,7 +1,7 @@ -// Apps +// components import App from './App'; -// Utils +// utils import { bootstrapApp } from '@extension/utils'; window.onload = bootstrapApp(App); diff --git a/src/extension/apps/registration/App.tsx b/src/extension/apps/registration/App.tsx index f3b42c9e..3c2d0e7f 100644 --- a/src/extension/apps/registration/App.tsx +++ b/src/extension/apps/registration/App.tsx @@ -4,18 +4,18 @@ import { I18nextProvider } from 'react-i18next'; import { Provider } from 'react-redux'; import { createHashRouter, Navigate, RouterProvider } from 'react-router-dom'; -// Components +// components import ThemeProvider from '@extension/components/ThemeProvider'; import Root from './Root'; -// Constants +// constants import { ADD_ACCOUNT_ROUTE, CREATE_PASSWORD_ROUTE, GET_STARTED_ROUTE, } from '@extension/constants'; -// Features +// features import { reducer as networksReducer } from '@extension/features/networks'; import { reducer as settingsReducer } from '@extension/features/settings'; import { reducer as registrationReducer } from '@extension/features/registration'; @@ -26,10 +26,10 @@ import CreatePasswordPage from '@extension/pages/CreatePasswordPage'; import GetStartedPage from '@extension/pages/GetStartedPage'; import RegistrationAddAccountRouter from '@extension/pages/RegistrationAddAccountRouter'; -// Types +// types import { IAppProps, IRegistrationRootState } from '@extension/types'; -// Utils +// utils import { makeStore } from '@extension/utils'; const createRouter = () => diff --git a/src/extension/apps/registration/Root.tsx b/src/extension/apps/registration/Root.tsx index 7671cd8b..9ceda7cc 100644 --- a/src/extension/apps/registration/Root.tsx +++ b/src/extension/apps/registration/Root.tsx @@ -3,17 +3,17 @@ import React, { FC, useEffect } from 'react'; import { useDispatch } from 'react-redux'; import { NavigateFunction, Outlet, useNavigate } from 'react-router-dom'; -// Components +// components import ErrorModal from '@extension/components/ErrorModal'; -// Features +// features import { setError, setNavigate, setToast } from '@extension/features/system'; import { fetchSettings } from '@extension/features/settings'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { IAppThunkDispatch } from '@extension/types'; const Root: FC = () => { diff --git a/src/extension/apps/registration/index.ts b/src/extension/apps/registration/index.ts index ac7e565a..12ee4b1e 100644 --- a/src/extension/apps/registration/index.ts +++ b/src/extension/apps/registration/index.ts @@ -1,7 +1,7 @@ -// Apps +// components import App from './App'; -// Utils +// utils import { bootstrapApp } from '@extension/utils'; window.onload = bootstrapApp(App); diff --git a/src/extension/components/AccountActivityTab/AccountActivityTab.tsx b/src/extension/components/AccountActivityTab/AccountActivityTab.tsx index 4b7a9850..b91d2f7a 100644 --- a/src/extension/components/AccountActivityTab/AccountActivityTab.tsx +++ b/src/extension/components/AccountActivityTab/AccountActivityTab.tsx @@ -4,30 +4,30 @@ import React, { FC, ReactNode, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { useDispatch } from 'react-redux'; -// Components +// components import EmptyState from '@extension/components/EmptyState'; import ScrollableTabPanel from '@extension/components/ScrollableTabPanel'; import TransactionItem from '@extension/components/TransactionItem'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Features +// features import { IAccountTransaction, updateAccountTransactionsThunk, } from '@extension/features/transactions'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; -// Selectors +// selectors import { useSelectAccountTransactionByAccountId } from '@extension/selectors'; -// Types +// types import { IAccount, IAppThunkDispatch, INetwork } from '@extension/types'; -// Utils +// utils import { ellipseAddress } from '@extension/utils'; interface IProps { diff --git a/src/extension/components/AccountAssetsTab/AccountAssetsTab.tsx b/src/extension/components/AccountAssetsTab/AccountAssetsTab.tsx index b046d367..e97a6323 100644 --- a/src/extension/components/AccountAssetsTab/AccountAssetsTab.tsx +++ b/src/extension/components/AccountAssetsTab/AccountAssetsTab.tsx @@ -17,15 +17,15 @@ import { useTranslation } from 'react-i18next'; import { IoAdd, IoChevronForward } from 'react-icons/io5'; import { Link } from 'react-router-dom'; -// Components +// components import AssetAvatar from '@extension/components/AssetAvatar'; import AssetIcon from '@extension/components/AssetIcon'; import EmptyState from '@extension/components/EmptyState'; -// Constants +// constants import { ACCOUNTS_ROUTE, ASSETS_ROUTE } from '@extension/constants'; -// Hooks +// hooks import useAccountInformation from '@extension/hooks/useAccountInformation'; import useAssets from '@extension/hooks/useAssets'; import useButtonHoverBackgroundColor from '@extension/hooks/useButtonHoverBackgroundColor'; @@ -33,17 +33,17 @@ import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryButtonTextColor from '@extension/hooks/usePrimaryButtonTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectFetchingAssets, useSelectSelectedNetwork, useSelectUpdatingAssets, } from '@extension/selectors'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { IAccount, IAccountInformation, @@ -51,7 +51,7 @@ import { INetwork, } from '@extension/types'; -// Utils +// utils import { convertToStandardUnit, formatCurrencyUnit } from '@common/utils'; interface IProps { diff --git a/src/extension/components/AccountItem/AccountItem.tsx b/src/extension/components/AccountItem/AccountItem.tsx index a3f3f991..501a7ab8 100644 --- a/src/extension/components/AccountItem/AccountItem.tsx +++ b/src/extension/components/AccountItem/AccountItem.tsx @@ -2,17 +2,17 @@ import { Avatar, Center, HStack, Icon, Text, VStack } from '@chakra-ui/react'; import React, { FC } from 'react'; import { IoWalletOutline } from 'react-icons/io5'; -// Hooks +// hooks import useAccountInformation from '@extension/hooks/useAccountInformation'; import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryButtonTextColor from '@extension/hooks/usePrimaryButtonTextColor'; import usePrimaryColor from '@extension/hooks/usePrimaryColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Types +// types import { IAccount, IAccountInformation } from '@extension/types'; -// Utils +// utils import { ellipseAddress } from '@extension/utils'; import { AccountService } from '@extension/services'; diff --git a/src/extension/components/AccountNftsTab/AccountNftsTab.tsx b/src/extension/components/AccountNftsTab/AccountNftsTab.tsx index cff3e52a..5eae5f8e 100644 --- a/src/extension/components/AccountNftsTab/AccountNftsTab.tsx +++ b/src/extension/components/AccountNftsTab/AccountNftsTab.tsx @@ -2,7 +2,7 @@ import { Heading, Spacer, TabPanel, VStack } from '@chakra-ui/react'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; const AccountNftsTab: FC = () => { diff --git a/src/extension/components/AccountSelect/AccountSelect.tsx b/src/extension/components/AccountSelect/AccountSelect.tsx index 99bb915a..ca76face 100644 --- a/src/extension/components/AccountSelect/AccountSelect.tsx +++ b/src/extension/components/AccountSelect/AccountSelect.tsx @@ -9,14 +9,14 @@ import { import React, { FC } from 'react'; import { IoChevronDown } from 'react-icons/io5'; -// Components +// components import AccountItem from '@extension/components/AccountItem'; -// Hooks +// hooks import useButtonHoverBackgroundColor from '@extension/hooks/useButtonHoverBackgroundColor'; import useColorModeValue from '@extension/hooks/useColorModeValue'; -// Types +// types import { IAccount } from '@extension/types'; interface IProps { diff --git a/src/extension/components/AddressDisplay/AddressDisplay.tsx b/src/extension/components/AddressDisplay/AddressDisplay.tsx index 1f8e8888..d8ae32ef 100644 --- a/src/extension/components/AddressDisplay/AddressDisplay.tsx +++ b/src/extension/components/AddressDisplay/AddressDisplay.tsx @@ -10,26 +10,26 @@ import * as CSS from 'csstype'; import React, { FC } from 'react'; import { IoWalletOutline } from 'react-icons/io5'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useTextBackgroundColor from '@extension/hooks/useTextBackgroundColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectPreferredBlockExplorer, } from '@extension/selectors'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { IAccount, IAccountInformation, INetwork } from '@extension/types'; -// Utils +// utils import { ellipseAddress } from '@extension/utils'; interface IProps { diff --git a/src/extension/components/AssetAvatar/AssetAvatar.tsx b/src/extension/components/AssetAvatar/AssetAvatar.tsx index 8cd95d64..0f64f1ef 100644 --- a/src/extension/components/AssetAvatar/AssetAvatar.tsx +++ b/src/extension/components/AssetAvatar/AssetAvatar.tsx @@ -2,10 +2,10 @@ import { Avatar, AvatarBadge, AvatarProps, Icon } from '@chakra-ui/react'; import React, { FC, ReactElement } from 'react'; import { IoCheckmarkOutline } from 'react-icons/io5'; -// Hooks +// hooks import usePrimaryColor from '@extension/hooks/usePrimaryColor'; -// Types +// types import { IAsset } from '@extension/types'; interface IProps extends AvatarProps { diff --git a/src/extension/components/AssetDisplay/AssetDisplay.tsx b/src/extension/components/AssetDisplay/AssetDisplay.tsx index bc57d686..66338935 100644 --- a/src/extension/components/AssetDisplay/AssetDisplay.tsx +++ b/src/extension/components/AssetDisplay/AssetDisplay.tsx @@ -3,10 +3,10 @@ import BigNumber from 'bignumber.js'; import * as CSS from 'csstype'; import React, { FC, ReactNode } from 'react'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; -// Utils +// utils import { convertToStandardUnit, formatCurrencyUnit } from '@common/utils'; interface IProps { diff --git a/src/extension/components/AssetIcon/AssetIcon.tsx b/src/extension/components/AssetIcon/AssetIcon.tsx index f88f37da..492a1e48 100644 --- a/src/extension/components/AssetIcon/AssetIcon.tsx +++ b/src/extension/components/AssetIcon/AssetIcon.tsx @@ -1,7 +1,7 @@ import { Icon, IconProps } from '@chakra-ui/react'; import React, { FC } from 'react'; -// Components +// components import AlgorandAssetIcon from '@extension/components/AlgorandAssetIcon'; import VoiAssetIcon from '@extension/components/VoiAssetIcon'; diff --git a/src/extension/components/Button/Button.tsx b/src/extension/components/Button/Button.tsx index 8859727d..c1e9de19 100644 --- a/src/extension/components/Button/Button.tsx +++ b/src/extension/components/Button/Button.tsx @@ -7,11 +7,11 @@ import React, { } from 'react'; import { Button as ChakraButton, ButtonProps } from '@chakra-ui/react'; -// Hooks +// hooks import usePrimaryButtonTextColor from '@extension/hooks/usePrimaryButtonTextColor'; import usePrimaryColorScheme from '@extension/hooks/usePrimaryColorScheme'; -// Theme +// theme import { theme } from '@extension/theme'; const Button: ForwardRefExoticComponent< diff --git a/src/extension/components/ChainBadge/ChainBadge.tsx b/src/extension/components/ChainBadge/ChainBadge.tsx index d342f8de..511c9696 100644 --- a/src/extension/components/ChainBadge/ChainBadge.tsx +++ b/src/extension/components/ChainBadge/ChainBadge.tsx @@ -1,16 +1,16 @@ import { ColorMode, HStack, Tag, TagLabel } from '@chakra-ui/react'; import React, { FC } from 'react'; -// Enums +// enums import { NetworkTypeEnum } from '@extension/enums'; -// Types +// types import { INetwork } from '@extension/types'; -// Utils +// utils import { createIconFromDataUri } from '@extension/utils'; -// Selectors +// selectors import { useSelectColorMode } from '@extension/selectors'; interface IProps { diff --git a/src/extension/components/ConfirmModal/ConfirmModal.tsx b/src/extension/components/ConfirmModal/ConfirmModal.tsx index c9b87e09..a2cdd440 100644 --- a/src/extension/components/ConfirmModal/ConfirmModal.tsx +++ b/src/extension/components/ConfirmModal/ConfirmModal.tsx @@ -13,23 +13,23 @@ import { import React, { createRef, FC, RefObject } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import Button from '@extension/components/Button'; import Warning from '@extension/components/Warning'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; -// Features +// features import { IConfirm } from '@extension/features/system'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; -// Selectors +// selectors import { useSelectConfirm } from '@extension/selectors'; -// Theme +// theme import { theme } from '@extension/theme'; interface IProps { diff --git a/src/extension/components/ConfirmPasswordModal/ConfirmPasswordModal.tsx b/src/extension/components/ConfirmPasswordModal/ConfirmPasswordModal.tsx index 1e1657b4..83d80f6b 100644 --- a/src/extension/components/ConfirmPasswordModal/ConfirmPasswordModal.tsx +++ b/src/extension/components/ConfirmPasswordModal/ConfirmPasswordModal.tsx @@ -11,23 +11,23 @@ import React, { ChangeEvent, FC, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import browser from 'webextension-polyfill'; -// Components +// components import Button from '@extension/components/Button'; import PasswordInput from '@extension/components/PasswordInput'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; -// Selectors +// selectors import { useSelectLogger } from '@extension/selectors'; -// Services +// servcies import { PrivateKeyService } from '@extension/services'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { ILogger } from '@common/types'; interface IProps { diff --git a/src/extension/components/CopyButton/CopyButton.tsx b/src/extension/components/CopyButton/CopyButton.tsx index cc1bc83c..27f5e130 100644 --- a/src/extension/components/CopyButton/CopyButton.tsx +++ b/src/extension/components/CopyButton/CopyButton.tsx @@ -3,7 +3,7 @@ import React, { FC } from 'react'; import { IoCheckmarkOutline, IoCopyOutline } from 'react-icons/io5'; import { useTranslation } from 'react-i18next'; -// Components +// components import Button from '@extension/components/Button'; interface IProps extends ButtonProps { diff --git a/src/extension/components/CopyIconButton/CopyIconButton.tsx b/src/extension/components/CopyIconButton/CopyIconButton.tsx index a2c7f925..7defcc1e 100644 --- a/src/extension/components/CopyIconButton/CopyIconButton.tsx +++ b/src/extension/components/CopyIconButton/CopyIconButton.tsx @@ -3,7 +3,7 @@ import React, { FC } from 'react'; import { IoCheckmarkOutline, IoCopyOutline } from 'react-icons/io5'; import { useTranslation } from 'react-i18next'; -// Hooks +// hooks import useButtonHoverBackgroundColor from '@extension/hooks/useButtonHoverBackgroundColor'; import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; diff --git a/src/extension/components/CreatePasswordInput/CreatePasswordInput.tsx b/src/extension/components/CreatePasswordInput/CreatePasswordInput.tsx index 20fc4680..77c01f81 100644 --- a/src/extension/components/CreatePasswordInput/CreatePasswordInput.tsx +++ b/src/extension/components/CreatePasswordInput/CreatePasswordInput.tsx @@ -13,18 +13,18 @@ import React, { ChangeEvent, FC, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; import { IoEye, IoEyeOff } from 'react-icons/io5'; -// Components +// components import DocumentModal from '@extension/components/DocumentModal'; import IconButton from '@extension/components/IconButton'; import StrengthMeter from '@extension/components/StrengthMeter'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryColor from '@extension/hooks/usePrimaryColor'; import usePrimaryColorScheme from '@extension/hooks/usePrimaryColorScheme'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Utils +// utils import { validate } from './utils'; interface IProps { diff --git a/src/extension/components/CreatePasswordInput/utils/validate.ts b/src/extension/components/CreatePasswordInput/utils/validate.ts index c53aad89..dbbc4022 100644 --- a/src/extension/components/CreatePasswordInput/utils/validate.ts +++ b/src/extension/components/CreatePasswordInput/utils/validate.ts @@ -1,6 +1,6 @@ import { TFunction } from 'i18next'; -// Constants +// constants import { PASSWORD_MIN_LENGTH, PASSWORD_MIN_SCORE } from '@extension/constants'; /** diff --git a/src/extension/components/DeflateBallonIcon/DeflateBalloonIcon.tsx b/src/extension/components/DeflateBallonIcon/DeflateBalloonIcon.tsx index 99c70c2f..2a2c3479 100644 --- a/src/extension/components/DeflateBallonIcon/DeflateBalloonIcon.tsx +++ b/src/extension/components/DeflateBallonIcon/DeflateBalloonIcon.tsx @@ -1,10 +1,10 @@ import { Icon, IconProps } from '@chakra-ui/react'; import React, { FC } from 'react'; -// Hooks +// hooks import useColorModeValue from '@extension/hooks/useColorModeValue'; -// Theme +// theme import { theme } from '@extension/theme'; interface IProps extends Omit { diff --git a/src/extension/components/Divider/Divider.tsx b/src/extension/components/Divider/Divider.tsx index 08d4cf23..9398f3a4 100644 --- a/src/extension/components/Divider/Divider.tsx +++ b/src/extension/components/Divider/Divider.tsx @@ -1,7 +1,7 @@ import { Box } from '@chakra-ui/react'; import React, { FC } from 'react'; -// Hooks +// hooks import useBorderColor from '@extension/hooks/useBorderColor'; const Divider: FC = () => ( diff --git a/src/extension/components/DocumentModal/DocumentModal.tsx b/src/extension/components/DocumentModal/DocumentModal.tsx index fb846dc8..c07da5ee 100644 --- a/src/extension/components/DocumentModal/DocumentModal.tsx +++ b/src/extension/components/DocumentModal/DocumentModal.tsx @@ -17,20 +17,20 @@ import { useTranslation } from 'react-i18next'; import ReactMarkdown from 'react-markdown'; import browser from 'webextension-polyfill'; -// Components +// components import Button from '@extension/components/Button'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useDocument from './hooks/useDocument'; -// Theme +// theme import { theme } from '@extension/theme'; -// Utils +// utils import { createComponents } from './utils'; interface IProps { diff --git a/src/extension/components/DocumentModal/hooks/useDocument/types/IUseDocumentState.ts b/src/extension/components/DocumentModal/hooks/useDocument/types/IUseDocumentState.ts index 3f67da42..63a4d0ba 100644 --- a/src/extension/components/DocumentModal/hooks/useDocument/types/IUseDocumentState.ts +++ b/src/extension/components/DocumentModal/hooks/useDocument/types/IUseDocumentState.ts @@ -1,4 +1,4 @@ -// Types +// types import IDocument from './IDocument'; interface IUseDocumentState { diff --git a/src/extension/components/DocumentModal/hooks/useDocument/useDocument.ts b/src/extension/components/DocumentModal/hooks/useDocument/useDocument.ts index 8be0877a..9570bc71 100644 --- a/src/extension/components/DocumentModal/hooks/useDocument/useDocument.ts +++ b/src/extension/components/DocumentModal/hooks/useDocument/useDocument.ts @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react'; -// Types +// types import { IDocument, IUseDocumentState } from './types'; export default function useDocument(documentUrl: string): IUseDocumentState { diff --git a/src/extension/components/EmptyIcon/EmptyIcon.tsx b/src/extension/components/EmptyIcon/EmptyIcon.tsx index 64639ee3..dd08e86b 100644 --- a/src/extension/components/EmptyIcon/EmptyIcon.tsx +++ b/src/extension/components/EmptyIcon/EmptyIcon.tsx @@ -1,10 +1,10 @@ import { Icon, IconProps } from '@chakra-ui/react'; import React, { FC } from 'react'; -// Hooks +// hooks import useColorModeValue from '@extension/hooks/useColorModeValue'; -// Theme +// theme import { theme } from '@extension/theme'; interface IProps extends Omit { diff --git a/src/extension/components/EmptyState/EmptyState.tsx b/src/extension/components/EmptyState/EmptyState.tsx index 432cf598..6671248e 100644 --- a/src/extension/components/EmptyState/EmptyState.tsx +++ b/src/extension/components/EmptyState/EmptyState.tsx @@ -8,11 +8,11 @@ import { import React, { FC, MouseEvent } from 'react'; import { IconType } from 'react-icons'; -// Components +// components import Button from '@extension/components/Button'; import EmptyIcon from '@extension/components/EmptyIcon'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; diff --git a/src/extension/components/EnableModal/EnableModal.tsx b/src/extension/components/EnableModal/EnableModal.tsx index 3ba62e29..cb6e5b92 100644 --- a/src/extension/components/EnableModal/EnableModal.tsx +++ b/src/extension/components/EnableModal/EnableModal.tsx @@ -18,32 +18,32 @@ import React, { ChangeEvent, FC, ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; import { useDispatch } from 'react-redux'; -// Components +// components import Button from '@extension/components/Button'; import EmptyState from '@extension/components/EmptyState'; import SessionRequestHeader, { SessionRequestHeaderSkeleton, } from '@extension/components/SessionRequestHeader'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; -// Errors +// errors import { SerializableOperationCanceledError } from '@common/errors'; -// Features +// features import { sendEnableResponseThunk, setEnableRequest, } from '@extension/features/messages'; import { setSessionThunk } from '@extension/features/sessions'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryColorScheme from '@extension/hooks/usePrimaryColorScheme'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectEnableRequest, @@ -51,13 +51,13 @@ import { useSelectSavingSessions, } from '@extension/selectors'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { IAccount, IAccountInformation, @@ -66,7 +66,7 @@ import { ISession, } from '@extension/types'; -// Utils +// utils import { ellipseAddress, mapSessionFromEnableRequest } from '@extension/utils'; interface IProps { diff --git a/src/extension/components/EnterMnemonicPhraseInput/EnterMnemonicPhraseInput.tsx b/src/extension/components/EnterMnemonicPhraseInput/EnterMnemonicPhraseInput.tsx index aec25b0d..eb70de80 100644 --- a/src/extension/components/EnterMnemonicPhraseInput/EnterMnemonicPhraseInput.tsx +++ b/src/extension/components/EnterMnemonicPhraseInput/EnterMnemonicPhraseInput.tsx @@ -17,7 +17,7 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryColor from '@extension/hooks/usePrimaryColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; diff --git a/src/extension/components/EnterMnemonicPhraseInput/utils/validate.ts b/src/extension/components/EnterMnemonicPhraseInput/utils/validate.ts index 8b2c58b5..a88af80a 100644 --- a/src/extension/components/EnterMnemonicPhraseInput/utils/validate.ts +++ b/src/extension/components/EnterMnemonicPhraseInput/utils/validate.ts @@ -1,6 +1,6 @@ import { TFunction } from 'i18next'; -// Utils +// utils import { isMnemonicValid } from '@extension/utils'; export default function validate( diff --git a/src/extension/components/ErrorModal/ErrorModal.tsx b/src/extension/components/ErrorModal/ErrorModal.tsx index 282f6920..3f3ad8d7 100644 --- a/src/extension/components/ErrorModal/ErrorModal.tsx +++ b/src/extension/components/ErrorModal/ErrorModal.tsx @@ -13,23 +13,23 @@ import React, { FC } from 'react'; import { Trans, useTranslation } from 'react-i18next'; import { IoWarning } from 'react-icons/io5'; -// Components +// components import Button from '@extension/components/Button'; -// Constants +// constants import { SUPPORT_MAIL_TO_LINK } from '@extension/constants'; -// Errors +// errors import { BaseExtensionError } from '@extension/errors'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectError } from '@extension/selectors'; -// Theme +// theme import { theme } from '@extension/theme'; interface IProps { diff --git a/src/extension/components/Fonts/Fonts.tsx b/src/extension/components/Fonts/Fonts.tsx index 6654c9b5..b62a0a54 100644 --- a/src/extension/components/Fonts/Fonts.tsx +++ b/src/extension/components/Fonts/Fonts.tsx @@ -1,7 +1,7 @@ import { Global } from '@emotion/react'; import React, { FC } from 'react'; -// Fonts +// fonts import AnonymousProBoldSvg from '@extension/fonts/AnonymousPro/AnonymousPro-Bold.svg'; import AnonymousProBoldTtf from '@extension/fonts/AnonymousPro/AnonymousPro-Bold.ttf'; import AnonymousProBoldWoff from '@extension/fonts/AnonymousPro/AnonymousPro-Bold.woff'; @@ -16,9 +16,9 @@ const Fonts: FC = () => ( styles={` /* latin */ @font-face { - font-family: 'AnonymousPro - Bold'; + font-family: 'AnonymousPro'; font-style: normal; - font-weight: 700; + font-weight: 600, 700; font-display: swap; src: url(${AnonymousProBoldTtf}) format('truetype'), url(${AnonymousProBoldWoff2}) format('woff2'), diff --git a/src/extension/components/IconButton/IconButton.tsx b/src/extension/components/IconButton/IconButton.tsx index 9b401294..78a330d4 100644 --- a/src/extension/components/IconButton/IconButton.tsx +++ b/src/extension/components/IconButton/IconButton.tsx @@ -12,7 +12,7 @@ import React, { } from 'react'; import { IconType } from 'react-icons'; -// Hooks +// hooks import useButtonHoverBackgroundColor from '@extension/hooks/useButtonHoverBackgroundColor'; import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; diff --git a/src/extension/components/InnerTransactionAccordion/AssetConfigInnerTransactionAccordionItem.tsx b/src/extension/components/InnerTransactionAccordion/AssetConfigInnerTransactionAccordionItem.tsx index b76a149b..5ee02ea6 100644 --- a/src/extension/components/InnerTransactionAccordion/AssetConfigInnerTransactionAccordionItem.tsx +++ b/src/extension/components/InnerTransactionAccordion/AssetConfigInnerTransactionAccordionItem.tsx @@ -13,23 +13,23 @@ import * as CSS from 'csstype'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AddressDisplay from '@extension/components/AddressDisplay'; import CopyIconButton from '@extension/components/CopyIconButton'; import OpenTabIconButton from '@extension/components/OpenTabIconButton'; import PageItem from '@extension/components/PageItem'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectPreferredBlockExplorer, } from '@extension/selectors'; -// Types +// types import { IAccount, IAssetConfigTransaction, @@ -37,7 +37,7 @@ import { INetwork, } from '@extension/types'; -// Utils +// utils import { isAccountKnown } from '@extension/utils'; interface IProps { diff --git a/src/extension/components/InnerTransactionAccordion/AssetCreateInnerTransactionAccordionItem.tsx b/src/extension/components/InnerTransactionAccordion/AssetCreateInnerTransactionAccordionItem.tsx index 091a8ca7..4837de31 100644 --- a/src/extension/components/InnerTransactionAccordion/AssetCreateInnerTransactionAccordionItem.tsx +++ b/src/extension/components/InnerTransactionAccordion/AssetCreateInnerTransactionAccordionItem.tsx @@ -14,25 +14,25 @@ import * as CSS from 'csstype'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AddressDisplay from '@extension/components/AddressDisplay'; import AssetDisplay from '@extension/components/AssetDisplay'; import AssetIcon from '@extension/components/AssetIcon'; import OpenTabIconButton from '@extension/components/OpenTabIconButton'; import PageItem from '@extension/components/PageItem'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryButtonTextColor from '@extension/hooks/usePrimaryButtonTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectPreferredBlockExplorer, } from '@extension/selectors'; -// Types +// types import { IAccount, IAssetCreateTransaction, @@ -40,7 +40,7 @@ import { INetwork, } from '@extension/types'; -// Utils +// utils import { isAccountKnown } from '@extension/utils'; interface IProps { diff --git a/src/extension/components/InnerTransactionAccordion/AssetDeleteInnerTransactionAccordionItem.tsx b/src/extension/components/InnerTransactionAccordion/AssetDeleteInnerTransactionAccordionItem.tsx index b7c5616d..189b5433 100644 --- a/src/extension/components/InnerTransactionAccordion/AssetDeleteInnerTransactionAccordionItem.tsx +++ b/src/extension/components/InnerTransactionAccordion/AssetDeleteInnerTransactionAccordionItem.tsx @@ -13,23 +13,23 @@ import * as CSS from 'csstype'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AddressDisplay from '@extension/components/AddressDisplay'; import CopyIconButton from '@extension/components/CopyIconButton'; import OpenTabIconButton from '@extension/components/OpenTabIconButton'; import PageItem from '@extension/components/PageItem'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectPreferredBlockExplorer, } from '@extension/selectors'; -// Types +// types import { IAccount, IAssetDestroyTransaction, @@ -37,7 +37,7 @@ import { INetwork, } from '@extension/types'; -// Utils +// utils import { isAccountKnown } from '@extension/utils'; interface IProps { diff --git a/src/extension/components/InnerTransactionAccordion/AssetFreezeInnerTransactionAccordionItem.tsx b/src/extension/components/InnerTransactionAccordion/AssetFreezeInnerTransactionAccordionItem.tsx index e7cbb6bd..9612bd9d 100644 --- a/src/extension/components/InnerTransactionAccordion/AssetFreezeInnerTransactionAccordionItem.tsx +++ b/src/extension/components/InnerTransactionAccordion/AssetFreezeInnerTransactionAccordionItem.tsx @@ -14,27 +14,27 @@ import * as CSS from 'csstype'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AddressDisplay from '@extension/components/AddressDisplay'; import CopyIconButton from '@extension/components/CopyIconButton'; import OpenTabIconButton from '@extension/components/OpenTabIconButton'; import PageItem from '@extension/components/PageItem'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Hooks +// hooks import useAsset from '@extension/hooks/useAsset'; import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectPreferredBlockExplorer, } from '@extension/selectors'; -// Types +// types import { IAccount, IAssetFreezeTransaction, @@ -43,7 +43,7 @@ import { INetwork, } from '@extension/types'; -// Utils +// utils import { isAccountKnown } from '@extension/utils'; interface IProps { diff --git a/src/extension/components/InnerTransactionAccordion/AssetTransferInnerTransactionAccordionItem.tsx b/src/extension/components/InnerTransactionAccordion/AssetTransferInnerTransactionAccordionItem.tsx index e68918a1..58684458 100644 --- a/src/extension/components/InnerTransactionAccordion/AssetTransferInnerTransactionAccordionItem.tsx +++ b/src/extension/components/InnerTransactionAccordion/AssetTransferInnerTransactionAccordionItem.tsx @@ -15,28 +15,28 @@ import * as CSS from 'csstype'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AddressDisplay from '@extension/components/AddressDisplay'; import AssetDisplay from '@extension/components/AssetDisplay'; import CopyIconButton from '@extension/components/CopyIconButton'; import OpenTabIconButton from '@extension/components/OpenTabIconButton'; import PageItem from '@extension/components/PageItem'; -// Hooks +// hooks import useAsset from '@extension/hooks/useAsset'; import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectPreferredBlockExplorer, } from '@extension/selectors'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { IAccount, IAssetTransferTransaction, @@ -44,7 +44,7 @@ import { INetwork, } from '@extension/types'; -// Utils +// utils import { isAccountKnown } from '@extension/utils'; interface IProps { diff --git a/src/extension/components/InnerTransactionAccordion/DefaultInnerTransactionAccordionItem.tsx b/src/extension/components/InnerTransactionAccordion/DefaultInnerTransactionAccordionItem.tsx index 1ed430a9..87e0d982 100644 --- a/src/extension/components/InnerTransactionAccordion/DefaultInnerTransactionAccordionItem.tsx +++ b/src/extension/components/InnerTransactionAccordion/DefaultInnerTransactionAccordionItem.tsx @@ -13,25 +13,25 @@ import * as CSS from 'csstype'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AddressDisplay from '@extension/components/AddressDisplay'; import OpenTabIconButton from '@extension/components/OpenTabIconButton'; import PageItem from '@extension/components/PageItem'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectPreferredBlockExplorer, } from '@extension/selectors'; -// Types +// types import { IAccount, IExplorer, INetwork, ITransactions } from '@extension/types'; -// Utils +// utils import { isAccountKnown } from '@extension/utils'; interface IProps { diff --git a/src/extension/components/InnerTransactionAccordion/InnerTransactionAccordion.tsx b/src/extension/components/InnerTransactionAccordion/InnerTransactionAccordion.tsx index d8f62447..4cfd3141 100644 --- a/src/extension/components/InnerTransactionAccordion/InnerTransactionAccordion.tsx +++ b/src/extension/components/InnerTransactionAccordion/InnerTransactionAccordion.tsx @@ -2,7 +2,7 @@ import { Accordion, ResponsiveValue } from '@chakra-ui/react'; import * as CSS from 'csstype'; import React, { FC } from 'react'; -// Components +// components import AssetConfigInnerTransactionAccordionItem from './AssetConfigInnerTransactionAccordionItem'; import AssetCreateInnerTransactionAccordionItem from './AssetCreateInnerTransactionAccordionItem'; import AssetDeleteInnerTransactionAccordionItem from './AssetDeleteInnerTransactionAccordionItem'; @@ -11,10 +11,10 @@ import AssetTransferInnerTransactionAccordionItem from './AssetTransferInnerTran import DefaultInnerTransactionAccordionItem from './DefaultInnerTransactionAccordionItem'; import PaymentInnerTransactionAccordionItem from './PaymentInnerTransactionAccordionItem'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import { IAccount, INetwork, ITransactions } from '@extension/types'; interface IProps { diff --git a/src/extension/components/InnerTransactionAccordion/PaymentInnerTransactionAccordionItem.tsx b/src/extension/components/InnerTransactionAccordion/PaymentInnerTransactionAccordionItem.tsx index 8a91eeb5..031dc63c 100644 --- a/src/extension/components/InnerTransactionAccordion/PaymentInnerTransactionAccordionItem.tsx +++ b/src/extension/components/InnerTransactionAccordion/PaymentInnerTransactionAccordionItem.tsx @@ -14,26 +14,26 @@ import * as CSS from 'csstype'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AddressDisplay from '@extension/components/AddressDisplay'; import AssetDisplay from '@extension/components/AssetDisplay'; import OpenTabIconButton from '@extension/components/OpenTabIconButton'; import PageItem from '@extension/components/PageItem'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectPreferredBlockExplorer, } from '@extension/selectors'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { IAccount, IExplorer, @@ -41,7 +41,7 @@ import { IPaymentTransaction, } from '@extension/types'; -// Utils +// utils import { createIconFromDataUri, isAccountKnown } from '@extension/utils'; interface IProps { diff --git a/src/extension/components/LoadingPage/LoadingPage.tsx b/src/extension/components/LoadingPage/LoadingPage.tsx index d10cc3c1..b9ea9fd0 100644 --- a/src/extension/components/LoadingPage/LoadingPage.tsx +++ b/src/extension/components/LoadingPage/LoadingPage.tsx @@ -2,10 +2,10 @@ import { Center, Flex } from '@chakra-ui/react'; import React, { FC } from 'react'; import { InfinitySpin } from 'react-loader-spinner'; -// Hooks +// hooks import useColorModeValue from '@extension/hooks/useColorModeValue'; -// Theme +// theme import { theme } from '@extension/theme'; const LoadingPage: FC = () => { diff --git a/src/extension/components/MainLayout/MainLayout.tsx b/src/extension/components/MainLayout/MainLayout.tsx index 9d653b15..127c015a 100644 --- a/src/extension/components/MainLayout/MainLayout.tsx +++ b/src/extension/components/MainLayout/MainLayout.tsx @@ -1,13 +1,13 @@ import { Center, HStack, VStack } from '@chakra-ui/react'; import React, { FC, ReactNode } from 'react'; -// Components +// components import SideBar from '@extension/components/SideBar'; -// Constants +// constants import { SIDEBAR_BORDER_WIDTH, SIDEBAR_MIN_WIDTH } from '@extension/constants'; -// Selectors +// selectors import { useSelectSideBar } from '@extension/selectors'; interface IProps { diff --git a/src/extension/components/MoreInformationAccordion/MoreInformationAccordion.tsx b/src/extension/components/MoreInformationAccordion/MoreInformationAccordion.tsx index ebbca48b..c069cf8e 100644 --- a/src/extension/components/MoreInformationAccordion/MoreInformationAccordion.tsx +++ b/src/extension/components/MoreInformationAccordion/MoreInformationAccordion.tsx @@ -11,7 +11,7 @@ import * as CSS from 'csstype'; import React, { FC, ReactElement } from 'react'; import { useTranslation } from 'react-i18next'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; interface IProps { diff --git a/src/extension/components/NativeBalance/NativeBalance.tsx b/src/extension/components/NativeBalance/NativeBalance.tsx index c34b1864..13571c18 100644 --- a/src/extension/components/NativeBalance/NativeBalance.tsx +++ b/src/extension/components/NativeBalance/NativeBalance.tsx @@ -4,18 +4,18 @@ import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; import { IoInformationCircleOutline } from 'react-icons/io5'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useTextBackgroundColor from '@extension/hooks/useTextBackgroundColor'; -// Utils +// utils import { convertToStandardUnit, formatCurrencyUnit } from '@common/utils'; import { createIconFromDataUri } from '@extension/utils'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { INativeCurrency } from '@extension/types'; interface IProps { diff --git a/src/extension/components/NativeBalance/NativeBalanceSkeleton.tsx b/src/extension/components/NativeBalance/NativeBalanceSkeleton.tsx index 62c71881..dad8f7df 100644 --- a/src/extension/components/NativeBalance/NativeBalanceSkeleton.tsx +++ b/src/extension/components/NativeBalance/NativeBalanceSkeleton.tsx @@ -2,10 +2,10 @@ import { HStack, Skeleton, Text } from '@chakra-ui/react'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AlgorandIcon from '@extension/components/AlgorandIcon'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; const NativeBalanceSkeleton: FC = () => { diff --git a/src/extension/components/NetworkSelect/NetworkSelect.tsx b/src/extension/components/NetworkSelect/NetworkSelect.tsx index e7c18d40..ef91cd05 100644 --- a/src/extension/components/NetworkSelect/NetworkSelect.tsx +++ b/src/extension/components/NetworkSelect/NetworkSelect.tsx @@ -9,13 +9,13 @@ import { import React, { FC } from 'react'; import { IoChevronDown } from 'react-icons/io5'; -// Components +// components import ChainBadge from '@extension/components/ChainBadge'; -// Hooks +// hooks import useButtonHoverBackgroundColor from '@extension/hooks/useButtonHoverBackgroundColor'; -// Types +// types import { INetwork } from '@extension/types'; interface IProps { diff --git a/src/extension/components/NetworkSelect/NetworkSelectSkeleton.tsx b/src/extension/components/NetworkSelect/NetworkSelectSkeleton.tsx index 685e1828..02a1e96c 100644 --- a/src/extension/components/NetworkSelect/NetworkSelectSkeleton.tsx +++ b/src/extension/components/NetworkSelect/NetworkSelectSkeleton.tsx @@ -2,10 +2,10 @@ import { Button as ChakraButton, HStack, Skeleton } from '@chakra-ui/react'; import React, { FC } from 'react'; import { IoChevronDown } from 'react-icons/io5'; -// Components +// components import ChainBadge from '@extension/components/ChainBadge'; -// Types +// types import { INetwork } from '@extension/types'; interface IProps { diff --git a/src/extension/components/OpenTabIconButton/OpenTabIconButton.tsx b/src/extension/components/OpenTabIconButton/OpenTabIconButton.tsx index c1548b7c..1252de79 100644 --- a/src/extension/components/OpenTabIconButton/OpenTabIconButton.tsx +++ b/src/extension/components/OpenTabIconButton/OpenTabIconButton.tsx @@ -3,7 +3,7 @@ import React, { FC } from 'react'; import { IoOpenOutline } from 'react-icons/io5'; import browser from 'webextension-polyfill'; -// Hooks +// hooks import useButtonHoverBackgroundColor from '@extension/hooks/useButtonHoverBackgroundColor'; import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; diff --git a/src/extension/components/PageHeader/PageHeader.tsx b/src/extension/components/PageHeader/PageHeader.tsx index c61b6925..6e04a67a 100644 --- a/src/extension/components/PageHeader/PageHeader.tsx +++ b/src/extension/components/PageHeader/PageHeader.tsx @@ -3,13 +3,13 @@ import React, { FC } from 'react'; import { IoArrowBackOutline } from 'react-icons/io5'; import { NavigateFunction, useNavigate } from 'react-router-dom'; -// Components +// components import IconButton from '@extension/components/IconButton'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; diff --git a/src/extension/components/PageItem/PageItem.tsx b/src/extension/components/PageItem/PageItem.tsx index 1949cc5f..67791db2 100644 --- a/src/extension/components/PageItem/PageItem.tsx +++ b/src/extension/components/PageItem/PageItem.tsx @@ -8,10 +8,10 @@ import { import * as CSS from 'csstype'; import React, { FC, PropsWithChildren } from 'react'; -// Constants +// constants import { ITEM_HEIGHT } from './constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; interface IProps extends PropsWithChildren { diff --git a/src/extension/components/PasswordInput/PasswordInput.tsx b/src/extension/components/PasswordInput/PasswordInput.tsx index f4716be8..e6a62ef6 100644 --- a/src/extension/components/PasswordInput/PasswordInput.tsx +++ b/src/extension/components/PasswordInput/PasswordInput.tsx @@ -10,10 +10,10 @@ import React, { ChangeEvent, FC, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { IoEye, IoEyeOff } from 'react-icons/io5'; -// Components +// components import IconButton from '@extension/components/IconButton'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryColor from '@extension/hooks/usePrimaryColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; diff --git a/src/extension/components/PillSwitch/PillSwitch.tsx b/src/extension/components/PillSwitch/PillSwitch.tsx index 01e11d8b..37a0f806 100644 --- a/src/extension/components/PillSwitch/PillSwitch.tsx +++ b/src/extension/components/PillSwitch/PillSwitch.tsx @@ -8,11 +8,11 @@ import { } from '@chakra-ui/react'; import React, { FC } from 'react'; -// Hooks +// hooks import useBorderColor from '@extension/hooks/useBorderColor'; import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; -// Theme +// theme import { theme } from '@extension/theme'; interface IProps { diff --git a/src/extension/components/RegistrationLayout/PageShell.tsx b/src/extension/components/RegistrationLayout/PageShell.tsx index b5e32e52..215cf4e9 100644 --- a/src/extension/components/RegistrationLayout/PageShell.tsx +++ b/src/extension/components/RegistrationLayout/PageShell.tsx @@ -1,7 +1,7 @@ import { Center, Flex, FlexProps } from '@chakra-ui/react'; import React, { FC, ReactNode } from 'react'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; interface IProps extends FlexProps { diff --git a/src/extension/components/SettingsLinkItem/SettingsLinkItem.tsx b/src/extension/components/SettingsLinkItem/SettingsLinkItem.tsx index 7c14e4ea..1f8f2040 100644 --- a/src/extension/components/SettingsLinkItem/SettingsLinkItem.tsx +++ b/src/extension/components/SettingsLinkItem/SettingsLinkItem.tsx @@ -4,10 +4,10 @@ import { IconType } from 'react-icons'; import { IoChevronForward } from 'react-icons/io5'; import { Link } from 'react-router-dom'; -// Constants +// constants import { DEFAULT_GAP, SETTINGS_ITEM_HEIGHT } from '@extension/constants'; -// Hooks +// hooks import useButtonHoverBackgroundColor from '@extension/hooks/useButtonHoverBackgroundColor'; import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; diff --git a/src/extension/components/SettingsSelectItem/SettingsSelectItem.tsx b/src/extension/components/SettingsSelectItem/SettingsSelectItem.tsx index 41fb613b..59eb6226 100644 --- a/src/extension/components/SettingsSelectItem/SettingsSelectItem.tsx +++ b/src/extension/components/SettingsSelectItem/SettingsSelectItem.tsx @@ -1,10 +1,10 @@ import { Box, HStack, Select, Text, VStack } from '@chakra-ui/react'; import React, { ChangeEvent, FC } from 'react'; -// Constants +// constants import { DEFAULT_GAP, SETTINGS_ITEM_HEIGHT } from '@extension/constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; diff --git a/src/extension/components/SettingsSubHeading/SettingsSubHeading.tsx b/src/extension/components/SettingsSubHeading/SettingsSubHeading.tsx index cca5d117..5ac029f6 100644 --- a/src/extension/components/SettingsSubHeading/SettingsSubHeading.tsx +++ b/src/extension/components/SettingsSubHeading/SettingsSubHeading.tsx @@ -1,10 +1,10 @@ import { Text } from '@chakra-ui/react'; import React, { FC } from 'react'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; -// Hooks +// hooks import useSubTextColor from '@extension/hooks/useSubTextColor'; interface IProps { diff --git a/src/extension/components/SettingsSwitchItem/SettingsSwitchItem.tsx b/src/extension/components/SettingsSwitchItem/SettingsSwitchItem.tsx index 3bed6323..bcfad7ac 100644 --- a/src/extension/components/SettingsSwitchItem/SettingsSwitchItem.tsx +++ b/src/extension/components/SettingsSwitchItem/SettingsSwitchItem.tsx @@ -1,10 +1,10 @@ import { HStack, Switch, Text, VStack } from '@chakra-ui/react'; import React, { ChangeEvent, FC } from 'react'; -// Constants +// constants import { DEFAULT_GAP, SETTINGS_ITEM_HEIGHT } from '@extension/constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryColorScheme from '@extension/hooks/usePrimaryColorScheme'; import useSubTextColor from '@extension/hooks/useSubTextColor'; diff --git a/src/extension/components/ShareAddressModal/ShareAddressModal.tsx b/src/extension/components/ShareAddressModal/ShareAddressModal.tsx index 40d7d976..89f2e8ee 100644 --- a/src/extension/components/ShareAddressModal/ShareAddressModal.tsx +++ b/src/extension/components/ShareAddressModal/ShareAddressModal.tsx @@ -18,30 +18,30 @@ import { toString } from 'qrcode'; import React, { FC, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import Button from '@extension/components/Button'; import CopyIconButton from '@extension/components/CopyIconButton'; import PillSwitch from '@extension/components/PillSwitch'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; -// Hooks +// hooks import useColorModeValue from '@extension/hooks/useColorModeValue'; import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryColorScheme from '@extension/hooks/usePrimaryColorScheme'; import useTextBackgroundColor from '@extension/hooks/useTextBackgroundColor'; -// Selectors +// selectors import { useSelectSettings } from '@extension/selectors'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { ISettings } from '@extension/types'; -// Utils +// utils import { ellipseAddress } from '@extension/utils'; interface IProps { diff --git a/src/extension/components/SideBar/SideBar.tsx b/src/extension/components/SideBar/SideBar.tsx index 8094f98e..6ed37af2 100644 --- a/src/extension/components/SideBar/SideBar.tsx +++ b/src/extension/components/SideBar/SideBar.tsx @@ -1,13 +1,4 @@ -import { - Button, - Center, - HStack, - Skeleton, - SkeletonCircle, - Text, - VStack, -} from '@chakra-ui/react'; -import { generateAccount } from 'algosdk'; +import { HStack, Text, VStack } from '@chakra-ui/react'; import React, { FC, ReactNode, @@ -31,14 +22,15 @@ import { useNavigate, } from 'react-router-dom'; -// Components +// components import Divider from '@extension/components/Divider'; import IconButton from '@extension/components/IconButton'; import KibisisIcon from '@extension/components/KibisisIcon'; import SideBarAccountItem from './SideBarAccountItem'; import SideBarActionItem from './SideBarActionItem'; +import SideBarSkeletonAccountItem from './SideBarSkeletonAccountItem'; -// Constants +// constants import { ADD_ACCOUNT_ROUTE, ACCOUNTS_ROUTE, @@ -49,30 +41,27 @@ import { SIDEBAR_MIN_WIDTH, } from '@extension/constants'; -// Features +// features import { openWalletConnectModal } from '@extension/features/sessions'; -// Hooks +// hooks import useBorderColor from '@extension/hooks/useBorderColor'; import useButtonHoverBackgroundColor from '@extension/hooks/useButtonHoverBackgroundColor'; import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryColor from '@extension/hooks/usePrimaryColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectFetchingAccounts, } from '@extension/selectors'; -// Service +// service import { AccountService } from '@extension/services'; -// Types +// types import { IAccount, IAppThunkDispatch } from '@extension/types'; -// Utils -import { ellipseAddress } from '@extension/utils'; - const SideBar: FC = () => { const { t } = useTranslation(); const dispatch: IAppThunkDispatch = useDispatch(); @@ -123,33 +112,7 @@ const SideBar: FC = () => { const renderAccounts: () => ReactNode = () => { if (fetchingAccounts) { return Array.from({ length: 3 }, (_, index) => ( - + )); } @@ -233,7 +196,10 @@ const SideBar: FC = () => { variant="ghost" /> + + + {/*accounts*/} {renderAccounts()} diff --git a/src/extension/components/SideBar/SideBarAccountItem.tsx b/src/extension/components/SideBar/SideBarAccountItem.tsx index 6128221e..54205964 100644 --- a/src/extension/components/SideBar/SideBarAccountItem.tsx +++ b/src/extension/components/SideBar/SideBarAccountItem.tsx @@ -12,10 +12,10 @@ import { import React, { FC } from 'react'; import { IoWalletOutline } from 'react-icons/io5'; -// Constants +// constants import { SIDEBAR_ITEM_HEIGHT, SIDEBAR_MIN_WIDTH } from '@extension/constants'; -// Hooks +// hooks import useAccountInformation from '@extension/hooks/useAccountInformation'; import useButtonHoverBackgroundColor from '@extension/hooks/useButtonHoverBackgroundColor'; import useColorModeValue from '@extension/hooks/useColorModeValue'; @@ -24,13 +24,13 @@ import usePrimaryButtonTextColor from '@extension/hooks/usePrimaryButtonTextColo import usePrimaryColor from '@extension/hooks/usePrimaryColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { IAccount, IAccountInformation } from '@extension/types'; -// Utils +// utils import { ellipseAddress } from '@extension/utils'; interface IProps { @@ -115,6 +115,7 @@ const SideBarAccountItem: FC = ({ > {accountInformation.name} + {ellipseAddress(address, { end: 10, diff --git a/src/extension/components/SideBar/SideBarActionItem.tsx b/src/extension/components/SideBar/SideBarActionItem.tsx index 86769b56..d96ee68a 100644 --- a/src/extension/components/SideBar/SideBarActionItem.tsx +++ b/src/extension/components/SideBar/SideBarActionItem.tsx @@ -2,10 +2,10 @@ import { Button, Center, HStack, Icon, Text, Tooltip } from '@chakra-ui/react'; import React, { FC, MouseEvent } from 'react'; import { IconType } from 'react-icons'; -// Constants +// constants import { SIDEBAR_ITEM_HEIGHT, SIDEBAR_MIN_WIDTH } from '@extension/constants'; -// Hooks +// hooks import useButtonHoverBackgroundColor from '@extension/hooks/useButtonHoverBackgroundColor'; import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; diff --git a/src/extension/components/SideBar/SideBarSkeletonAccountItem.tsx b/src/extension/components/SideBar/SideBarSkeletonAccountItem.tsx new file mode 100644 index 00000000..61bb118d --- /dev/null +++ b/src/extension/components/SideBar/SideBarSkeletonAccountItem.tsx @@ -0,0 +1,58 @@ +import { + Button, + Center, + HStack, + Skeleton, + SkeletonCircle, + Text, +} from '@chakra-ui/react'; +import React, { FC } from 'react'; + +// constants +import { SIDEBAR_ITEM_HEIGHT, SIDEBAR_MIN_WIDTH } from '@extension/constants'; + +// hooks +import useButtonHoverBackgroundColor from '@extension/hooks/useButtonHoverBackgroundColor'; +import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; + +// utils +import { ellipseAddress } from '@extension/utils'; +import { generateAccount } from 'algosdk'; + +const SideBarSkeletonAccountItem: FC = () => { + // hooks + const buttonHoverBackgroundColor: string = useButtonHoverBackgroundColor(); + const defaultTextColor: string = useDefaultTextColor(); + + return ( + + ); +}; + +export default SideBarSkeletonAccountItem; diff --git a/src/extension/components/SignBytesModal/SignBytesJwtContent.tsx b/src/extension/components/SignBytesModal/SignBytesJwtContent.tsx index 55f4b347..0f6504d6 100644 --- a/src/extension/components/SignBytesModal/SignBytesJwtContent.tsx +++ b/src/extension/components/SignBytesModal/SignBytesJwtContent.tsx @@ -15,17 +15,17 @@ import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; import { IoWarningOutline } from 'react-icons/io5'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useTextBackgroundColor from '@extension/hooks/useTextBackgroundColor'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { IAccount, IDecodedJwt } from '@extension/types'; interface IProps { diff --git a/src/extension/components/SignBytesModal/SignBytesModal.tsx b/src/extension/components/SignBytesModal/SignBytesModal.tsx index be670527..f1d7aaa1 100644 --- a/src/extension/components/SignBytesModal/SignBytesModal.tsx +++ b/src/extension/components/SignBytesModal/SignBytesModal.tsx @@ -19,49 +19,49 @@ import React, { ChangeEvent, FC, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useDispatch } from 'react-redux'; -// Components +// components import AccountSelect from '@extension/components/AccountSelect'; import AccountItem from '@extension/components/AccountItem'; import Button from '@extension/components/Button'; import PasswordInput from '@extension/components/PasswordInput'; import SignBytesJwtContent from './SignBytesJwtContent'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; -// Enums +// enums import { ErrorCodeEnum } from '@extension/enums'; -// Errors +// errors import { SerializableOperationCanceledError, SerializableUnknownError, } from '@common/errors'; -// Features +// features import { setError } from '@extension/features/system'; import { sendSignBytesResponse } from '@extension/features/messages'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSignBytes from '@extension/hooks/useSignBytes'; import useSubTextColor from '@extension/hooks/useSubTextColor'; import useTextBackgroundColor from '@extension/hooks/useTextBackgroundColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectFetchingAccounts, useSelectSignBytesRequest, } from '@extension/selectors'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { IAccount, IAppThunkDispatch, @@ -69,7 +69,7 @@ import { ISignBytesRequest, } from '@extension/types'; -// Utils +// utils import { decodeJwt, ellipseAddress } from '@extension/utils'; interface IProps { diff --git a/src/extension/components/SignTxnsModal/ApplicationTransactionContent.tsx b/src/extension/components/SignTxnsModal/ApplicationTransactionContent.tsx index c9b3b8d4..b0ca1642 100644 --- a/src/extension/components/SignTxnsModal/ApplicationTransactionContent.tsx +++ b/src/extension/components/SignTxnsModal/ApplicationTransactionContent.tsx @@ -5,7 +5,7 @@ import React, { FC, ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; import { IoInformationCircleOutline } from 'react-icons/io5'; -// Components +// components import CopyIconButton from '@extension/components/CopyIconButton'; import MoreInformationAccordion from '@extension/components/MoreInformationAccordion'; import OpenTabIconButton from '@extension/components/OpenTabIconButton'; @@ -14,18 +14,18 @@ import SignTxnsAddressItem from './SignTxnsAddressItem'; import SignTxnsAssetItem from './SignTxnsAssetItem'; import SignTxnsTextItem from './SignTxnsTextItem'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Types +// types import { IExplorer, INetwork } from '@extension/types'; import { ICondensedProps } from './types'; -// Utils +// utils import { createIconFromDataUri, parseTransactionType } from '@extension/utils'; interface IProps { diff --git a/src/extension/components/SignTxnsModal/AssetConfigTransactionContent.tsx b/src/extension/components/SignTxnsModal/AssetConfigTransactionContent.tsx index 695c8736..b701bdf6 100644 --- a/src/extension/components/SignTxnsModal/AssetConfigTransactionContent.tsx +++ b/src/extension/components/SignTxnsModal/AssetConfigTransactionContent.tsx @@ -5,7 +5,7 @@ import React, { FC, ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; import { IoWarningOutline } from 'react-icons/io5'; -// Components +// components import AssetAvatar from '@extension/components/AssetAvatar'; import AssetIcon from '@extension/components/AssetIcon'; import CopyIconButton from '@extension/components/CopyIconButton'; @@ -17,19 +17,19 @@ import SignTxnsChangeAddressItem from './SignTxnsChangeAddressItem'; import SignTxnsLoadingItem from './SignTxnsLoadingItem'; import SignTxnsTextItem from './SignTxnsTextItem'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryButtonTextColor from '@extension/hooks/usePrimaryButtonTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Types +// types import { IAccount, IAsset, IExplorer, INetwork } from '@extension/types'; import { ICondensedProps } from './types'; -// Utils +// utils import { createIconFromDataUri, parseTransactionType } from '@extension/utils'; import Warning from '@extension/components/Warning'; diff --git a/src/extension/components/SignTxnsModal/AssetCreateTransactionContent.tsx b/src/extension/components/SignTxnsModal/AssetCreateTransactionContent.tsx index d3967e93..c663f386 100644 --- a/src/extension/components/SignTxnsModal/AssetCreateTransactionContent.tsx +++ b/src/extension/components/SignTxnsModal/AssetCreateTransactionContent.tsx @@ -4,7 +4,7 @@ import BigNumber from 'bignumber.js'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AssetIcon from '@extension/components/AssetIcon'; import MoreInformationAccordion from '@extension/components/MoreInformationAccordion'; import OpenTabIconButton from '@extension/components/OpenTabIconButton'; @@ -13,19 +13,19 @@ import SignTxnsAssetItem from './SignTxnsAssetItem'; import SignTxnsLoadingItem from './SignTxnsLoadingItem'; import SignTxnsTextItem from './SignTxnsTextItem'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryButtonTextColor from '@extension/hooks/usePrimaryButtonTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Types +// types import { IAccount, INetwork } from '@extension/types'; import { ICondensedProps } from './types'; -// Utils +// utils import { createIconFromDataUri, parseTransactionType } from '@extension/utils'; interface IProps { diff --git a/src/extension/components/SignTxnsModal/AssetFreezeTransactionContent.tsx b/src/extension/components/SignTxnsModal/AssetFreezeTransactionContent.tsx index 536d4e11..3176d184 100644 --- a/src/extension/components/SignTxnsModal/AssetFreezeTransactionContent.tsx +++ b/src/extension/components/SignTxnsModal/AssetFreezeTransactionContent.tsx @@ -5,7 +5,7 @@ import React, { FC, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { IoWarningOutline } from 'react-icons/io5'; -// Components +// components import AssetAvatar from '@extension/components/AssetAvatar'; import AssetIcon from '@extension/components/AssetIcon'; import CopyIconButton from '@extension/components/CopyIconButton'; @@ -16,24 +16,24 @@ import SignTxnsAssetItem from './SignTxnsAssetItem'; import SignTxnsLoadingItem from './SignTxnsLoadingItem'; import SignTxnsTextItem from './SignTxnsTextItem'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Features +// features import { updateAccountInformation } from '@extension/features/accounts'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryButtonTextColor from '@extension/hooks/usePrimaryButtonTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectLogger } from '@extension/selectors'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { IAccount, @@ -45,7 +45,7 @@ import { } from '@extension/types'; import { ICondensedProps } from './types'; -// Utils +// utils import { createIconFromDataUri, parseTransactionType } from '@extension/utils'; interface IProps { diff --git a/src/extension/components/SignTxnsModal/AssetTransferTransactionContent.tsx b/src/extension/components/SignTxnsModal/AssetTransferTransactionContent.tsx index 9a6b0ca5..991b6143 100644 --- a/src/extension/components/SignTxnsModal/AssetTransferTransactionContent.tsx +++ b/src/extension/components/SignTxnsModal/AssetTransferTransactionContent.tsx @@ -4,7 +4,7 @@ import BigNumber from 'bignumber.js'; import React, { FC, ReactNode, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AssetAvatar from '@extension/components/AssetAvatar'; import AssetIcon from '@extension/components/AssetIcon'; import CopyIconButton from '@extension/components/CopyIconButton'; @@ -15,16 +15,16 @@ import SignTxnsAssetItem from './SignTxnsAssetItem'; import SignTxnsLoadingItem from './SignTxnsLoadingItem'; import SignTxnsTextItem from './SignTxnsTextItem'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryButtonTextColor from '@extension/hooks/usePrimaryButtonTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Types +// types import { IAccount, IAsset, IExplorer, INetwork } from '@extension/types'; import { ICondensedProps } from './types'; -// Utils +// utils import { convertToStandardUnit, formatCurrencyUnit } from '@common/utils'; import { createIconFromDataUri, parseTransactionType } from '@extension/utils'; diff --git a/src/extension/components/SignTxnsModal/KeyRegistrationTransactionContent.tsx b/src/extension/components/SignTxnsModal/KeyRegistrationTransactionContent.tsx index d3c021c3..4ccff4bf 100644 --- a/src/extension/components/SignTxnsModal/KeyRegistrationTransactionContent.tsx +++ b/src/extension/components/SignTxnsModal/KeyRegistrationTransactionContent.tsx @@ -5,24 +5,24 @@ import BigNumber from 'bignumber.js'; import React, { FC, ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import MoreInformationAccordion from '@extension/components/MoreInformationAccordion'; import SignTxnsAddressItem from './SignTxnsAddressItem'; import SignTxnsAssetItem from './SignTxnsAssetItem'; import SignTxnsTextItem from './SignTxnsTextItem'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Types +// types import { IAccount, INetwork } from '@extension/types'; import { ICondensedProps } from './types'; -// Utils +// utils import { createIconFromDataUri, parseTransactionType } from '@extension/utils'; interface IProps { diff --git a/src/extension/components/SignTxnsModal/MultipleTransactionsContent.tsx b/src/extension/components/SignTxnsModal/MultipleTransactionsContent.tsx index 034a4985..047d6f27 100644 --- a/src/extension/components/SignTxnsModal/MultipleTransactionsContent.tsx +++ b/src/extension/components/SignTxnsModal/MultipleTransactionsContent.tsx @@ -4,7 +4,7 @@ import { Transaction } from 'algosdk'; import React, { FC, useState } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import ApplicationTransactionContent from './ApplicationTransactionContent'; import AssetConfigTransactionContent from './AssetConfigTransactionContent'; import AssetCreateTransactionContent from './AssetCreateTransactionContent'; @@ -14,19 +14,19 @@ import KeyRegistrationTransactionContent from './KeyRegistrationTransactionConte import PaymentTransactionContent from './PaymentTransactionContent'; import SignTxnsTextItem from './SignTxnsTextItem'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Hooks +// hooks import useBorderColor from '@extension/hooks/useBorderColor'; -// Selectors +// selectors import { useSelectAssetsByGenesisHash } from '@extension/selectors'; -// Types +// types import { IAccount, IAsset, IExplorer, INetwork } from '@extension/types'; -// Utils +// utils import { computeGroupId } from '@common/utils'; import { parseTransactionType } from '@extension/utils'; diff --git a/src/extension/components/SignTxnsModal/PaymentTransactionContent.tsx b/src/extension/components/SignTxnsModal/PaymentTransactionContent.tsx index 86917761..f9c6ae79 100644 --- a/src/extension/components/SignTxnsModal/PaymentTransactionContent.tsx +++ b/src/extension/components/SignTxnsModal/PaymentTransactionContent.tsx @@ -4,24 +4,24 @@ import BigNumber from 'bignumber.js'; import React, { FC, ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import MoreInformationAccordion from '@extension/components/MoreInformationAccordion'; import SignTxnsAddressItem from './SignTxnsAddressItem'; import SignTxnsAssetItem from './SignTxnsAssetItem'; import SignTxnsTextItem from './SignTxnsTextItem'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Types +// types import { IAccount, IAccountInformation, INetwork } from '@extension/types'; import { ICondensedProps } from './types'; -// Utils +// utils import { convertToStandardUnit, formatCurrencyUnit } from '@common/utils'; import { createIconFromDataUri, parseTransactionType } from '@extension/utils'; import { AccountService } from '@extension/services'; diff --git a/src/extension/components/SignTxnsModal/SignTxnsAddressItem.tsx b/src/extension/components/SignTxnsModal/SignTxnsAddressItem.tsx index d7e7a8c9..58a831d7 100644 --- a/src/extension/components/SignTxnsModal/SignTxnsAddressItem.tsx +++ b/src/extension/components/SignTxnsModal/SignTxnsAddressItem.tsx @@ -2,27 +2,27 @@ import { HStack, StackProps, Text } from '@chakra-ui/react'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AddressDisplay from '@extension/components/AddressDisplay'; import OpenTabIconButton from '@extension/components/OpenTabIconButton'; -// Constants +// constants import { MODAL_ITEM_HEIGHT } from '@extension/constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectPreferredBlockExplorer, } from '@extension/selectors'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { IAccount, IExplorer, INetwork } from '@extension/types'; interface IProps extends StackProps { diff --git a/src/extension/components/SignTxnsModal/SignTxnsAssetItem.tsx b/src/extension/components/SignTxnsModal/SignTxnsAssetItem.tsx index ea435171..e574a49f 100644 --- a/src/extension/components/SignTxnsModal/SignTxnsAssetItem.tsx +++ b/src/extension/components/SignTxnsModal/SignTxnsAssetItem.tsx @@ -2,13 +2,13 @@ import { HStack, Skeleton, StackProps, Text } from '@chakra-ui/react'; import BigNumber from 'bignumber.js'; import React, { FC, ReactNode } from 'react'; -// Components +// components import AssetDisplay from '@extension/components/AssetDisplay'; -// Constants +// constants import { MODAL_ITEM_HEIGHT } from '@extension/constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; diff --git a/src/extension/components/SignTxnsModal/SignTxnsChangeAddressItem.tsx b/src/extension/components/SignTxnsModal/SignTxnsChangeAddressItem.tsx index a6cac1e7..2381b6ee 100644 --- a/src/extension/components/SignTxnsModal/SignTxnsChangeAddressItem.tsx +++ b/src/extension/components/SignTxnsModal/SignTxnsChangeAddressItem.tsx @@ -3,30 +3,30 @@ import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; import { IoWalletOutline } from 'react-icons/io5'; -// Components +// components import OpenTabIconButton from '@extension/components/OpenTabIconButton'; -// Constants +// constants import { MODAL_ITEM_HEIGHT } from '@extension/constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; import useTextBackgroundColor from '@extension/hooks/useTextBackgroundColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectPreferredBlockExplorer, } from '@extension/selectors'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { IAccount, IAccountInformation, @@ -34,7 +34,7 @@ import { INetwork, } from '@extension/types'; -// Utils +// utils import { ellipseAddress } from '@extension/utils'; interface IProps extends StackProps { diff --git a/src/extension/components/SignTxnsModal/SignTxnsLoadingItem.tsx b/src/extension/components/SignTxnsModal/SignTxnsLoadingItem.tsx index 5d32eb03..f764d969 100644 --- a/src/extension/components/SignTxnsModal/SignTxnsLoadingItem.tsx +++ b/src/extension/components/SignTxnsModal/SignTxnsLoadingItem.tsx @@ -2,10 +2,10 @@ import { HStack, Skeleton, StackProps, Text } from '@chakra-ui/react'; import { faker } from '@faker-js/faker'; import React, { FC } from 'react'; -// Constants +// constants import { MODAL_ITEM_HEIGHT } from '@extension/constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; diff --git a/src/extension/components/SignTxnsModal/SignTxnsModal.tsx b/src/extension/components/SignTxnsModal/SignTxnsModal.tsx index c83bb89e..faf730c9 100644 --- a/src/extension/components/SignTxnsModal/SignTxnsModal.tsx +++ b/src/extension/components/SignTxnsModal/SignTxnsModal.tsx @@ -22,41 +22,41 @@ import React, { ChangeEvent, FC, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useDispatch } from 'react-redux'; -// Components +// components import Button from '@extension/components/Button'; import ChainBadge from '@extension/components/ChainBadge'; import PasswordInput from '@extension/components/PasswordInput'; import SignTxnsModalContent from './SignTxnsModalContent'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; -// Enums +// enums import { ErrorCodeEnum } from '@extension/enums'; -// Errors +// errors import { SerializableOperationCanceledError, SerializableUnknownError, } from '@common/errors'; -// Features +// features import { setError } from '@extension/features/system'; import { sendSignTxnsResponse } from '@extension/features/messages'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSignTxns from '@extension/hooks/useSignTxns'; import useSubTextColor from '@extension/hooks/useSubTextColor'; import useTextBackgroundColor from '@extension/hooks/useTextBackgroundColor'; -// Selectors +// selectors import { useSelectSignTxnsRequest } from '@extension/selectors'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { IAppThunkDispatch, ISignTxnsRequest } from '@extension/types'; interface IProps { diff --git a/src/extension/components/SignTxnsModal/SignTxnsModalContent.tsx b/src/extension/components/SignTxnsModal/SignTxnsModalContent.tsx index e54456f3..22280bec 100644 --- a/src/extension/components/SignTxnsModal/SignTxnsModalContent.tsx +++ b/src/extension/components/SignTxnsModal/SignTxnsModalContent.tsx @@ -12,17 +12,17 @@ import KeyRegistrationTransactionContent from './KeyRegistrationTransactionConte import MultipleTransactionsContent from './MultipleTransactionsContent'; import PaymentTransactionContent from './PaymentTransactionContent'; -// Constants +// constants import { NODE_REQUEST_DELAY } from '@extension/constants'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Features +// features import { updateAccountInformation } from '@extension/features/accounts'; import { updateAssetInformationThunk } from '@extension/features/assets'; -// Selectors +// selectors import { useSelectAccounts, useSelectAssetsByGenesisHash, @@ -31,7 +31,7 @@ import { useSelectUpdatingAssets, } from '@extension/selectors'; -// Types +// types import { ILogger } from '@common/types'; import { IAccount, @@ -41,7 +41,7 @@ import { INetwork, } from '@extension/types'; -// Utils +// utils import { parseTransactionType } from '@extension/utils'; import { AccountService } from '@extension/services'; diff --git a/src/extension/components/SignTxnsModal/SignTxnsTextItem.tsx b/src/extension/components/SignTxnsModal/SignTxnsTextItem.tsx index c8df8a10..7e5aed2e 100644 --- a/src/extension/components/SignTxnsModal/SignTxnsTextItem.tsx +++ b/src/extension/components/SignTxnsModal/SignTxnsTextItem.tsx @@ -1,10 +1,10 @@ import { Code, HStack, StackProps, Text } from '@chakra-ui/react'; import React, { FC } from 'react'; -// Constants +// constants import { MODAL_ITEM_HEIGHT } from '@extension/constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; interface IProps extends StackProps { diff --git a/src/extension/components/SomethingWentWrongIcon/SomethingWentWrongIcon.tsx b/src/extension/components/SomethingWentWrongIcon/SomethingWentWrongIcon.tsx index cd821004..acaffc2f 100644 --- a/src/extension/components/SomethingWentWrongIcon/SomethingWentWrongIcon.tsx +++ b/src/extension/components/SomethingWentWrongIcon/SomethingWentWrongIcon.tsx @@ -1,10 +1,10 @@ import { Icon, IconProps } from '@chakra-ui/react'; import React, { FC } from 'react'; -// Hooks +// hooks import useColorModeValue from '@extension/hooks/useColorModeValue'; -// Theme +// theme import { theme } from '@extension/theme'; interface IProps extends Omit { diff --git a/src/extension/components/Steps/Steps.tsx b/src/extension/components/Steps/Steps.tsx index 6d8af68d..4f345a40 100644 --- a/src/extension/components/Steps/Steps.tsx +++ b/src/extension/components/Steps/Steps.tsx @@ -1,7 +1,7 @@ import { Steps as ChakraSteps, StepsProps } from 'chakra-ui-steps'; import React, { FC } from 'react'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useTextBackgroundColor from '@extension/hooks/useTextBackgroundColor'; diff --git a/src/extension/components/ThemeProvider/ThemeProvider.tsx b/src/extension/components/ThemeProvider/ThemeProvider.tsx index f4a2bbd2..cf8bd27a 100644 --- a/src/extension/components/ThemeProvider/ThemeProvider.tsx +++ b/src/extension/components/ThemeProvider/ThemeProvider.tsx @@ -1,22 +1,22 @@ import { ChakraProvider, ColorMode } from '@chakra-ui/react'; import React, { FC, PropsWithChildren, useEffect, useState } from 'react'; -// Components +// components import Fonts from '@extension/components/Fonts'; -// Selectors +// selectors import { useSelectSettings } from '@extension/selectors'; -// Services +// servcies import { ColorModeManager } from '@extension/services'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { ISettings } from '@extension/types'; -// Utils +// utils import { setDocumentColorMode } from './utils'; interface IProps extends PropsWithChildren { diff --git a/src/extension/components/TransactionItem/ApplicationTransactionItemContent.tsx b/src/extension/components/TransactionItem/ApplicationTransactionItemContent.tsx index 9675825e..0a1d1cef 100644 --- a/src/extension/components/TransactionItem/ApplicationTransactionItemContent.tsx +++ b/src/extension/components/TransactionItem/ApplicationTransactionItemContent.tsx @@ -2,11 +2,11 @@ import { HStack, Spacer, Text, VStack } from '@chakra-ui/react'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Types +// types import { IApplicationTransaction } from '@extension/types'; interface IProps { diff --git a/src/extension/components/TransactionItem/AssetTransferTransactionItemContent.tsx b/src/extension/components/TransactionItem/AssetTransferTransactionItemContent.tsx index ca4cdea0..77a691bc 100644 --- a/src/extension/components/TransactionItem/AssetTransferTransactionItemContent.tsx +++ b/src/extension/components/TransactionItem/AssetTransferTransactionItemContent.tsx @@ -3,19 +3,19 @@ import BigNumber from 'bignumber.js'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AddressDisplay from '@extension/components/AddressDisplay'; import AssetDisplay from '@extension/components/AssetDisplay'; -// Hooks +// hooks import useAsset from '@extension/hooks/useAsset'; import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { IAccount, IAssetTransferTransaction, diff --git a/src/extension/components/TransactionItem/DefaultTransactionItemContent.tsx b/src/extension/components/TransactionItem/DefaultTransactionItemContent.tsx index a391f10a..c1b8ec8b 100644 --- a/src/extension/components/TransactionItem/DefaultTransactionItemContent.tsx +++ b/src/extension/components/TransactionItem/DefaultTransactionItemContent.tsx @@ -2,11 +2,11 @@ import { HStack, Spacer, Text, VStack } from '@chakra-ui/react'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Types +// types import { INetwork, ITransactions } from '@extension/types'; import AddressDisplay from '@extension/components/AddressDisplay'; diff --git a/src/extension/components/TransactionItem/PaymentTransactionItemContent.tsx b/src/extension/components/TransactionItem/PaymentTransactionItemContent.tsx index 944bc344..61285e32 100644 --- a/src/extension/components/TransactionItem/PaymentTransactionItemContent.tsx +++ b/src/extension/components/TransactionItem/PaymentTransactionItemContent.tsx @@ -3,21 +3,21 @@ import BigNumber from 'bignumber.js'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AddressDisplay from '@extension/components/AddressDisplay'; import AssetDisplay from '@extension/components/AssetDisplay'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { IAccount, INetwork, IPaymentTransaction } from '@extension/types'; -// Utils +// utils import { createIconFromDataUri } from '@extension/utils'; interface IProps { diff --git a/src/extension/components/TransactionItem/TransactionItem.tsx b/src/extension/components/TransactionItem/TransactionItem.tsx index 3cc5ed98..8b01aaa1 100644 --- a/src/extension/components/TransactionItem/TransactionItem.tsx +++ b/src/extension/components/TransactionItem/TransactionItem.tsx @@ -4,28 +4,28 @@ import { useTranslation } from 'react-i18next'; import { IoChevronForward } from 'react-icons/io5'; import { Link } from 'react-router-dom'; -// Components +// components import ApplicationTransactionItemContent from './ApplicationTransactionItemContent'; import DefaultTransactionItemContent from './DefaultTransactionItemContent'; import PaymentTransactionItemContent from './PaymentTransactionItemContent'; -// Constants +// constants import { ACCOUNTS_ROUTE, TRANSACTIONS_ROUTE } from '@extension/constants'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Hooks +// hooks import useButtonHoverBackgroundColor from '@extension/hooks/useButtonHoverBackgroundColor'; import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { IAccount, INetwork, ITransactions } from '@extension/types'; -// Utils +// utils import AssetTransferTransactionItemContent from './AssetTransferTransactionItemContent'; interface IProps { diff --git a/src/extension/components/WalletConnectBannerIcon/WalletConnectBannerIcon.tsx b/src/extension/components/WalletConnectBannerIcon/WalletConnectBannerIcon.tsx index fb094f2c..4c741002 100644 --- a/src/extension/components/WalletConnectBannerIcon/WalletConnectBannerIcon.tsx +++ b/src/extension/components/WalletConnectBannerIcon/WalletConnectBannerIcon.tsx @@ -1,7 +1,7 @@ import { Icon, IconProps } from '@chakra-ui/react'; import React, { FC } from 'react'; -// Hooks +// hooks import useColorModeValue from '@extension/hooks/useColorModeValue'; const WalletConnectBannerIcon: FC = (props: IconProps) => { diff --git a/src/extension/components/WalletConnectModal/hooks/useCaptureQrCode/useCaptureQrCode.ts b/src/extension/components/WalletConnectModal/hooks/useCaptureQrCode/useCaptureQrCode.ts index c6ddfcdf..5e6de13e 100644 --- a/src/extension/components/WalletConnectModal/hooks/useCaptureQrCode/useCaptureQrCode.ts +++ b/src/extension/components/WalletConnectModal/hooks/useCaptureQrCode/useCaptureQrCode.ts @@ -1,13 +1,13 @@ import { useState } from 'react'; -// Selectors +// selectors import { useSelectLogger } from '@extension/selectors'; -// Types +// types import { ILogger } from '@common/types'; import { IUseCaptureQrCodeState } from './types'; -// Utils +// utils import { captureQrCode } from './utils'; export default function useCaptureQrCode(): IUseCaptureQrCodeState { diff --git a/src/extension/components/WalletConnectModal/hooks/useCaptureQrCode/utils/captureQrCode.ts b/src/extension/components/WalletConnectModal/hooks/useCaptureQrCode/utils/captureQrCode.ts index 5afead21..0296e60e 100644 --- a/src/extension/components/WalletConnectModal/hooks/useCaptureQrCode/utils/captureQrCode.ts +++ b/src/extension/components/WalletConnectModal/hooks/useCaptureQrCode/utils/captureQrCode.ts @@ -1,7 +1,7 @@ import jsQR, { QRCode } from 'jsqr'; import browser, { Windows } from 'webextension-polyfill'; -// Utils +// utils import { convertDataUriToImageData } from '@extension/utils'; export default async function captureQrCode(): Promise { diff --git a/src/extension/components/Warning/Warning.tsx b/src/extension/components/Warning/Warning.tsx index 49426721..8733e37f 100644 --- a/src/extension/components/Warning/Warning.tsx +++ b/src/extension/components/Warning/Warning.tsx @@ -2,7 +2,7 @@ import { HStack, Icon, Text } from '@chakra-ui/react'; import React, { FC } from 'react'; import { IoWarningOutline } from 'react-icons/io5'; -// Theme +// theme import { theme } from '@extension/theme'; interface IProps { diff --git a/src/extension/config/networks.ts b/src/extension/config/networks.ts index a39048d2..e1392619 100644 --- a/src/extension/config/networks.ts +++ b/src/extension/config/networks.ts @@ -204,7 +204,7 @@ const networks: INetwork[] = [ ], namespace: { key: 'voi', - methods: ['signTransaction', 'signMessage'], + methods: ['voi_signTransaction', 'voi_signMessage'], reference: 'xK6y2kD4Rnq9EYD1Ta1JTf56TBQTu2_z', }, nativeCurrency: { diff --git a/src/extension/errors/BaseExtensionError.ts b/src/extension/errors/BaseExtensionError.ts index 3eb25bcd..d25e020c 100644 --- a/src/extension/errors/BaseExtensionError.ts +++ b/src/extension/errors/BaseExtensionError.ts @@ -1,4 +1,4 @@ -// Enums +// enums import { ErrorCodeEnum } from '../enums'; export default abstract class BaseExtensionError extends Error { diff --git a/src/extension/errors/DecryptionError.ts b/src/extension/errors/DecryptionError.ts index 8c73471a..17ce789f 100644 --- a/src/extension/errors/DecryptionError.ts +++ b/src/extension/errors/DecryptionError.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { ErrorCodeEnum } from '../enums'; -// Errors +// errors import BaseExtensionError from './BaseExtensionError'; export default class DecryptionError extends BaseExtensionError { diff --git a/src/extension/errors/EncryptionError.ts b/src/extension/errors/EncryptionError.ts index 2dbe914f..8d28b1d5 100644 --- a/src/extension/errors/EncryptionError.ts +++ b/src/extension/errors/EncryptionError.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { ErrorCodeEnum } from '../enums'; -// Errors +// errors import BaseExtensionError from './BaseExtensionError'; export default class EncryptionError extends BaseExtensionError { diff --git a/src/extension/errors/InvalidPasswordError.ts b/src/extension/errors/InvalidPasswordError.ts index 7a0b37f8..5125f5b2 100644 --- a/src/extension/errors/InvalidPasswordError.ts +++ b/src/extension/errors/InvalidPasswordError.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { ErrorCodeEnum } from '../enums'; -// Errors +// errors import BaseExtensionError from './BaseExtensionError'; export default class InvalidPasswordError extends BaseExtensionError { diff --git a/src/extension/errors/MalformedDataError.ts b/src/extension/errors/MalformedDataError.ts index 7c56fd14..e70c5e15 100644 --- a/src/extension/errors/MalformedDataError.ts +++ b/src/extension/errors/MalformedDataError.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { ErrorCodeEnum } from '../enums'; -// Errors +// errors import BaseExtensionError from './BaseExtensionError'; export default class MalformedDataError extends BaseExtensionError { diff --git a/src/extension/errors/ParsingError.ts b/src/extension/errors/ParsingError.ts index 438e1718..303ccaf8 100644 --- a/src/extension/errors/ParsingError.ts +++ b/src/extension/errors/ParsingError.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { ErrorCodeEnum } from '../enums'; -// Errors +// errors import BaseExtensionError from './BaseExtensionError'; export default class ParsingError extends BaseExtensionError { diff --git a/src/extension/errors/PrivateKeyAlreadyExistsError.ts b/src/extension/errors/PrivateKeyAlreadyExistsError.ts index e3cb40c5..44e70b59 100644 --- a/src/extension/errors/PrivateKeyAlreadyExistsError.ts +++ b/src/extension/errors/PrivateKeyAlreadyExistsError.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { ErrorCodeEnum } from '../enums'; -// Errors +// errors import BaseExtensionError from './BaseExtensionError'; export default class PrivateKeyAlreadyExistsError extends BaseExtensionError { diff --git a/src/extension/errors/UnknownError.ts b/src/extension/errors/UnknownError.ts index 25b27400..334337ca 100644 --- a/src/extension/errors/UnknownError.ts +++ b/src/extension/errors/UnknownError.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { ErrorCodeEnum } from '../enums'; -// Errors +// errors import BaseExtensionError from './BaseExtensionError'; export default class UnknownError extends BaseExtensionError { diff --git a/src/extension/features/accounts/slice.ts b/src/extension/features/accounts/slice.ts index 70c7d1fe..cf49b81e 100644 --- a/src/extension/features/accounts/slice.ts +++ b/src/extension/features/accounts/slice.ts @@ -1,6 +1,6 @@ import { createSlice, PayloadAction, Reducer } from '@reduxjs/toolkit'; -// Enums +// enums import { StoreNameEnum } from '@extension/enums'; // Thunks @@ -13,11 +13,11 @@ import { updateAccountInformationThunk, } from './thunks'; -// Types +// types import { IAccount } from '@extension/types'; import { IAccountsState } from './types'; -// Utils +// utils import { upsertItemsById } from '@extension/utils'; import { getInitialState } from './utils'; diff --git a/src/extension/features/accounts/thunks/fetchAccountsFromStorageThunk.ts b/src/extension/features/accounts/thunks/fetchAccountsFromStorageThunk.ts index 8b11d21a..2decebe7 100644 --- a/src/extension/features/accounts/thunks/fetchAccountsFromStorageThunk.ts +++ b/src/extension/features/accounts/thunks/fetchAccountsFromStorageThunk.ts @@ -2,18 +2,18 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; import { NODE_REQUEST_DELAY } from '@extension/constants'; -// Enums +// enums import { AccountsThunkEnum } from '@extension/enums'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { IAccount, IMainRootState, INetwork } from '@extension/types'; import { IFetchAccountsFromStoragePayload } from '../types'; -// Utils +// utils import { selectDefaultNetwork } from '@extension/utils'; import { updateAccountInformation } from '../utils'; diff --git a/src/extension/features/accounts/thunks/removeAccountByIdThunk.ts b/src/extension/features/accounts/thunks/removeAccountByIdThunk.ts index 2180eea9..f89685e3 100644 --- a/src/extension/features/accounts/thunks/removeAccountByIdThunk.ts +++ b/src/extension/features/accounts/thunks/removeAccountByIdThunk.ts @@ -1,13 +1,13 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; import browser from 'webextension-polyfill'; -// Enums +// enums import { AccountsThunkEnum } from '@extension/enums'; -// Services +// servcies import { AccountService, PrivateKeyService } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { IAccount, IMainRootState } from '@extension/types'; diff --git a/src/extension/features/accounts/thunks/saveNewAccountThunk.ts b/src/extension/features/accounts/thunks/saveNewAccountThunk.ts index 5d4b850f..bba01899 100644 --- a/src/extension/features/accounts/thunks/saveNewAccountThunk.ts +++ b/src/extension/features/accounts/thunks/saveNewAccountThunk.ts @@ -3,22 +3,22 @@ import { encode as encodeHex } from '@stablelib/hex'; import { sign } from 'tweetnacl'; import browser from 'webextension-polyfill'; -// Errors +// errors import { MalformedDataError, PrivateKeyAlreadyExistsError, } from '@extension/errors'; -// Features +// features import { setError } from '@extension/features/system'; -// Enums +// enums import { AccountsThunkEnum } from '@extension/enums'; -// Services +// servcies import { AccountService, PrivateKeyService } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { IAccount, diff --git a/src/extension/features/accounts/thunks/startPollingForAccountInformationThunk.ts b/src/extension/features/accounts/thunks/startPollingForAccountInformationThunk.ts index cf59b36d..d99f9280 100644 --- a/src/extension/features/accounts/thunks/startPollingForAccountInformationThunk.ts +++ b/src/extension/features/accounts/thunks/startPollingForAccountInformationThunk.ts @@ -1,15 +1,15 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; -// Constants +// constants import { ACCOUNT_INFORMATION_REFRESH_INTERVAL } from '@extension/constants'; -// Enums +// enums import { AccountsThunkEnum } from '@extension/enums'; // Thunks import updateAccountInformationThunk from './updateAccountInformationThunk'; -// Types +// types import { ILogger } from '@common/types'; import { IMainRootState } from '@extension/types'; diff --git a/src/extension/features/accounts/thunks/stopPollingForAccountInformationThunk.ts b/src/extension/features/accounts/thunks/stopPollingForAccountInformationThunk.ts index 9228388f..cba573a3 100644 --- a/src/extension/features/accounts/thunks/stopPollingForAccountInformationThunk.ts +++ b/src/extension/features/accounts/thunks/stopPollingForAccountInformationThunk.ts @@ -1,9 +1,9 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; -// Enums +// enums import { AccountsThunkEnum } from '@extension/enums'; -// Types +// types import { ILogger } from '@common/types'; import { IMainRootState } from '@extension/types'; diff --git a/src/extension/features/accounts/thunks/updateAccountInformationThunk.ts b/src/extension/features/accounts/thunks/updateAccountInformationThunk.ts index 571d6f7b..56b2b079 100644 --- a/src/extension/features/accounts/thunks/updateAccountInformationThunk.ts +++ b/src/extension/features/accounts/thunks/updateAccountInformationThunk.ts @@ -1,19 +1,19 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; -// Constants +// constants import { NODE_REQUEST_DELAY } from '@extension/constants'; -// Enums +// enums import { AccountsThunkEnum } from '@extension/enums'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { IAccount, IMainRootState, INetwork } from '@extension/types'; -// Utils +// utils import { updateAccountInformation } from '../utils'; const updateAccountInformationThunk: AsyncThunk< diff --git a/src/extension/features/accounts/types/IAccountsState.ts b/src/extension/features/accounts/types/IAccountsState.ts index a672f001..4d4800ac 100644 --- a/src/extension/features/accounts/types/IAccountsState.ts +++ b/src/extension/features/accounts/types/IAccountsState.ts @@ -1,4 +1,4 @@ -// Types +// types import { IAccount } from '@extension/types'; /** diff --git a/src/extension/features/accounts/utils/fetchAlgorandAccountInformationWithDelay.ts b/src/extension/features/accounts/utils/fetchAlgorandAccountInformationWithDelay.ts index 79c9f2dd..3a5ca9e5 100644 --- a/src/extension/features/accounts/utils/fetchAlgorandAccountInformationWithDelay.ts +++ b/src/extension/features/accounts/utils/fetchAlgorandAccountInformationWithDelay.ts @@ -1,6 +1,6 @@ import { Algodv2, IntDecoding } from 'algosdk'; -// Types +// types import { IAlgorandAccountInformation } from '@extension/types'; interface IOptions { diff --git a/src/extension/features/accounts/utils/getInitialState.ts b/src/extension/features/accounts/utils/getInitialState.ts index b5a95a45..c7d0ba73 100644 --- a/src/extension/features/accounts/utils/getInitialState.ts +++ b/src/extension/features/accounts/utils/getInitialState.ts @@ -1,4 +1,4 @@ -// Types +// types import { IAccountsState } from '../types'; export default function getInitialState(): IAccountsState { diff --git a/src/extension/features/accounts/utils/updateAccountInformation.ts b/src/extension/features/accounts/utils/updateAccountInformation.ts index 1c82f212..4f447152 100644 --- a/src/extension/features/accounts/utils/updateAccountInformation.ts +++ b/src/extension/features/accounts/utils/updateAccountInformation.ts @@ -1,12 +1,12 @@ import { Algodv2 } from 'algosdk'; -// Constants +// constants import { ACCOUNT_INFORMATION_ANTIQUATED_TIMEOUT } from '@extension/constants'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { IBaseOptions } from '@common/types'; import { IAccount, @@ -15,7 +15,7 @@ import { INetwork, } from '@extension/types'; -// Utils +// utils import { getAlgodClient } from '@common/utils'; import { convertGenesisHashToHex, diff --git a/src/extension/features/assets/slice.ts b/src/extension/features/assets/slice.ts index a2d222cf..9ca9691a 100644 --- a/src/extension/features/assets/slice.ts +++ b/src/extension/features/assets/slice.ts @@ -1,16 +1,16 @@ import { createSlice, PayloadAction, Reducer } from '@reduxjs/toolkit'; -// Enums +// enums import { StoreNameEnum } from '@extension/enums'; // Thunks import { fetchAssetsThunk, updateAssetInformationThunk } from './thunks'; -// Types +// types import { IAsset } from '@extension/types'; import { IAssetsState, IUpdateAssetInformationResult } from './types'; -// Utils +// utils import { upsertItemsById } from '@extension/utils'; import { getInitialState } from './utils'; diff --git a/src/extension/features/assets/thunks/fetchAssetsThunk.ts b/src/extension/features/assets/thunks/fetchAssetsThunk.ts index f93d5682..11440eb8 100644 --- a/src/extension/features/assets/thunks/fetchAssetsThunk.ts +++ b/src/extension/features/assets/thunks/fetchAssetsThunk.ts @@ -2,17 +2,17 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; import { ASSETS_KEY_PREFIX } from '@extension/constants'; -// Enums +// enums import { AssetsThunkEnum } from '@extension/enums'; -// Services +// servcies import { StorageManager } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { IAsset, IMainRootState, INetwork } from '@extension/types'; -// Utils +// utils import { convertGenesisHashToHex } from '@extension/utils'; const fetchAssetsThunk: AsyncThunk< diff --git a/src/extension/features/assets/thunks/updateAssetInformationThunk.ts b/src/extension/features/assets/thunks/updateAssetInformationThunk.ts index 313df9da..b67b78f0 100644 --- a/src/extension/features/assets/thunks/updateAssetInformationThunk.ts +++ b/src/extension/features/assets/thunks/updateAssetInformationThunk.ts @@ -1,15 +1,15 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; -// Constants +// constants import { ASSETS_KEY_PREFIX, NODE_REQUEST_DELAY } from '@extension/constants'; -// Enums +// enums import { AssetsThunkEnum } from '@extension/enums'; -// Services +// servcies import { StorageManager } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { IAsset, IMainRootState } from '@extension/types'; import { @@ -17,7 +17,7 @@ import { IUpdateAssetInformationResult, } from '../types'; -// Utils +// utils import { convertGenesisHashToHex, upsertItemsById } from '@extension/utils'; import { fetchAssetInformationById } from '../utils'; diff --git a/src/extension/features/assets/types/IAssetsState.ts b/src/extension/features/assets/types/IAssetsState.ts index 1cafb830..24c86817 100644 --- a/src/extension/features/assets/types/IAssetsState.ts +++ b/src/extension/features/assets/types/IAssetsState.ts @@ -1,4 +1,4 @@ -// Types +// types import { IAsset } from '@extension/types'; /** diff --git a/src/extension/features/assets/types/IUpdateAssetInformationResult.ts b/src/extension/features/assets/types/IUpdateAssetInformationResult.ts index be0181d4..95e3b4b7 100644 --- a/src/extension/features/assets/types/IUpdateAssetInformationResult.ts +++ b/src/extension/features/assets/types/IUpdateAssetInformationResult.ts @@ -1,4 +1,4 @@ -// Types +// types import { IAsset } from '@extension/types'; /** diff --git a/src/extension/features/assets/utils/fetchAssetInformationById.ts b/src/extension/features/assets/utils/fetchAssetInformationById.ts index 85ebf1bc..fe1f2b9e 100644 --- a/src/extension/features/assets/utils/fetchAssetInformationById.ts +++ b/src/extension/features/assets/utils/fetchAssetInformationById.ts @@ -1,6 +1,6 @@ import { Algodv2 } from 'algosdk'; -// Types +// types import { IBaseOptions } from '@common/types'; import { IAlgorandAsset, @@ -9,7 +9,7 @@ import { ITinyManAssetResponse, } from '@extension/types'; -// Utils +// utils import { getAlgodClient } from '@common/utils'; import { fetchAssetList, diff --git a/src/extension/features/assets/utils/fetchAssetInformationWithDelay.ts b/src/extension/features/assets/utils/fetchAssetInformationWithDelay.ts index 67303679..30f07f47 100644 --- a/src/extension/features/assets/utils/fetchAssetInformationWithDelay.ts +++ b/src/extension/features/assets/utils/fetchAssetInformationWithDelay.ts @@ -1,6 +1,6 @@ import { Algodv2, IntDecoding } from 'algosdk'; -// Types +// types import { IAlgorandAsset } from '@extension/types'; interface IOptions { diff --git a/src/extension/features/assets/utils/getInitialState.ts b/src/extension/features/assets/utils/getInitialState.ts index e9c6d59b..e3ff2aad 100644 --- a/src/extension/features/assets/utils/getInitialState.ts +++ b/src/extension/features/assets/utils/getInitialState.ts @@ -1,4 +1,4 @@ -// Types +// types import { IAssetsState } from '../types'; export default function getInitialState(): IAssetsState { diff --git a/src/extension/features/messages/slice.ts b/src/extension/features/messages/slice.ts index eb5ad060..b4ebf50d 100644 --- a/src/extension/features/messages/slice.ts +++ b/src/extension/features/messages/slice.ts @@ -1,9 +1,9 @@ import { createSlice, Draft, PayloadAction, Reducer } from '@reduxjs/toolkit'; -// Enums +// enums import { StoreNameEnum } from '@extension/enums'; -// Types +// types import { IEnableRequest, ISignBytesRequest, @@ -11,7 +11,7 @@ import { } from '@extension/types'; import { IMessagesState } from './types'; -// Utils +// utils import { getInitialState } from './utils'; const slice = createSlice({ diff --git a/src/extension/features/messages/thunks/closeCurrentWindowThunk.ts b/src/extension/features/messages/thunks/closeCurrentWindowThunk.ts index 01be8197..63a2fcc6 100644 --- a/src/extension/features/messages/thunks/closeCurrentWindowThunk.ts +++ b/src/extension/features/messages/thunks/closeCurrentWindowThunk.ts @@ -1,10 +1,10 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; import browser, { Windows } from 'webextension-polyfill'; -// Enums +// enums import { MessagesThunkEnum } from '@extension/enums'; -// Types +// types import { ILogger } from '@common/types'; import { IMainRootState } from '@extension/types'; diff --git a/src/extension/features/messages/thunks/sendBackgroundAppLoadThunk.ts b/src/extension/features/messages/thunks/sendBackgroundAppLoadThunk.ts index eeb86b3e..b9b1d930 100644 --- a/src/extension/features/messages/thunks/sendBackgroundAppLoadThunk.ts +++ b/src/extension/features/messages/thunks/sendBackgroundAppLoadThunk.ts @@ -1,13 +1,13 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; import browser from 'webextension-polyfill'; -// Enums +// enums import { MessagesThunkEnum } from '@extension/enums'; -// Events +// events import { ExtensionBackgroundAppLoadEvent } from '@common/events'; -// Types +// types import { ILogger } from '@common/types'; import { IMainRootState } from '@extension/types'; diff --git a/src/extension/features/messages/thunks/sendEnableResponseThunk.ts b/src/extension/features/messages/thunks/sendEnableResponseThunk.ts index 55572ce8..fcd8b410 100644 --- a/src/extension/features/messages/thunks/sendEnableResponseThunk.ts +++ b/src/extension/features/messages/thunks/sendEnableResponseThunk.ts @@ -2,22 +2,22 @@ import { IWalletAccount } from '@agoralabs-sh/algorand-provider'; import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; import browser from 'webextension-polyfill'; -// Enums +// enums import { EventNameEnum } from '@common/enums'; import { MessagesThunkEnum } from '@extension/enums'; -// Events +// events import { ExtensionEnableResponseEvent } from '@common/events'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { IAccount, IMainRootState, INetwork, ISession } from '@extension/types'; import { IBaseResponseThunkPayload } from '../types'; -// Utils +// utils import { mapAddressToWalletAccount } from '@extension/utils'; interface IPayload extends IBaseResponseThunkPayload { diff --git a/src/extension/features/messages/thunks/sendRegistrationCompletedThunk.ts b/src/extension/features/messages/thunks/sendRegistrationCompletedThunk.ts index 387dfd28..919012ff 100644 --- a/src/extension/features/messages/thunks/sendRegistrationCompletedThunk.ts +++ b/src/extension/features/messages/thunks/sendRegistrationCompletedThunk.ts @@ -1,13 +1,13 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; import browser from 'webextension-polyfill'; -// Enums +// enums import { MessagesThunkEnum } from '@extension/enums'; -// Events +// events import { ExtensionRegistrationCompletedEvent } from '@common/events'; -// Types +// types import { ILogger } from '@common/types'; import { IMainRootState } from '@extension/types'; diff --git a/src/extension/features/messages/thunks/sendResetThunk.ts b/src/extension/features/messages/thunks/sendResetThunk.ts index c915e5ce..918cfa47 100644 --- a/src/extension/features/messages/thunks/sendResetThunk.ts +++ b/src/extension/features/messages/thunks/sendResetThunk.ts @@ -1,13 +1,13 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; import browser from 'webextension-polyfill'; -// Enums +// enums import { MessagesThunkEnum } from '@extension/enums'; -// Events +// events import { ExtensionResetEvent } from '@common/events'; -// Types +// types import { ILogger } from '@common/types'; import { IMainRootState } from '@extension/types'; diff --git a/src/extension/features/messages/thunks/sendSignBytesResponse.ts b/src/extension/features/messages/thunks/sendSignBytesResponse.ts index a2ca8bc6..a07c7fed 100644 --- a/src/extension/features/messages/thunks/sendSignBytesResponse.ts +++ b/src/extension/features/messages/thunks/sendSignBytesResponse.ts @@ -1,14 +1,14 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; import browser from 'webextension-polyfill'; -// Enums +// enums import { EventNameEnum } from '@common/enums'; import { MessagesThunkEnum } from '@extension/enums'; -// Events +// events import { ExtensionSignBytesResponseEvent } from '@common/events'; -// Types +// types import { ILogger } from '@common/types'; import { IMainRootState } from '@extension/types'; import { IBaseResponseThunkPayload } from '../types'; diff --git a/src/extension/features/messages/thunks/sendSignTxnsResponse.ts b/src/extension/features/messages/thunks/sendSignTxnsResponse.ts index 38133059..2b9d7986 100644 --- a/src/extension/features/messages/thunks/sendSignTxnsResponse.ts +++ b/src/extension/features/messages/thunks/sendSignTxnsResponse.ts @@ -1,14 +1,14 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; import browser from 'webextension-polyfill'; -// Enums +// enums import { EventNameEnum } from '@common/enums'; import { MessagesThunkEnum } from '@extension/enums'; -// Events +// events import { ExtensionSignTxnsResponseEvent } from '@common/events'; -// Types +// types import { ILogger } from '@common/types'; import { IMainRootState } from '@extension/types'; import { IBaseResponseThunkPayload } from '../types'; diff --git a/src/extension/features/messages/types/IBaseResponseThunkPayload.ts b/src/extension/features/messages/types/IBaseResponseThunkPayload.ts index c994fbc0..8f1ceb57 100644 --- a/src/extension/features/messages/types/IBaseResponseThunkPayload.ts +++ b/src/extension/features/messages/types/IBaseResponseThunkPayload.ts @@ -1,4 +1,4 @@ -// Errors +// errors import { BaseSerializableError } from '@common/errors'; interface IBaseResponseThunkPayload { diff --git a/src/extension/features/messages/types/IMessagesState.ts b/src/extension/features/messages/types/IMessagesState.ts index 3413c7ac..a1ce191d 100644 --- a/src/extension/features/messages/types/IMessagesState.ts +++ b/src/extension/features/messages/types/IMessagesState.ts @@ -1,4 +1,4 @@ -// Types +// types import { IEnableRequest, ISignBytesRequest, diff --git a/src/extension/features/messages/utils/getInitialState.ts b/src/extension/features/messages/utils/getInitialState.ts index b8d8b1d3..3a90ab9d 100644 --- a/src/extension/features/messages/utils/getInitialState.ts +++ b/src/extension/features/messages/utils/getInitialState.ts @@ -1,4 +1,4 @@ -// Types +// types import { IMessagesState } from '../types'; export default function getInitialState(): IMessagesState { diff --git a/src/extension/features/networks/slice.ts b/src/extension/features/networks/slice.ts index 0dffe2ff..ea5f8468 100644 --- a/src/extension/features/networks/slice.ts +++ b/src/extension/features/networks/slice.ts @@ -1,9 +1,9 @@ import { createSlice, Reducer } from '@reduxjs/toolkit'; -// Enums +// enums import { StoreNameEnum } from '@extension/enums'; -// Utils +// utils import { getInitialState } from './utils'; const slice = createSlice({ diff --git a/src/extension/features/networks/types/INetworksState.ts b/src/extension/features/networks/types/INetworksState.ts index 12b603bb..028c691f 100644 --- a/src/extension/features/networks/types/INetworksState.ts +++ b/src/extension/features/networks/types/INetworksState.ts @@ -1,4 +1,4 @@ -// Types +// types import { INetwork } from '@extension/types'; /** diff --git a/src/extension/features/networks/utils/getInitialState.ts b/src/extension/features/networks/utils/getInitialState.ts index 367700c8..02beeade 100644 --- a/src/extension/features/networks/utils/getInitialState.ts +++ b/src/extension/features/networks/utils/getInitialState.ts @@ -1,7 +1,7 @@ -// Config +// config import { networks } from '@extension/config'; -// Types +// types import { INetworksState } from '../types'; export default function getInitialState(): INetworksState { diff --git a/src/extension/features/registration/slice.ts b/src/extension/features/registration/slice.ts index c793d428..44fa595d 100644 --- a/src/extension/features/registration/slice.ts +++ b/src/extension/features/registration/slice.ts @@ -1,15 +1,15 @@ import { createSlice, Draft, PayloadAction, Reducer } from '@reduxjs/toolkit'; -// Enums +// enums import { StoreNameEnum } from '@extension/enums'; // Thunks import { saveCredentialsThunk } from './thunks'; -// Types +// types import { IRegistrationState, ISetPasswordPayload } from './types'; -// Utils +// utils import { getInitialState } from './utils'; const slice = createSlice({ diff --git a/src/extension/features/registration/thunks/saveCredentialsThunk.ts b/src/extension/features/registration/thunks/saveCredentialsThunk.ts index 97e5557b..e568be8a 100644 --- a/src/extension/features/registration/thunks/saveCredentialsThunk.ts +++ b/src/extension/features/registration/thunks/saveCredentialsThunk.ts @@ -4,23 +4,23 @@ import { NavigateFunction } from 'react-router-dom'; import { sign } from 'tweetnacl'; import browser from 'webextension-polyfill'; -// Constants +// constants import { CREATE_PASSWORD_ROUTE } from '@extension/constants'; -// Enums +// enums import { RegisterThunkEnum } from '@extension/enums'; -// Errors +// errors import { BaseExtensionError, MalformedDataError } from '@extension/errors'; -// Features +// features import { setError } from '@extension/features/system'; import { sendRegistrationCompletedThunk } from '@extension/features/messages'; -// Services +// servcies import { AccountService, PrivateKeyService } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { IAccount, diff --git a/src/extension/features/registration/utils/getInitialState.ts b/src/extension/features/registration/utils/getInitialState.ts index caa5ad62..c49516c3 100644 --- a/src/extension/features/registration/utils/getInitialState.ts +++ b/src/extension/features/registration/utils/getInitialState.ts @@ -1,4 +1,4 @@ -// Types +// types import { IRegistrationState } from '../types'; export default function getInitialState(): IRegistrationState { diff --git a/src/extension/features/sessions/slice.ts b/src/extension/features/sessions/slice.ts index e24c7a19..06d99dcf 100644 --- a/src/extension/features/sessions/slice.ts +++ b/src/extension/features/sessions/slice.ts @@ -1,7 +1,7 @@ import { createSlice, Draft, PayloadAction, Reducer } from '@reduxjs/toolkit'; import { IWeb3Wallet } from '@walletconnect/web3wallet/dist/types'; -// Enums +// enums import { StoreNameEnum } from '@extension/enums'; // Thunks @@ -15,16 +15,16 @@ import { setSessionThunk, } from './thunks'; -// Types +// types import { ISession } from '@extension/types'; import { IRemoveAuthorizedAddressResult, ISessionsState } from './types'; -// Utils +// utils import { getInitialState, upsertSessions } from './utils'; const slice = createSlice({ extraReducers: (builder) => { - /** Clear sessions **/ + /**clear sessions**/ builder.addCase(clearSessionsThunk.fulfilled, (state: ISessionsState) => { state.items = []; state.saving = false; @@ -35,7 +35,7 @@ const slice = createSlice({ builder.addCase(clearSessionsThunk.rejected, (state: ISessionsState) => { state.saving = false; }); - /** Fetch sessions **/ + /**fetch sessions**/ builder.addCase( fetchSessionsThunk.fulfilled, (state: ISessionsState, action: PayloadAction) => { @@ -49,7 +49,7 @@ const slice = createSlice({ builder.addCase(fetchSessionsThunk.rejected, (state: ISessionsState) => { state.fetching = false; }); - /** Initialize WalletConnect **/ + /**initialize walletconnect**/ builder.addCase( initializeWalletConnectThunk.fulfilled, (state: ISessionsState, action: PayloadAction) => { @@ -69,7 +69,7 @@ const slice = createSlice({ state.initializingWalletConnect = false; } ); - /** Remove authorized address **/ + /**remove authorized address**/ builder.addCase( removeAuthorizedAddressThunk.fulfilled, ( @@ -96,7 +96,7 @@ const slice = createSlice({ state.saving = false; } ); - /** Remove session by id **/ + /**remove session by id**/ builder.addCase( removeSessionByIdThunk.fulfilled, (state: ISessionsState, action: PayloadAction) => { @@ -115,7 +115,7 @@ const slice = createSlice({ state.saving = false; } ); - /** Remove session by topic **/ + /**remove session by topic**/ builder.addCase( removeSessionByTopicThunk.fulfilled, (state: ISessionsState, action: PayloadAction) => { @@ -140,7 +140,7 @@ const slice = createSlice({ state.saving = false; } ); - /** Set session **/ + /**set session**/ builder.addCase( setSessionThunk.fulfilled, (state: ISessionsState, action: PayloadAction) => { diff --git a/src/extension/features/sessions/thunks/clearSessionsThunk.ts b/src/extension/features/sessions/thunks/clearSessionsThunk.ts index fa67ce07..31fa5986 100644 --- a/src/extension/features/sessions/thunks/clearSessionsThunk.ts +++ b/src/extension/features/sessions/thunks/clearSessionsThunk.ts @@ -1,15 +1,15 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; -// Constants +// constants import { SESSION_ITEM_KEY_PREFIX } from '@extension/constants'; -// Enums +// enums import { SessionsThunkEnum } from '@extension/enums'; -// Services +// servcies import { StorageManager } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { IMainRootState, IStorageItemTypes } from '@extension/types'; diff --git a/src/extension/features/sessions/thunks/fetchSessionsThunk.ts b/src/extension/features/sessions/thunks/fetchSessionsThunk.ts index 96646fab..bcc65bd8 100644 --- a/src/extension/features/sessions/thunks/fetchSessionsThunk.ts +++ b/src/extension/features/sessions/thunks/fetchSessionsThunk.ts @@ -1,12 +1,12 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; -// Enums +// enums import { SessionsThunkEnum } from '@extension/enums'; -// Services +// servcies import { SessionService } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { IMainRootState, ISession } from '@extension/types'; diff --git a/src/extension/features/sessions/thunks/initializeWalletConnectThunk.ts b/src/extension/features/sessions/thunks/initializeWalletConnectThunk.ts index d67078ec..6449efc5 100644 --- a/src/extension/features/sessions/thunks/initializeWalletConnectThunk.ts +++ b/src/extension/features/sessions/thunks/initializeWalletConnectThunk.ts @@ -3,16 +3,16 @@ import { Core } from '@walletconnect/core'; import { Web3Wallet } from '@walletconnect/web3wallet'; import { IWeb3Wallet } from '@walletconnect/web3wallet/dist/types'; -// Constants +// constants import { KIBISIS_LINK } from '@extension/constants'; -// Enums +// enums import { SessionsThunkEnum } from '@extension/enums'; -// Thunks +// thunks import removeSessionByTopicThunk from './removeSessionByTopicThunk'; -// Types +// types import { IMainRootState } from '@extension/types'; import { ILogger } from '@common/types'; @@ -23,10 +23,9 @@ const initializeWalletConnectThunk: AsyncThunk< > = createAsyncThunk( SessionsThunkEnum.InitializeWalletConnect, async (_, { dispatch, getState }) => { - const logger: ILogger = getState().system.logger; const web3Wallet: IWeb3Wallet = await Web3Wallet.init({ core: new Core({ - projectId: '86eaff455340651e0ee12c8572c2d228', + projectId: __WALLET_CONNECT_PROJECT_ID__, }), metadata: { name: __APP_TITLE__, diff --git a/src/extension/features/sessions/thunks/removeAuthorizedAddressThunk.ts b/src/extension/features/sessions/thunks/removeAuthorizedAddressThunk.ts index 5f851a05..bc4aeae5 100644 --- a/src/extension/features/sessions/thunks/removeAuthorizedAddressThunk.ts +++ b/src/extension/features/sessions/thunks/removeAuthorizedAddressThunk.ts @@ -1,15 +1,15 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; -// Constants +// constants import { SESSION_ITEM_KEY_PREFIX } from '@extension/constants'; -// Enums +// enums import { SessionsThunkEnum } from '@extension/enums'; -// Services +// servcies import { StorageManager } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { IMainRootState, ISession } from '@extension/types'; import { IRemoveAuthorizedAddressResult } from '../types'; diff --git a/src/extension/features/sessions/thunks/removeSessionByIdThunk.ts b/src/extension/features/sessions/thunks/removeSessionByIdThunk.ts index e1698660..35d1f62f 100644 --- a/src/extension/features/sessions/thunks/removeSessionByIdThunk.ts +++ b/src/extension/features/sessions/thunks/removeSessionByIdThunk.ts @@ -1,12 +1,12 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; -// Enums +// enums import { SessionsThunkEnum } from '@extension/enums'; -// Services +// servcies import { SessionService } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { IMainRootState } from '@extension/types'; diff --git a/src/extension/features/sessions/thunks/removeSessionByTopicThunk.ts b/src/extension/features/sessions/thunks/removeSessionByTopicThunk.ts index 76ce3417..59d521d9 100644 --- a/src/extension/features/sessions/thunks/removeSessionByTopicThunk.ts +++ b/src/extension/features/sessions/thunks/removeSessionByTopicThunk.ts @@ -2,13 +2,13 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; import { IWeb3Wallet } from '@walletconnect/web3wallet/dist/types'; import { getSdkError } from '@walletconnect/utils'; -// Enums +// enums import { SessionsThunkEnum } from '@extension/enums'; -// Services +// servcies import { SessionService } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { IMainRootState, ISession } from '@extension/types'; diff --git a/src/extension/features/sessions/thunks/setSessionThunk.ts b/src/extension/features/sessions/thunks/setSessionThunk.ts index 44b8156c..96d9f00e 100644 --- a/src/extension/features/sessions/thunks/setSessionThunk.ts +++ b/src/extension/features/sessions/thunks/setSessionThunk.ts @@ -1,12 +1,12 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; -// Enums +// enums import { SessionsThunkEnum } from '@extension/enums'; -// Services +// servcies import { SessionService } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { IMainRootState, ISession } from '@extension/types'; diff --git a/src/extension/features/sessions/types/IRemoveAuthorizedAddressResult.ts b/src/extension/features/sessions/types/IRemoveAuthorizedAddressResult.ts index 55421707..bc0968a0 100644 --- a/src/extension/features/sessions/types/IRemoveAuthorizedAddressResult.ts +++ b/src/extension/features/sessions/types/IRemoveAuthorizedAddressResult.ts @@ -1,4 +1,4 @@ -// Types +// types import { ISession } from '@extension/types'; /** diff --git a/src/extension/features/sessions/types/ISessionsState.ts b/src/extension/features/sessions/types/ISessionsState.ts index 8ee2872e..3135ef3c 100644 --- a/src/extension/features/sessions/types/ISessionsState.ts +++ b/src/extension/features/sessions/types/ISessionsState.ts @@ -1,6 +1,6 @@ import { IWeb3Wallet } from '@walletconnect/web3wallet/dist/types'; -// Types +// types import { ISession } from '@extension/types'; /** diff --git a/src/extension/features/sessions/utils/getInitialState.ts b/src/extension/features/sessions/utils/getInitialState.ts index 915b2426..33ec1715 100644 --- a/src/extension/features/sessions/utils/getInitialState.ts +++ b/src/extension/features/sessions/utils/getInitialState.ts @@ -1,4 +1,4 @@ -// Types +// types import { ISessionsState } from '../types'; export default function getInitialState(): ISessionsState { diff --git a/src/extension/features/sessions/utils/upsertSessions.ts b/src/extension/features/sessions/utils/upsertSessions.ts index 32cb8f6b..058a7e8d 100644 --- a/src/extension/features/sessions/utils/upsertSessions.ts +++ b/src/extension/features/sessions/utils/upsertSessions.ts @@ -1,4 +1,4 @@ -// Types +// types import { ISession } from '@extension/types'; /** diff --git a/src/extension/features/settings/slice.ts b/src/extension/features/settings/slice.ts index 889ba9a7..6190c900 100644 --- a/src/extension/features/settings/slice.ts +++ b/src/extension/features/settings/slice.ts @@ -1,16 +1,16 @@ import { createSlice, Draft, PayloadAction, Reducer } from '@reduxjs/toolkit'; -// Enums +// enums import { StoreNameEnum } from '@extension/enums'; // Thunks import { fetchSettings, setSettings } from './thunks'; -// Types +// types import { ISettings } from '@extension/types'; import { ISettingsState } from './types'; -// Utils +// utils import { getInitialState, mapSettingsToState } from './utils'; const slice = createSlice({ diff --git a/src/extension/features/settings/thunks/fetchSettings.ts b/src/extension/features/settings/thunks/fetchSettings.ts index 427bdc17..f4bba5b9 100644 --- a/src/extension/features/settings/thunks/fetchSettings.ts +++ b/src/extension/features/settings/thunks/fetchSettings.ts @@ -1,19 +1,19 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; -// Constants +// constants import { SETTINGS_ADVANCED_KEY, SETTINGS_APPEARANCE_KEY, SETTINGS_GENERAL_KEY, } from '@extension/constants'; -// Enums +// enums import { SettingsThunkEnum } from '@extension/enums'; -// Services +// servcies import { StorageManager } from '@extension/services'; -// Types +// types import { IAdvancedSettings, IAppearanceSettings, @@ -23,7 +23,7 @@ import { ISettings, } from '@extension/types'; -// Utils +// utils import { createDefaultSettings } from '../utils'; const fetchSettings: AsyncThunk< diff --git a/src/extension/features/settings/thunks/setSettings.ts b/src/extension/features/settings/thunks/setSettings.ts index 0ab5a0bc..1ded0e9d 100644 --- a/src/extension/features/settings/thunks/setSettings.ts +++ b/src/extension/features/settings/thunks/setSettings.ts @@ -1,22 +1,22 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; -// Constants +// constants import { SETTINGS_ADVANCED_KEY, SETTINGS_APPEARANCE_KEY, SETTINGS_GENERAL_KEY, } from '@extension/constants'; -// Enums +// enums import { NetworkTypeEnum, SettingsThunkEnum } from '@extension/enums'; -// Services +// servcies import { StorageManager } from '@extension/services'; -// Types +// types import { IMainRootState, INetwork, ISettings } from '@extension/types'; -// Utils +// utils import { selectDefaultNetwork } from '@extension/utils'; const setSettings: AsyncThunk< diff --git a/src/extension/features/settings/types/ISettingsState.ts b/src/extension/features/settings/types/ISettingsState.ts index 27d920ca..6a54fa04 100644 --- a/src/extension/features/settings/types/ISettingsState.ts +++ b/src/extension/features/settings/types/ISettingsState.ts @@ -1,4 +1,4 @@ -// Types +// types import { ISettings } from '@extension/types'; /** diff --git a/src/extension/features/settings/utils/createDefaultSettings.ts b/src/extension/features/settings/utils/createDefaultSettings.ts index 7553de83..b0e722dd 100644 --- a/src/extension/features/settings/utils/createDefaultSettings.ts +++ b/src/extension/features/settings/utils/createDefaultSettings.ts @@ -1,7 +1,7 @@ -// Types +// types import { INetwork, ISettings } from '@extension/types'; -// Utils +// utils import { selectDefaultNetwork } from '@extension/utils'; /** diff --git a/src/extension/features/settings/utils/filterSettingsFromState.ts b/src/extension/features/settings/utils/filterSettingsFromState.ts index cf77f5fc..bdd74e45 100644 --- a/src/extension/features/settings/utils/filterSettingsFromState.ts +++ b/src/extension/features/settings/utils/filterSettingsFromState.ts @@ -1,4 +1,4 @@ -// Types +// types import { ISettings } from '@extension/types'; import { ISettingsState } from '../types'; diff --git a/src/extension/features/settings/utils/getInitialState.ts b/src/extension/features/settings/utils/getInitialState.ts index b85c3552..dc5171d4 100644 --- a/src/extension/features/settings/utils/getInitialState.ts +++ b/src/extension/features/settings/utils/getInitialState.ts @@ -1,4 +1,4 @@ -// Types +// types import { ISettingsState } from '../types'; export default function getInitialState(): ISettingsState { diff --git a/src/extension/features/settings/utils/mapSettingsToState.ts b/src/extension/features/settings/utils/mapSettingsToState.ts index bd8ec837..6b8cc2ae 100644 --- a/src/extension/features/settings/utils/mapSettingsToState.ts +++ b/src/extension/features/settings/utils/mapSettingsToState.ts @@ -1,4 +1,4 @@ -// Types +// types import { ISettings } from '@extension/types'; import { ISettingsState } from '../types'; diff --git a/src/extension/features/system/slice.ts b/src/extension/features/system/slice.ts index ec229414..0d3ece92 100644 --- a/src/extension/features/system/slice.ts +++ b/src/extension/features/system/slice.ts @@ -2,16 +2,16 @@ import { CreateToastFnReturn } from '@chakra-ui/react'; import { createSlice, Draft, PayloadAction, Reducer } from '@reduxjs/toolkit'; import { NavigateFunction } from 'react-router-dom'; -// Enums +// enums import { StoreNameEnum } from '@extension/enums'; -// Errors +// errors import { BaseExtensionError } from '@extension/errors'; -// Types +// types import { ISystemState, IConfirm } from './types'; -// Utils +// utils import { getInitialState } from './utils'; const slice = createSlice({ diff --git a/src/extension/features/system/types/ISystemState.ts b/src/extension/features/system/types/ISystemState.ts index 9916adc6..0d426a75 100644 --- a/src/extension/features/system/types/ISystemState.ts +++ b/src/extension/features/system/types/ISystemState.ts @@ -1,10 +1,10 @@ import { CreateToastFnReturn } from '@chakra-ui/react'; import { NavigateFunction } from 'react-router-dom'; -// Errors +// errors import { BaseExtensionError } from '@extension/errors'; -// Types +// types import { ILogger } from '@common/types'; import IConfirm from './IConfirm'; diff --git a/src/extension/features/system/utils/getInitialState.ts b/src/extension/features/system/utils/getInitialState.ts index de26853f..eed815d0 100644 --- a/src/extension/features/system/utils/getInitialState.ts +++ b/src/extension/features/system/utils/getInitialState.ts @@ -1,7 +1,7 @@ -// Utils +// utils import { createLogger } from '@common/utils'; -// Types +// types import { ISystemState } from '../types'; export default function getInitialState(): ISystemState { diff --git a/src/extension/features/transactions/slice.ts b/src/extension/features/transactions/slice.ts index 158746e3..b3dd930b 100644 --- a/src/extension/features/transactions/slice.ts +++ b/src/extension/features/transactions/slice.ts @@ -1,15 +1,15 @@ import { createSlice, PayloadAction, Reducer } from '@reduxjs/toolkit'; -// Enums +// enums import { StoreNameEnum } from '@extension/enums'; // Thunks import { updateAccountTransactionsThunk } from './thunks'; -// Types +// types import { ITransactionsState, IUpdateAccountTransactionsResult } from './types'; -// Utils +// utils import { getInitialState } from './utils'; const slice = createSlice({ diff --git a/src/extension/features/transactions/thunks/updateAccountTransactionsThunk.ts b/src/extension/features/transactions/thunks/updateAccountTransactionsThunk.ts index 4791fb54..c9e6b00a 100644 --- a/src/extension/features/transactions/thunks/updateAccountTransactionsThunk.ts +++ b/src/extension/features/transactions/thunks/updateAccountTransactionsThunk.ts @@ -2,13 +2,13 @@ import { AsyncThunk, createAsyncThunk } from '@reduxjs/toolkit'; import { Indexer, IntDecoding } from 'algosdk'; import LookupAccountTransactions from 'algosdk/dist/types/client/v2/indexer/lookupAccountTransactions'; -// Enums +// enums import { TransactionsThunkEnum } from '@extension/enums'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { IAccount, @@ -21,7 +21,7 @@ import { IUpdateAccountTransactionsResult, } from '../types'; -// Utils +// utils import { getIndexerClient } from '@common/utils'; import { mapAlgorandTransactionToTransaction } from '@extension/utils'; diff --git a/src/extension/features/transactions/types/IAccountTransaction.ts b/src/extension/features/transactions/types/IAccountTransaction.ts index b64ad620..fe777ada 100644 --- a/src/extension/features/transactions/types/IAccountTransaction.ts +++ b/src/extension/features/transactions/types/IAccountTransaction.ts @@ -1,4 +1,4 @@ -// Types +// types import { ITransactions } from '@extension/types'; /** diff --git a/src/extension/features/transactions/types/ITransactionsState.ts b/src/extension/features/transactions/types/ITransactionsState.ts index a81017ab..18736db4 100644 --- a/src/extension/features/transactions/types/ITransactionsState.ts +++ b/src/extension/features/transactions/types/ITransactionsState.ts @@ -1,4 +1,4 @@ -// Types +// types import IAccountTransaction from './IAccountTransaction'; /** diff --git a/src/extension/features/transactions/types/IUpdateAccountTransactionsResult.ts b/src/extension/features/transactions/types/IUpdateAccountTransactionsResult.ts index 7c3c334f..552b5b3b 100644 --- a/src/extension/features/transactions/types/IUpdateAccountTransactionsResult.ts +++ b/src/extension/features/transactions/types/IUpdateAccountTransactionsResult.ts @@ -1,4 +1,4 @@ -// Types +// types import { ITransactions } from '@extension/types'; /** diff --git a/src/extension/features/transactions/utils/getInitialState.ts b/src/extension/features/transactions/utils/getInitialState.ts index 986847a0..9983e0f2 100644 --- a/src/extension/features/transactions/utils/getInitialState.ts +++ b/src/extension/features/transactions/utils/getInitialState.ts @@ -1,4 +1,4 @@ -// Types +// types import { ITransactionsState } from '../types'; export default function getInitialState(): ITransactionsState { diff --git a/src/extension/hooks/useAccountInformation/useAccountInformation.ts b/src/extension/hooks/useAccountInformation/useAccountInformation.ts index 5f5f7620..4a2bc6ef 100644 --- a/src/extension/hooks/useAccountInformation/useAccountInformation.ts +++ b/src/extension/hooks/useAccountInformation/useAccountInformation.ts @@ -1,15 +1,15 @@ import { useEffect, useState } from 'react'; -// Selectors +// selectors import { useSelectAccountById, useSelectSelectedNetwork, } from '@extension/selectors'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { IAccount, IAccountInformation, INetwork } from '@extension/types'; export default function useAccountInformation( diff --git a/src/extension/hooks/useAsset/types/IUseAssetState.ts b/src/extension/hooks/useAsset/types/IUseAssetState.ts index a50a0ac9..f6a69104 100644 --- a/src/extension/hooks/useAsset/types/IUseAssetState.ts +++ b/src/extension/hooks/useAsset/types/IUseAssetState.ts @@ -1,4 +1,4 @@ -// Types +// types import { IAsset } from '@extension/types'; interface IUseAssetState { diff --git a/src/extension/hooks/useAsset/useAsset.ts b/src/extension/hooks/useAsset/useAsset.ts index 051d1047..9d24c382 100644 --- a/src/extension/hooks/useAsset/useAsset.ts +++ b/src/extension/hooks/useAsset/useAsset.ts @@ -1,19 +1,19 @@ import { useEffect, useState } from 'react'; import { useDispatch } from 'react-redux'; -// Features +// features import { updateAssetInformationThunk } from '@extension/features/assets'; -// Hooks +// hooks import useAssets from '@extension/hooks/useAssets'; -// Selectors +// selectors import { useSelectSelectedNetwork, useSelectUpdatingAssets, } from '@extension/selectors'; -// Types +// types import { IAppThunkDispatch, IAsset, INetwork } from '@extension/types'; import { IUseAssetState } from './types'; diff --git a/src/extension/hooks/useAssets/useAssets.ts b/src/extension/hooks/useAssets/useAssets.ts index 5a54a126..d474e888 100644 --- a/src/extension/hooks/useAssets/useAssets.ts +++ b/src/extension/hooks/useAssets/useAssets.ts @@ -1,15 +1,15 @@ import { useEffect, useState } from 'react'; -// Selectors +// selectors import { useSelectAssets, useSelectSelectedNetwork, } from '@extension/selectors'; -// Types +// types import { IAsset, INetwork } from '@extension/types'; -// Utils +// utils import { convertGenesisHashToHex } from '@extension/utils'; export default function useAssets(): IAsset[] { diff --git a/src/extension/hooks/useBorderColor/useBorderColor.ts b/src/extension/hooks/useBorderColor/useBorderColor.ts index 6e2bb29d..54ec2043 100644 --- a/src/extension/hooks/useBorderColor/useBorderColor.ts +++ b/src/extension/hooks/useBorderColor/useBorderColor.ts @@ -1,4 +1,4 @@ -// Hooks +// hooks import useColorModeValue from '@extension/hooks/useColorModeValue'; export default function useBorderColor(): string { diff --git a/src/extension/hooks/useButtonHoverBackgroundColor/useButtonHoverBackgroundColor.ts b/src/extension/hooks/useButtonHoverBackgroundColor/useButtonHoverBackgroundColor.ts index d24cb4e0..2843ccf8 100644 --- a/src/extension/hooks/useButtonHoverBackgroundColor/useButtonHoverBackgroundColor.ts +++ b/src/extension/hooks/useButtonHoverBackgroundColor/useButtonHoverBackgroundColor.ts @@ -1,4 +1,4 @@ -// Hooks +// hooks import useColorModeValue from '@extension/hooks/useColorModeValue'; export default function useButtonHoverBackgroundColor(): string { diff --git a/src/extension/hooks/useChangePassword/types/IUseChangePasswordState.ts b/src/extension/hooks/useChangePassword/types/IUseChangePasswordState.ts index ad530f4a..3f9f91ff 100644 --- a/src/extension/hooks/useChangePassword/types/IUseChangePasswordState.ts +++ b/src/extension/hooks/useChangePassword/types/IUseChangePasswordState.ts @@ -1,7 +1,7 @@ -// Errors +// errors import { BaseExtensionError } from '@extension/errors'; -// Types +// types import { IPasswordTag } from '@extension/types'; interface IUseChangePasswordState { diff --git a/src/extension/hooks/useChangePassword/useChangePassword.ts b/src/extension/hooks/useChangePassword/useChangePassword.ts index 56bd3fec..d3b39a33 100644 --- a/src/extension/hooks/useChangePassword/useChangePassword.ts +++ b/src/extension/hooks/useChangePassword/useChangePassword.ts @@ -1,16 +1,16 @@ import { useState } from 'react'; import browser from 'webextension-polyfill'; -// Errors +// errors import { BaseExtensionError } from '@extension/errors'; -// Selectors +// selectors import { useSelectLogger } from '@extension/selectors'; -// Services +// servcies import { PrivateKeyService } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { IPasswordTag } from '@extension/types'; import { IUseChangePasswordState } from './types'; diff --git a/src/extension/hooks/useColorModeValue/useColorModeValue.ts b/src/extension/hooks/useColorModeValue/useColorModeValue.ts index d7a51d23..b2cdef0a 100644 --- a/src/extension/hooks/useColorModeValue/useColorModeValue.ts +++ b/src/extension/hooks/useColorModeValue/useColorModeValue.ts @@ -1,4 +1,4 @@ -// Selectors +// selectors import { useSelectColorMode } from '@extension/selectors'; export default function useColorModeValue< diff --git a/src/extension/hooks/useDefaultTextColor/useDefaultTextColor.ts b/src/extension/hooks/useDefaultTextColor/useDefaultTextColor.ts index 5286005b..b13eac1d 100644 --- a/src/extension/hooks/useDefaultTextColor/useDefaultTextColor.ts +++ b/src/extension/hooks/useDefaultTextColor/useDefaultTextColor.ts @@ -1,6 +1,6 @@ -// Hooks +// hooks import useColorModeValue from '@extension/hooks/useColorModeValue'; export default function useDefaultTextColor(): string { - return useColorModeValue('gray.600', 'whiteAlpha.900'); + return useColorModeValue('gray.600', 'whiteAlpha.800'); } diff --git a/src/extension/hooks/useOnBackgroundAppMessage/useOnBackgroundAppMessage.ts b/src/extension/hooks/useOnBackgroundAppMessage/useOnBackgroundAppMessage.ts index 7680a9b6..5e5b36ba 100644 --- a/src/extension/hooks/useOnBackgroundAppMessage/useOnBackgroundAppMessage.ts +++ b/src/extension/hooks/useOnBackgroundAppMessage/useOnBackgroundAppMessage.ts @@ -2,27 +2,27 @@ import { useEffect } from 'react'; import { useDispatch } from 'react-redux'; import browser from 'webextension-polyfill'; -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Events +// events import { ExtensionEnableRequestEvent, ExtensionSignBytesRequestEvent, ExtensionSignTxnsRequestEvent, } from '@common/events'; -// Features +// features import { setEnableRequest, setSignBytesRequest, setSignTxnsRequest, } from '@extension/features/messages'; -// Selectors +// selectors import { useSelectLogger } from '@extension/selectors'; -// Types +// types import { IExtensionRequestEvents, ILogger } from '@common/types'; import { IAppThunkDispatch } from '@extension/types'; diff --git a/src/extension/hooks/useOnMainAppMessage/useOnMainAppMessage.ts b/src/extension/hooks/useOnMainAppMessage/useOnMainAppMessage.ts index 1e9c6890..15f7a209 100644 --- a/src/extension/hooks/useOnMainAppMessage/useOnMainAppMessage.ts +++ b/src/extension/hooks/useOnMainAppMessage/useOnMainAppMessage.ts @@ -2,27 +2,27 @@ import { useEffect } from 'react'; import { useDispatch } from 'react-redux'; import browser, { Runtime } from 'webextension-polyfill'; -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Events +// events import { ExtensionEnableRequestEvent, ExtensionSignBytesRequestEvent, ExtensionSignTxnsRequestEvent, } from '@common/events'; -// Features +// features import { setEnableRequest, setSignBytesRequest, setSignTxnsRequest, } from '@extension/features/messages'; -// Selectors +// selectors import { useSelectLogger } from '@extension/selectors'; -// Types +// types import { IExtensionRequestEvents, ILogger } from '@common/types'; import { IAppThunkDispatch } from '@extension/types'; diff --git a/src/extension/hooks/useOnNetworkConnectivity/useOnNetworkConnectivity.ts b/src/extension/hooks/useOnNetworkConnectivity/useOnNetworkConnectivity.ts index 22161ce5..ab9637c5 100644 --- a/src/extension/hooks/useOnNetworkConnectivity/useOnNetworkConnectivity.ts +++ b/src/extension/hooks/useOnNetworkConnectivity/useOnNetworkConnectivity.ts @@ -1,13 +1,13 @@ import { useEffect, useState } from 'react'; import { useDispatch } from 'react-redux'; -// Constants +// constants import { NETWORK_CONNECTIVITY_CHECK_INTERVAL } from '@extension/constants'; -// Features +// features import { setOnline } from '@extension/features/system'; -// Types +// types import { IAppThunkDispatch } from '@extension/types'; export default function useOnNetworkConnectivity(): void { diff --git a/src/extension/hooks/usePrimaryButtonTextColor/usePrimaryButtonTextColor.ts b/src/extension/hooks/usePrimaryButtonTextColor/usePrimaryButtonTextColor.ts index 0e8be14c..5b6f9787 100644 --- a/src/extension/hooks/usePrimaryButtonTextColor/usePrimaryButtonTextColor.ts +++ b/src/extension/hooks/usePrimaryButtonTextColor/usePrimaryButtonTextColor.ts @@ -1,4 +1,4 @@ -// Hooks +// hooks import useColorModeValue from '@extension/hooks/useColorModeValue'; export default function usePrimaryButtonTextColor(): string { diff --git a/src/extension/hooks/usePrimaryColor/usePrimaryColor.ts b/src/extension/hooks/usePrimaryColor/usePrimaryColor.ts index a951c9b5..9bf1de9f 100644 --- a/src/extension/hooks/usePrimaryColor/usePrimaryColor.ts +++ b/src/extension/hooks/usePrimaryColor/usePrimaryColor.ts @@ -1,4 +1,4 @@ -// Hooks +// hooks import useColorModeValue from '@extension/hooks/useColorModeValue'; export default function usePrimaryColor(): string { diff --git a/src/extension/hooks/usePrimaryColorScheme/usePrimaryColorScheme.ts b/src/extension/hooks/usePrimaryColorScheme/usePrimaryColorScheme.ts index b6919e9f..e220c7dd 100644 --- a/src/extension/hooks/usePrimaryColorScheme/usePrimaryColorScheme.ts +++ b/src/extension/hooks/usePrimaryColorScheme/usePrimaryColorScheme.ts @@ -1,4 +1,4 @@ -// Hooks +// hooks import useColorModeValue from '@extension/hooks/useColorModeValue'; export default function usePrimaryColorScheme(): string { diff --git a/src/extension/hooks/useSignBytes/types/IUseSignBytesState.ts b/src/extension/hooks/useSignBytes/types/IUseSignBytesState.ts index c48797c6..f6cc34b8 100644 --- a/src/extension/hooks/useSignBytes/types/IUseSignBytesState.ts +++ b/src/extension/hooks/useSignBytes/types/IUseSignBytesState.ts @@ -1,7 +1,7 @@ -// Errors +// errors import { BaseExtensionError } from '@extension/errors'; -// Types +// types import ISignBytesOptions from './ISignBytesOptions'; interface IUseSignBytesState { diff --git a/src/extension/hooks/useSignBytes/useSignBytes.ts b/src/extension/hooks/useSignBytes/useSignBytes.ts index 454349ae..15a4770a 100644 --- a/src/extension/hooks/useSignBytes/useSignBytes.ts +++ b/src/extension/hooks/useSignBytes/useSignBytes.ts @@ -6,20 +6,20 @@ import { Address, decodeAddress, signBytes as algoSignBytes } from 'algosdk'; import { useState } from 'react'; import browser from 'webextension-polyfill'; -// Errors +// errors import { BaseExtensionError, DecryptionError, MalformedDataError, } from '@extension/errors'; -// Selectors +// selectors import { useSelectLogger } from '@extension/selectors'; -// Services +// servcies import { PrivateKeyService } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { ISignBytesOptions, IUseSignBytesState } from './types'; diff --git a/src/extension/hooks/useSignTxns/types/IUseSignTransactionsState.ts b/src/extension/hooks/useSignTxns/types/IUseSignTransactionsState.ts index 4888a3ca..3a8ce59d 100644 --- a/src/extension/hooks/useSignTxns/types/IUseSignTransactionsState.ts +++ b/src/extension/hooks/useSignTxns/types/IUseSignTransactionsState.ts @@ -1,7 +1,7 @@ -// Errors +// errors import { BaseExtensionError } from '@extension/errors'; -// Types +// types import ISignTransactionsOptions from 'src/extension/hooks/useSignTxns/types/ISignTransactionsOptions'; interface IUseSignTransactionsState { diff --git a/src/extension/hooks/useSignTxns/useSignTransactions.ts b/src/extension/hooks/useSignTxns/useSignTransactions.ts index 4b040a38..742ab042 100644 --- a/src/extension/hooks/useSignTxns/useSignTransactions.ts +++ b/src/extension/hooks/useSignTxns/useSignTransactions.ts @@ -11,7 +11,7 @@ import { import { useState } from 'react'; import browser from 'webextension-polyfill'; -// Errors +// errors import { BaseExtensionError, DecryptionError, @@ -19,13 +19,13 @@ import { MalformedDataError, } from '@extension/errors'; -// Selectors +// selectors import { useSelectLogger } from '@extension/selectors'; -// Services +// servcies import { PrivateKeyService } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { ISignTransactionsOptions, IUseSignTransactionsState } from './types'; diff --git a/src/extension/hooks/useSubTextColor/useSubTextColor.ts b/src/extension/hooks/useSubTextColor/useSubTextColor.ts index 2f8642b2..b64038e6 100644 --- a/src/extension/hooks/useSubTextColor/useSubTextColor.ts +++ b/src/extension/hooks/useSubTextColor/useSubTextColor.ts @@ -1,4 +1,4 @@ -// Hooks +// hooks import useColorModeValue from '@extension/hooks/useColorModeValue'; export default function useSubTextColor(): string { diff --git a/src/extension/hooks/useTextBackgroundColor/useTextBackgroundColor.ts b/src/extension/hooks/useTextBackgroundColor/useTextBackgroundColor.ts index 5a29d9ae..7bd787d2 100644 --- a/src/extension/hooks/useTextBackgroundColor/useTextBackgroundColor.ts +++ b/src/extension/hooks/useTextBackgroundColor/useTextBackgroundColor.ts @@ -1,4 +1,4 @@ -// Hooks +// hooks import useColorModeValue from '@extension/hooks/useColorModeValue'; export default function useTextBackgroundColor(): string { diff --git a/src/extension/hooks/useWalletConnect/useWalletConnect.ts b/src/extension/hooks/useWalletConnect/useWalletConnect.ts index 11ff868e..a4fe2b0a 100644 --- a/src/extension/hooks/useWalletConnect/useWalletConnect.ts +++ b/src/extension/hooks/useWalletConnect/useWalletConnect.ts @@ -5,18 +5,18 @@ import { IWeb3Wallet } from '@walletconnect/web3wallet/dist/types'; import { useEffect, useState } from 'react'; import { useDispatch } from 'react-redux'; -// Features +// features import { setSessionThunk } from '@extension/features/sessions'; -// Selectors +// selectors import { useSelectLogger, useSelectWeb3Wallet } from '@extension/selectors'; -// Types +// types import { ILogger } from '@common/types'; import { IAppThunkDispatch, INetwork } from '@extension/types'; import { IUseWalletConnectState } from './types'; -// Utils +// utils import { mapSessionFromWalletConnectSession } from '@extension/utils'; import { createSessionNamespaces } from './utils'; diff --git a/src/extension/hooks/useWalletConnect/utils/createSessionNamespaces.ts b/src/extension/hooks/useWalletConnect/utils/createSessionNamespaces.ts index d98f5bf9..ca57df15 100644 --- a/src/extension/hooks/useWalletConnect/utils/createSessionNamespaces.ts +++ b/src/extension/hooks/useWalletConnect/utils/createSessionNamespaces.ts @@ -1,7 +1,7 @@ import { ProposalTypes, SessionTypes } from '@walletconnect/types'; import { buildApprovedNamespaces } from '@walletconnect/utils'; -// Types +// types import { INetwork } from '@extension/types'; interface IOptions { diff --git a/src/extension/pages/AccountPage/AccountPage.tsx b/src/extension/pages/AccountPage/AccountPage.tsx index 91f44d8e..56f5d2bf 100644 --- a/src/extension/pages/AccountPage/AccountPage.tsx +++ b/src/extension/pages/AccountPage/AccountPage.tsx @@ -34,7 +34,7 @@ import { useSearchParams, } from 'react-router-dom'; -// Components +// components import AccountActivityTab from '@extension/components/AccountActivityTab'; import AccountAssetsTab from '@extension/components/AccountAssetsTab'; import AccountNftsTab from '@extension/components/AccountNftsTab'; @@ -50,20 +50,20 @@ import NativeBalance, { NativeBalanceSkeleton, } from '@extension/components/NativeBalance'; -// Constants +// constants import { ADD_ACCOUNT_ROUTE, ACCOUNTS_ROUTE } from '@extension/constants'; -// Features +// features import { removeAccountByIdThunk } from '@extension/features/accounts'; import { setConfirm } from '@extension/features/system'; import { setSettings } from '@extension/features/settings'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryColorScheme from '@extension/hooks/usePrimaryColorScheme'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectAccount, useSelectAccountByPublicKey, @@ -77,10 +77,10 @@ import { useSelectSettings, } from '@extension/selectors'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { IAccount, IAccountInformation, @@ -90,7 +90,7 @@ import { ISettings, } from '@extension/types'; -// Utils +// utils import { ellipseAddress } from '@extension/utils'; const AccountPage: FC = () => { diff --git a/src/extension/pages/AccountRouter/AccountRouter.tsx b/src/extension/pages/AccountRouter/AccountRouter.tsx index b7f785d9..33122362 100644 --- a/src/extension/pages/AccountRouter/AccountRouter.tsx +++ b/src/extension/pages/AccountRouter/AccountRouter.tsx @@ -1,7 +1,7 @@ import React, { FC } from 'react'; import { Route, Routes } from 'react-router-dom'; -// Constants +// constants import { ASSETS_ROUTE, TRANSACTIONS_ROUTE } from '@extension/constants'; // Pages diff --git a/src/extension/pages/AccountSetupPage/AccountSetupPage.tsx b/src/extension/pages/AccountSetupPage/AccountSetupPage.tsx index 39d2af9b..97f2ba75 100644 --- a/src/extension/pages/AccountSetupPage/AccountSetupPage.tsx +++ b/src/extension/pages/AccountSetupPage/AccountSetupPage.tsx @@ -3,14 +3,14 @@ import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; import { NavigateFunction, useNavigate } from 'react-router-dom'; -// Components +// components import CreateNewAccountIcon from '@extension/components/CreateNewAccountIcon'; import ImportAccountIcon from '@extension/components/ImportAccountIcon'; import ImportRekeyAccountIcon from '@extension/components/ImportRekeyAccountIcon'; import PageHeader from '@extension/components/PageHeader'; import AccountTypeItem from './AccountTypeItem'; -// Constants +// constants import { ADD_ACCOUNT_ROUTE, CREATE_NEW_ACCOUNT_ROUTE, diff --git a/src/extension/pages/AccountSetupPage/AccountTypeItem.tsx b/src/extension/pages/AccountSetupPage/AccountTypeItem.tsx index 9e441d36..e9cb3f25 100644 --- a/src/extension/pages/AccountSetupPage/AccountTypeItem.tsx +++ b/src/extension/pages/AccountSetupPage/AccountTypeItem.tsx @@ -1,7 +1,7 @@ import { Box, Icon, Text, Tooltip, VStack } from '@chakra-ui/react'; import React, { FC, ElementType } from 'react'; -// Hooks +// hooks import useButtonHoverBackgroundColor from '@extension/hooks/useButtonHoverBackgroundColor'; import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; diff --git a/src/extension/pages/AdvancedSettingsPage/AdvancedSettingsPage.tsx b/src/extension/pages/AdvancedSettingsPage/AdvancedSettingsPage.tsx index a7cebf49..56c2ceff 100644 --- a/src/extension/pages/AdvancedSettingsPage/AdvancedSettingsPage.tsx +++ b/src/extension/pages/AdvancedSettingsPage/AdvancedSettingsPage.tsx @@ -3,18 +3,18 @@ import React, { ChangeEvent, FC } from 'react'; import { useTranslation } from 'react-i18next'; import { useDispatch } from 'react-redux'; -// Components +// components import PageHeader from '@extension/components/PageHeader'; import SettingsSubHeading from '@extension/components/SettingsSubHeading'; import SettingsSwitchItem from '@extension/components/SettingsSwitchItem'; -// Features +// features import { setSettings } from '@extension/features/settings'; -// Selectors +// selectors import { useSelectSettings } from '@extension/selectors'; -// Types +// types import { IAdvancedSettings, IAppThunkDispatch, diff --git a/src/extension/pages/AppearanceSettingsPage/AppearanceSettingsPage.tsx b/src/extension/pages/AppearanceSettingsPage/AppearanceSettingsPage.tsx index dde139ae..bc9668f3 100644 --- a/src/extension/pages/AppearanceSettingsPage/AppearanceSettingsPage.tsx +++ b/src/extension/pages/AppearanceSettingsPage/AppearanceSettingsPage.tsx @@ -3,17 +3,17 @@ import React, { ChangeEvent, FC } from 'react'; import { useTranslation } from 'react-i18next'; import { useDispatch } from 'react-redux'; -// Components +// components import PageHeader from '@extension/components/PageHeader'; import SettingsSelectItem from '@extension/components/SettingsSelectItem'; -// Features +// features import { setSettings } from '@extension/features/settings'; -// Selectors +// selectors import { useSelectSettings } from '@extension/selectors'; -// Types +// types import { IAppThunkDispatch, ISettings } from '@extension/types'; const AppearanceSettingsPage: FC = () => { diff --git a/src/extension/pages/AssetPage/AssetPage.tsx b/src/extension/pages/AssetPage/AssetPage.tsx index 28598f94..67c9f0ac 100644 --- a/src/extension/pages/AssetPage/AssetPage.tsx +++ b/src/extension/pages/AssetPage/AssetPage.tsx @@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'; import { IoArrowDownOutline, IoArrowUpOutline } from 'react-icons/io5'; import { NavigateFunction, useNavigate, useParams } from 'react-router-dom'; -// Components +// components import AssetAvatar from '@extension/components/AssetAvatar'; import AssetIcon from '@extension/components/AssetIcon'; import Button from '@extension/components/Button'; @@ -13,17 +13,17 @@ import LoadingPage from '@extension/components/LoadingPage'; import OpenTabIconButton from '@extension/components/OpenTabIconButton'; import PageHeader from '@extension/components/PageHeader'; -// Constants +// constants import { ACCOUNTS_ROUTE } from '@extension/constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryButtonTextColor from '@extension/hooks/usePrimaryButtonTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; import useTextBackgroundColor from '@extension/hooks/useTextBackgroundColor'; import useAssetPage from './hooks/useAssetPage'; -// Selectors +// selectors import { useSelectAccounts, useSelectFetchingAssets, @@ -31,16 +31,16 @@ import { useSelectSelectedNetwork, } from '@extension/selectors'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Theme +// theme import { theme } from '@extension/theme'; -// Types +// types import { IAccount, IExplorer, INetwork } from '@extension/types'; -// Utils +// utils import { formatCurrencyUnit } from '@common/utils'; import { ellipseAddress } from '@extension/utils'; diff --git a/src/extension/pages/AssetPage/hooks/useAssetPage/types/IUseAssetPageState.ts b/src/extension/pages/AssetPage/hooks/useAssetPage/types/IUseAssetPageState.ts index b484161c..8fbc662c 100644 --- a/src/extension/pages/AssetPage/hooks/useAssetPage/types/IUseAssetPageState.ts +++ b/src/extension/pages/AssetPage/hooks/useAssetPage/types/IUseAssetPageState.ts @@ -1,6 +1,6 @@ import BigNumber from 'bignumber.js'; -// Types +// types import { IAccount, IAccountInformation, diff --git a/src/extension/pages/AssetPage/hooks/useAssetPage/useAssetPage.ts b/src/extension/pages/AssetPage/hooks/useAssetPage/useAssetPage.ts index 0dde7203..d83523b7 100644 --- a/src/extension/pages/AssetPage/hooks/useAssetPage/useAssetPage.ts +++ b/src/extension/pages/AssetPage/hooks/useAssetPage/useAssetPage.ts @@ -1,18 +1,18 @@ import { useEffect, useState } from 'react'; -// Hooks +// hooks import useAssets from '@extension/hooks/useAssets'; -// Selectors +// selectors import { useSelectAccounts, useSelectSelectedNetwork, } from '@extension/selectors'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { IAccount, IAccountInformation, diff --git a/src/extension/pages/ChangePasswordPage/ChangePasswordPage.tsx b/src/extension/pages/ChangePasswordPage/ChangePasswordPage.tsx index c0ba1e2a..814d9302 100644 --- a/src/extension/pages/ChangePasswordPage/ChangePasswordPage.tsx +++ b/src/extension/pages/ChangePasswordPage/ChangePasswordPage.tsx @@ -8,7 +8,7 @@ import React, { FC, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { NavigateFunction, useNavigate } from 'react-router-dom'; -// Components +// components import Button from '@extension/components/Button'; import ConfirmPasswordModal from '@extension/components/ConfirmPasswordModal'; import CreatePasswordInput, { @@ -16,18 +16,18 @@ import CreatePasswordInput, { } from '@extension/components/CreatePasswordInput'; import PageHeader from '@extension/components/PageHeader'; -// Constants +// constants import { DEFAULT_GAP, SECURITY_ROUTE, SETTINGS_ROUTE, } from '@extension/constants'; -// Hooks +// hooks import useChangePassword from '@extension/hooks/useChangePassword'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectToast } from '@extension/selectors'; const ChangePasswordPage: FC = () => { diff --git a/src/extension/pages/CreateNewAccountPage/CreateNewAccountPage.tsx b/src/extension/pages/CreateNewAccountPage/CreateNewAccountPage.tsx index 1bd7be79..7ee1846e 100644 --- a/src/extension/pages/CreateNewAccountPage/CreateNewAccountPage.tsx +++ b/src/extension/pages/CreateNewAccountPage/CreateNewAccountPage.tsx @@ -17,22 +17,22 @@ import React, { ChangeEvent, FC, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { NavigateFunction, useNavigate } from 'react-router-dom'; -// Components +// components import Button from '@extension/components/Button'; import CopyButton from '@extension/components/CopyButton'; import PageHeader from '@extension/components/PageHeader'; import Steps from '@extension/components/Steps'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryColor from '@extension/hooks/usePrimaryColor'; import usePrimaryColorScheme from '@extension/hooks/usePrimaryColorScheme'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Types +// types import { IAddAccountCompleteFunction } from '@extension/types'; interface IProps { diff --git a/src/extension/pages/CreatePasswordPage/CreatePasswordPage.tsx b/src/extension/pages/CreatePasswordPage/CreatePasswordPage.tsx index 9fc715bf..998e732f 100644 --- a/src/extension/pages/CreatePasswordPage/CreatePasswordPage.tsx +++ b/src/extension/pages/CreatePasswordPage/CreatePasswordPage.tsx @@ -4,24 +4,24 @@ import { useTranslation } from 'react-i18next'; import { NavigateFunction, useNavigate } from 'react-router-dom'; import { useDispatch, useSelector } from 'react-redux'; -// Components +// components import Button from '@extension/components/Button'; import CreatePasswordInput, { validate, } from '@extension/components/CreatePasswordInput'; import PageHeader from '@extension/components/PageHeader'; -// Constants +// constants import { ADD_ACCOUNT_ROUTE, DEFAULT_GAP } from '@extension/constants'; -// Features +// features import { setPassword } from '@extension/features/registration'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Types +// types import { IAppThunkDispatch, IRegistrationRootState } from '@extension/types'; const CreatePasswordPage: FC = () => { diff --git a/src/extension/pages/GeneralSettingsPage/GeneralSettingsPage.tsx b/src/extension/pages/GeneralSettingsPage/GeneralSettingsPage.tsx index e97cac16..db4e3b08 100644 --- a/src/extension/pages/GeneralSettingsPage/GeneralSettingsPage.tsx +++ b/src/extension/pages/GeneralSettingsPage/GeneralSettingsPage.tsx @@ -3,24 +3,24 @@ import React, { ChangeEvent, FC } from 'react'; import { useTranslation } from 'react-i18next'; import { useDispatch } from 'react-redux'; -// Components +// components import Button from '@extension/components/Button'; import PageHeader from '@extension/components/PageHeader'; import SettingsSelectItem from '@extension/components/SettingsSelectItem'; import SettingsSubHeading from '@extension/components/SettingsSubHeading'; -// Features +// features import { setConfirm } from '@extension/features/system'; import { sendResetThunk } from '@extension/features/messages'; import { setSettings } from '@extension/features/settings'; -// Selectors +// selectors import { useSelectSelectedNetwork, useSelectSettings, } from '@extension/selectors'; -// Types +// types import { IAppThunkDispatch, IExplorer, diff --git a/src/extension/pages/GetStartedPage/GetStartedPage.tsx b/src/extension/pages/GetStartedPage/GetStartedPage.tsx index 2eeb820d..2cc15669 100644 --- a/src/extension/pages/GetStartedPage/GetStartedPage.tsx +++ b/src/extension/pages/GetStartedPage/GetStartedPage.tsx @@ -3,14 +3,14 @@ import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; import { NavigateFunction, useNavigate } from 'react-router-dom'; -// Components +// components import KibisisIcon from '@extension/components/KibisisIcon'; import Button from '@extension/components/Button'; -// Constants +// constants import { CREATE_PASSWORD_ROUTE, DEFAULT_GAP } from '@extension/constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryColor from '@extension/hooks/usePrimaryColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; diff --git a/src/extension/pages/ImportExistingAccountPage/ImportExistingAccountPage.tsx b/src/extension/pages/ImportExistingAccountPage/ImportExistingAccountPage.tsx index a58a3179..d8c4df00 100644 --- a/src/extension/pages/ImportExistingAccountPage/ImportExistingAccountPage.tsx +++ b/src/extension/pages/ImportExistingAccountPage/ImportExistingAccountPage.tsx @@ -13,7 +13,7 @@ import React, { ChangeEvent, FC, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { NavigateFunction, useNavigate } from 'react-router-dom'; -// Components +// components import Button from '@extension/components/Button'; import EnterMnemonicPhraseInput, { validate, @@ -21,16 +21,16 @@ import EnterMnemonicPhraseInput, { import PageHeader from '@extension/components/PageHeader'; import Steps from '@extension/components/Steps'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryColor from '@extension/hooks/usePrimaryColor'; import usePrimaryColorScheme from '@extension/hooks/usePrimaryColorScheme'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Types +// types import { IAddAccountCompleteFunction } from '@extension/types'; interface IProps { diff --git a/src/extension/pages/MainAddAccountRouter/MainAddAccountRouter.tsx b/src/extension/pages/MainAddAccountRouter/MainAddAccountRouter.tsx index ef58915f..b1927cbc 100644 --- a/src/extension/pages/MainAddAccountRouter/MainAddAccountRouter.tsx +++ b/src/extension/pages/MainAddAccountRouter/MainAddAccountRouter.tsx @@ -2,17 +2,17 @@ import React, { FC, useEffect, useState } from 'react'; import { useDispatch } from 'react-redux'; import { NavigateFunction, Route, Routes, useNavigate } from 'react-router-dom'; -// Components +// components import ConfirmPasswordModal from '@extension/components/ConfirmPasswordModal'; -// Constants +// constants import { ACCOUNTS_ROUTE, CREATE_NEW_ACCOUNT_ROUTE, IMPORT_EXISTING_ACCOUNT_ROUTE, } from '@extension/constants'; -// Features +// features import { saveNewAccountThunk, updateAccountInformationThunk, @@ -23,17 +23,17 @@ import AccountSetupPage from '@extension/pages/AccountSetupPage'; import CreateNewAccountPage from '@extension/pages/CreateNewAccountPage'; import ImportExistingAccountPage from '@extension/pages/ImportExistingAccountPage'; -// Selectors +// selectors import { useSelectAccounts, useSelectLogger, useSelectSavingAccounts, } from '@extension/selectors'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { ILogger } from '@common/types'; import { IAccount, @@ -42,7 +42,7 @@ import { IAppThunkDispatch, } from '@extension/types'; -// Utils +// utils import { getAddressFromPrivateKey } from '@extension/utils'; const MainAddAccountRouter: FC = () => { diff --git a/src/extension/pages/RegistrationAddAccountRouter/RegistrationAddAccountRouter.tsx b/src/extension/pages/RegistrationAddAccountRouter/RegistrationAddAccountRouter.tsx index 3006c6c9..c825b1a9 100644 --- a/src/extension/pages/RegistrationAddAccountRouter/RegistrationAddAccountRouter.tsx +++ b/src/extension/pages/RegistrationAddAccountRouter/RegistrationAddAccountRouter.tsx @@ -2,13 +2,13 @@ import React, { FC } from 'react'; import { useDispatch } from 'react-redux'; import { Route, Routes } from 'react-router-dom'; -// Constants +// constants import { CREATE_NEW_ACCOUNT_ROUTE, IMPORT_EXISTING_ACCOUNT_ROUTE, } from '@extension/constants'; -// Features +// features import { saveCredentialsThunk } from '@extension/features/registration'; // Pages @@ -16,10 +16,10 @@ import AccountSetupPage from '@extension/pages/AccountSetupPage'; import CreateNewAccountPage from '@extension/pages/CreateNewAccountPage'; import ImportExistingAccountPage from '@extension/pages/ImportExistingAccountPage'; -// Selectors +// selectors import { useSelectSavingRegistration } from '@extension/selectors'; -// Types +// types import { IAddAccountCompleteFunction, IAddAccountCompleteResult, diff --git a/src/extension/pages/SecuritySettingsIndexPage/SecuritySettingsIndexPage.tsx b/src/extension/pages/SecuritySettingsIndexPage/SecuritySettingsIndexPage.tsx index 9d771eeb..dc190d69 100644 --- a/src/extension/pages/SecuritySettingsIndexPage/SecuritySettingsIndexPage.tsx +++ b/src/extension/pages/SecuritySettingsIndexPage/SecuritySettingsIndexPage.tsx @@ -3,12 +3,12 @@ import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; import { IoLockClosedOutline } from 'react-icons/io5'; -// Components +// components import PageHeader from '@extension/components/PageHeader'; import SettingsLinkItem from '@extension/components/SettingsLinkItem'; import SettingsSubHeading from '@extension/components/SettingsSubHeading'; -// Constants +// constants import { CHANGE_PASSWORD_ROUTE, SECURITY_ROUTE, diff --git a/src/extension/pages/SecuritySettingsRouter/SecuritySettingsRouter.tsx b/src/extension/pages/SecuritySettingsRouter/SecuritySettingsRouter.tsx index de2d4eb2..65c47bb5 100644 --- a/src/extension/pages/SecuritySettingsRouter/SecuritySettingsRouter.tsx +++ b/src/extension/pages/SecuritySettingsRouter/SecuritySettingsRouter.tsx @@ -1,7 +1,7 @@ import React, { FC } from 'react'; import { Route, Routes } from 'react-router-dom'; -// Constants +// constants import { CHANGE_PASSWORD_ROUTE } from '@extension/constants'; // Pages diff --git a/src/extension/pages/SettingsIndexPage/SettingsIndexPage.tsx b/src/extension/pages/SettingsIndexPage/SettingsIndexPage.tsx index 312b68b9..d4b5922f 100644 --- a/src/extension/pages/SettingsIndexPage/SettingsIndexPage.tsx +++ b/src/extension/pages/SettingsIndexPage/SettingsIndexPage.tsx @@ -9,10 +9,10 @@ import { } from 'react-icons/io5'; import { useTranslation } from 'react-i18next'; -// Components +// components import SettingsLinkItem from '@extension/components/SettingsLinkItem'; -// Constants +// constants import { ADVANCED_ROUTE, APPEARANCE_ROUTE, @@ -23,7 +23,7 @@ import { SETTINGS_ROUTE, } from '@extension/constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; const SettingsIndexPage: FC = () => { diff --git a/src/extension/pages/SettingsRouter/SettingsRouter.tsx b/src/extension/pages/SettingsRouter/SettingsRouter.tsx index c76858db..59796d04 100644 --- a/src/extension/pages/SettingsRouter/SettingsRouter.tsx +++ b/src/extension/pages/SettingsRouter/SettingsRouter.tsx @@ -1,7 +1,7 @@ import React, { FC } from 'react'; import { Route, Routes } from 'react-router-dom'; -// Constants +// constants import { ADVANCED_ROUTE, APPEARANCE_ROUTE, diff --git a/src/extension/pages/TransactionPage/ApplicationTransactionContent.tsx b/src/extension/pages/TransactionPage/ApplicationTransactionContent.tsx index 45ccd704..3a969d95 100644 --- a/src/extension/pages/TransactionPage/ApplicationTransactionContent.tsx +++ b/src/extension/pages/TransactionPage/ApplicationTransactionContent.tsx @@ -15,25 +15,25 @@ import BigNumber from 'bignumber.js'; import React, { FC, useState } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AssetDisplay from '@extension/components/AssetDisplay'; import CopyIconButton from '@extension/components/CopyIconButton'; import MoreInformationAccordion from '@extension/components/MoreInformationAccordion'; import OpenTabIconButton from '@extension/components/OpenTabIconButton'; import PageItem, { ITEM_HEIGHT } from '@extension/components/PageItem'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryColorScheme from '@extension/hooks/usePrimaryColorScheme'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectPreferredBlockExplorer } from '@extension/selectors'; -// Types +// types import { IAccount, IApplicationTransaction, @@ -41,7 +41,7 @@ import { INetwork, } from '@extension/types'; -// Utils +// utils import { createIconFromDataUri, ellipseAddress } from '@extension/utils'; import InnerTransactionAccordion from '@extension/components/InnerTransactionAccordion'; diff --git a/src/extension/pages/TransactionPage/AssetConfigTransactionContent.tsx b/src/extension/pages/TransactionPage/AssetConfigTransactionContent.tsx index 6e683a0a..bcaaab74 100644 --- a/src/extension/pages/TransactionPage/AssetConfigTransactionContent.tsx +++ b/src/extension/pages/TransactionPage/AssetConfigTransactionContent.tsx @@ -10,7 +10,7 @@ import BigNumber from 'bignumber.js'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AddressDisplay from '@extension/components/AddressDisplay'; import AssetDisplay from '@extension/components/AssetDisplay'; import AssetIcon from '@extension/components/AssetIcon'; @@ -19,22 +19,22 @@ import MoreInformationAccordion from '@extension/components/MoreInformationAccor import OpenTabIconButton from '@extension/components/OpenTabIconButton'; import PageItem, { ITEM_HEIGHT } from '@extension/components/PageItem'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; -// Hooks +// hooks import useAsset from '@extension/hooks/useAsset'; import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryButtonTextColor from '@extension/hooks/usePrimaryButtonTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectPreferredBlockExplorer, } from '@extension/selectors'; -// Types +// types import { IAccount, IAssetConfigTransaction, @@ -42,7 +42,7 @@ import { INetwork, } from '@extension/types'; -// Utils +// utils import { createIconFromDataUri, ellipseAddress, diff --git a/src/extension/pages/TransactionPage/AssetCreateTransactionContent.tsx b/src/extension/pages/TransactionPage/AssetCreateTransactionContent.tsx index 287c92c1..6a9240b0 100644 --- a/src/extension/pages/TransactionPage/AssetCreateTransactionContent.tsx +++ b/src/extension/pages/TransactionPage/AssetCreateTransactionContent.tsx @@ -10,7 +10,7 @@ import BigNumber from 'bignumber.js'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AddressDisplay from '@extension/components/AddressDisplay'; import AssetDisplay from '@extension/components/AssetDisplay'; import AssetIcon from '@extension/components/AssetIcon'; @@ -19,21 +19,21 @@ import MoreInformationAccordion from '@extension/components/MoreInformationAccor import OpenTabIconButton from '@extension/components/OpenTabIconButton'; import PageItem, { ITEM_HEIGHT } from '@extension/components/PageItem'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryButtonTextColor from '@extension/hooks/usePrimaryButtonTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectPreferredBlockExplorer, } from '@extension/selectors'; -// Types +// types import { IAccount, IAssetCreateTransaction, @@ -41,7 +41,7 @@ import { INetwork, } from '@extension/types'; -// Utils +// utils import { createIconFromDataUri, ellipseAddress, diff --git a/src/extension/pages/TransactionPage/AssetDestroyTransactionContent.tsx b/src/extension/pages/TransactionPage/AssetDestroyTransactionContent.tsx index 87e0f577..49abed38 100644 --- a/src/extension/pages/TransactionPage/AssetDestroyTransactionContent.tsx +++ b/src/extension/pages/TransactionPage/AssetDestroyTransactionContent.tsx @@ -10,7 +10,7 @@ import BigNumber from 'bignumber.js'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AddressDisplay from '@extension/components/AddressDisplay'; import AssetDisplay from '@extension/components/AssetDisplay'; import CopyIconButton from '@extension/components/CopyIconButton'; @@ -18,20 +18,20 @@ import MoreInformationAccordion from '@extension/components/MoreInformationAccor import OpenTabIconButton from '@extension/components/OpenTabIconButton'; import PageItem, { ITEM_HEIGHT } from '@extension/components/PageItem'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectPreferredBlockExplorer, } from '@extension/selectors'; -// Types +// types import { IAccount, IAssetDestroyTransaction, @@ -39,7 +39,7 @@ import { INetwork, } from '@extension/types'; -// Utils +// utils import { createIconFromDataUri, ellipseAddress, diff --git a/src/extension/pages/TransactionPage/AssetFreezeTransactionContent.tsx b/src/extension/pages/TransactionPage/AssetFreezeTransactionContent.tsx index 4cc8a67a..9754c04b 100644 --- a/src/extension/pages/TransactionPage/AssetFreezeTransactionContent.tsx +++ b/src/extension/pages/TransactionPage/AssetFreezeTransactionContent.tsx @@ -10,7 +10,7 @@ import BigNumber from 'bignumber.js'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AddressDisplay from '@extension/components/AddressDisplay'; import AssetDisplay from '@extension/components/AssetDisplay'; import CopyIconButton from '@extension/components/CopyIconButton'; @@ -19,24 +19,24 @@ import MoreInformationAccordion from '@extension/components/MoreInformationAccor import OpenTabIconButton from '@extension/components/OpenTabIconButton'; import PageItem, { ITEM_HEIGHT } from '@extension/components/PageItem'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Hooks +// hooks import useAsset from '@extension/hooks/useAsset'; import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectPreferredBlockExplorer, } from '@extension/selectors'; -// Types +// types import { IAccount, IAssetFreezeTransaction, @@ -45,7 +45,7 @@ import { INetwork, } from '@extension/types'; -// Utils +// utils import { createIconFromDataUri, ellipseAddress, diff --git a/src/extension/pages/TransactionPage/AssetTransferTransactionContent.tsx b/src/extension/pages/TransactionPage/AssetTransferTransactionContent.tsx index d550bdd9..0572417b 100644 --- a/src/extension/pages/TransactionPage/AssetTransferTransactionContent.tsx +++ b/src/extension/pages/TransactionPage/AssetTransferTransactionContent.tsx @@ -10,7 +10,7 @@ import BigNumber from 'bignumber.js'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AddressDisplay from '@extension/components/AddressDisplay'; import AssetDisplay from '@extension/components/AssetDisplay'; import AssetAvatar from '@extension/components/AssetAvatar'; @@ -21,25 +21,25 @@ import MoreInformationAccordion from '@extension/components/MoreInformationAccor import OpenTabIconButton from '@extension/components/OpenTabIconButton'; import PageItem, { ITEM_HEIGHT } from '@extension/components/PageItem'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; -// Hooks +// hooks import useAsset from '@extension/hooks/useAsset'; import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import usePrimaryButtonTextColor from '@extension/hooks/usePrimaryButtonTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectPreferredBlockExplorer, } from '@extension/selectors'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { IAccount, IAssetTransferTransaction, @@ -47,7 +47,7 @@ import { INetwork, } from '@extension/types'; -// Utils +// utils import { createIconFromDataUri, ellipseAddress, diff --git a/src/extension/pages/TransactionPage/LoadingTransactionContent.tsx b/src/extension/pages/TransactionPage/LoadingTransactionContent.tsx index b878c39d..622b7749 100644 --- a/src/extension/pages/TransactionPage/LoadingTransactionContent.tsx +++ b/src/extension/pages/TransactionPage/LoadingTransactionContent.tsx @@ -2,7 +2,7 @@ import { Skeleton, Text, VStack } from '@chakra-ui/react'; import { faker } from '@faker-js/faker'; import React, { FC } from 'react'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; const LoadingTransactionContent: FC = () => ( diff --git a/src/extension/pages/TransactionPage/PaymentTransactionContent.tsx b/src/extension/pages/TransactionPage/PaymentTransactionContent.tsx index 7e3dcb5f..3b77d33d 100644 --- a/src/extension/pages/TransactionPage/PaymentTransactionContent.tsx +++ b/src/extension/pages/TransactionPage/PaymentTransactionContent.tsx @@ -10,7 +10,7 @@ import BigNumber from 'bignumber.js'; import React, { FC } from 'react'; import { useTranslation } from 'react-i18next'; -// Components +// components import AddressDisplay from '@extension/components/AddressDisplay'; import AssetDisplay from '@extension/components/AssetDisplay'; import CopyIconButton from '@extension/components/CopyIconButton'; @@ -18,23 +18,23 @@ import MoreInformationAccordion from '@extension/components/MoreInformationAccor import OpenTabIconButton from '@extension/components/OpenTabIconButton'; import PageItem, { ITEM_HEIGHT } from '@extension/components/PageItem'; -// Constants +// constants import { DEFAULT_GAP } from '@extension/constants'; -// Hooks +// hooks import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; -// Selectors +// selectors import { useSelectAccounts, useSelectPreferredBlockExplorer, } from '@extension/selectors'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { IAccount, IExplorer, @@ -42,7 +42,7 @@ import { IPaymentTransaction, } from '@extension/types'; -// Utils +// utils import { createIconFromDataUri, ellipseAddress } from '@extension/utils'; interface IProps { diff --git a/src/extension/pages/TransactionPage/TransactionPage.tsx b/src/extension/pages/TransactionPage/TransactionPage.tsx index 3f8e6405..8ead6c6b 100644 --- a/src/extension/pages/TransactionPage/TransactionPage.tsx +++ b/src/extension/pages/TransactionPage/TransactionPage.tsx @@ -2,7 +2,7 @@ import React, { FC, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { NavigateFunction, useNavigate, useParams } from 'react-router-dom'; -// Components +// components import PageHeader from '@extension/components/PageHeader'; import ApplicationTransactionContent from './ApplicationTransactionContent'; import AssetConfigTransactionContent from './AssetConfigTransactionContent'; @@ -13,13 +13,13 @@ import AssetTransferTransactionContent from './AssetTransferTransactionContent'; import LoadingTransactionContent from './LoadingTransactionContent'; import PaymentTransactionContent from './PaymentTransactionContent'; -// Constants +// constants import { ACCOUNTS_ROUTE } from '@extension/constants'; -// Hooks +// hooks import useTransactionPage from './hooks/useTransactionPage'; -// Utils +// utils import { TransactionTypeEnum } from '@extension/enums'; const TransactionPage: FC = () => { diff --git a/src/extension/pages/TransactionPage/hooks/useTransactionPage/types/IUseTransactionPageState.ts b/src/extension/pages/TransactionPage/hooks/useTransactionPage/types/IUseTransactionPageState.ts index a253e263..336efc24 100644 --- a/src/extension/pages/TransactionPage/hooks/useTransactionPage/types/IUseTransactionPageState.ts +++ b/src/extension/pages/TransactionPage/hooks/useTransactionPage/types/IUseTransactionPageState.ts @@ -1,4 +1,4 @@ -// Types +// types import { IAccount, IAccountInformation, diff --git a/src/extension/pages/TransactionPage/hooks/useTransactionPage/useTransactionPage.ts b/src/extension/pages/TransactionPage/hooks/useTransactionPage/useTransactionPage.ts index 766778d9..16473a63 100644 --- a/src/extension/pages/TransactionPage/hooks/useTransactionPage/useTransactionPage.ts +++ b/src/extension/pages/TransactionPage/hooks/useTransactionPage/useTransactionPage.ts @@ -1,19 +1,19 @@ import { useEffect, useState } from 'react'; -// Features +// features import { IAccountTransaction } from '@extension/features/transactions'; -// Selectors +// selectors import { useSelectAccounts, useSelectAccountTransactions, useSelectSelectedNetwork, } from '@extension/selectors'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { IAccount, IAccountInformation, diff --git a/src/extension/selectors/useSelectAccount.ts b/src/extension/selectors/useSelectAccount.ts index eb2c4f82..20bccd6e 100644 --- a/src/extension/selectors/useSelectAccount.ts +++ b/src/extension/selectors/useSelectAccount.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IAccount, IMainRootState } from '@extension/types'; import { AccountService } from '@extension/services'; diff --git a/src/extension/selectors/useSelectAccountById.ts b/src/extension/selectors/useSelectAccountById.ts index ce472c27..1eedf274 100644 --- a/src/extension/selectors/useSelectAccountById.ts +++ b/src/extension/selectors/useSelectAccountById.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IAccount, IMainRootState } from '@extension/types'; /** diff --git a/src/extension/selectors/useSelectAccountByPublicKey.ts b/src/extension/selectors/useSelectAccountByPublicKey.ts index de1b7673..3e2daac3 100644 --- a/src/extension/selectors/useSelectAccountByPublicKey.ts +++ b/src/extension/selectors/useSelectAccountByPublicKey.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IAccount, IMainRootState } from '@extension/types'; /** diff --git a/src/extension/selectors/useSelectAccountTransactionByAccountId.ts b/src/extension/selectors/useSelectAccountTransactionByAccountId.ts index bf64b652..fae69fe6 100644 --- a/src/extension/selectors/useSelectAccountTransactionByAccountId.ts +++ b/src/extension/selectors/useSelectAccountTransactionByAccountId.ts @@ -1,9 +1,9 @@ import { useSelector } from 'react-redux'; -// Features +// features import { IAccountTransaction } from '@extension/features/transactions'; -// Types +// types import { IMainRootState } from '@extension/types'; /** diff --git a/src/extension/selectors/useSelectAccountTransactions.ts b/src/extension/selectors/useSelectAccountTransactions.ts index 4dfd9e0f..3394edf3 100644 --- a/src/extension/selectors/useSelectAccountTransactions.ts +++ b/src/extension/selectors/useSelectAccountTransactions.ts @@ -1,9 +1,9 @@ import { useSelector } from 'react-redux'; -// Features +// features import { IAccountTransaction } from '@extension/features/transactions'; -// Types +// types import { IMainRootState } from '@extension/types'; /** diff --git a/src/extension/selectors/useSelectAccounts.ts b/src/extension/selectors/useSelectAccounts.ts index 52469137..7dbf2da1 100644 --- a/src/extension/selectors/useSelectAccounts.ts +++ b/src/extension/selectors/useSelectAccounts.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IAccount, IMainRootState } from '@extension/types'; /** diff --git a/src/extension/selectors/useSelectAssets.ts b/src/extension/selectors/useSelectAssets.ts index 46371f1b..9a934be7 100644 --- a/src/extension/selectors/useSelectAssets.ts +++ b/src/extension/selectors/useSelectAssets.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IAsset, IMainRootState } from '@extension/types'; /** diff --git a/src/extension/selectors/useSelectAssetsByGenesisHash.ts b/src/extension/selectors/useSelectAssetsByGenesisHash.ts index 31372c20..dd43831a 100644 --- a/src/extension/selectors/useSelectAssetsByGenesisHash.ts +++ b/src/extension/selectors/useSelectAssetsByGenesisHash.ts @@ -1,9 +1,9 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IAsset, IMainRootState } from '@extension/types'; -// Utils +// utils import { convertGenesisHashToHex } from '@extension/utils'; /** diff --git a/src/extension/selectors/useSelectColorMode.ts b/src/extension/selectors/useSelectColorMode.ts index 6e6fcca9..77cc66f7 100644 --- a/src/extension/selectors/useSelectColorMode.ts +++ b/src/extension/selectors/useSelectColorMode.ts @@ -1,7 +1,7 @@ import { useSelector } from 'react-redux'; import { ColorMode } from '@chakra-ui/react'; -// Types +// types import { IAppearanceSettings, IMainRootState } from '@extension/types'; export default function useSelectColorMode(): ColorMode { diff --git a/src/extension/selectors/useSelectConfirm.ts b/src/extension/selectors/useSelectConfirm.ts index 026b171f..17e52a07 100644 --- a/src/extension/selectors/useSelectConfirm.ts +++ b/src/extension/selectors/useSelectConfirm.ts @@ -1,9 +1,9 @@ import { useSelector } from 'react-redux'; -// Features +// features import { IConfirm } from '@extension/features/system'; -// Types +// types import { IBaseRootState } from '@extension/types'; export default function useSelectConfirm(): IConfirm | null { diff --git a/src/extension/selectors/useSelectEnableRequest.ts b/src/extension/selectors/useSelectEnableRequest.ts index 5f947a7b..6327752f 100644 --- a/src/extension/selectors/useSelectEnableRequest.ts +++ b/src/extension/selectors/useSelectEnableRequest.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IEnableRequest, IMainRootState } from '@extension/types'; /** diff --git a/src/extension/selectors/useSelectError.ts b/src/extension/selectors/useSelectError.ts index 35385dee..fa2f1cf4 100644 --- a/src/extension/selectors/useSelectError.ts +++ b/src/extension/selectors/useSelectError.ts @@ -1,9 +1,9 @@ import { useSelector } from 'react-redux'; -// Errors +// errors import { BaseExtensionError } from '@extension/errors'; -// Types +// types import { IBaseRootState } from '@extension/types'; export default function useSelectError(): BaseExtensionError | null { diff --git a/src/extension/selectors/useSelectFetchingAccounts.ts b/src/extension/selectors/useSelectFetchingAccounts.ts index 7bc2a15d..6001596e 100644 --- a/src/extension/selectors/useSelectFetchingAccounts.ts +++ b/src/extension/selectors/useSelectFetchingAccounts.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IMainRootState } from '@extension/types'; export default function useSelectFetchingAccounts(): boolean { return useSelector( diff --git a/src/extension/selectors/useSelectFetchingAssets.ts b/src/extension/selectors/useSelectFetchingAssets.ts index c34c7a9d..445750e0 100644 --- a/src/extension/selectors/useSelectFetchingAssets.ts +++ b/src/extension/selectors/useSelectFetchingAssets.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IMainRootState } from '@extension/types'; export default function useSelectFetchingAssets(): boolean { return useSelector((state) => state.assets.fetching); diff --git a/src/extension/selectors/useSelectFetchingSessions.ts b/src/extension/selectors/useSelectFetchingSessions.ts index 034836cd..92e74f62 100644 --- a/src/extension/selectors/useSelectFetchingSessions.ts +++ b/src/extension/selectors/useSelectFetchingSessions.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IMainRootState } from '@extension/types'; export default function useSelectFetchingSessions(): boolean { return useSelector( diff --git a/src/extension/selectors/useSelectFetchingSettings.ts b/src/extension/selectors/useSelectFetchingSettings.ts index 6e531ed8..4a6ac0e5 100644 --- a/src/extension/selectors/useSelectFetchingSettings.ts +++ b/src/extension/selectors/useSelectFetchingSettings.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IMainRootState } from '@extension/types'; export default function useSelectFetchingSettings(): boolean { return useSelector( diff --git a/src/extension/selectors/useSelectFetchingTransactionsByAccountId.ts b/src/extension/selectors/useSelectFetchingTransactionsByAccountId.ts index b0f0e8c0..e80f7225 100644 --- a/src/extension/selectors/useSelectFetchingTransactionsByAccountId.ts +++ b/src/extension/selectors/useSelectFetchingTransactionsByAccountId.ts @@ -1,12 +1,12 @@ import { useSelector } from 'react-redux'; -// Features +// features import { IAccountTransaction } from '@extension/features/transactions'; -// Selectors +// selectors import useSelectAccountTransactionByAccountId from './useSelectAccountTransactionByAccountId'; -// Types +// types import { IMainRootState } from '@extension/types'; /** diff --git a/src/extension/selectors/useSelectInitializingWalletConnect.ts b/src/extension/selectors/useSelectInitializingWalletConnect.ts index ce311667..85165a92 100644 --- a/src/extension/selectors/useSelectInitializingWalletConnect.ts +++ b/src/extension/selectors/useSelectInitializingWalletConnect.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IMainRootState } from '@extension/types'; export default function useSelectInitializingWalletConnect(): boolean { return useSelector( diff --git a/src/extension/selectors/useSelectIsOnline.ts b/src/extension/selectors/useSelectIsOnline.ts index 6135aabb..a06f6506 100644 --- a/src/extension/selectors/useSelectIsOnline.ts +++ b/src/extension/selectors/useSelectIsOnline.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IMainRootState } from '@extension/types'; export default function useSelectIsOnline(): boolean { diff --git a/src/extension/selectors/useSelectLogger.ts b/src/extension/selectors/useSelectLogger.ts index ae2bd6f8..5143b722 100644 --- a/src/extension/selectors/useSelectLogger.ts +++ b/src/extension/selectors/useSelectLogger.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { ILogger } from '@common/types'; import { IBaseRootState } from '@extension/types'; diff --git a/src/extension/selectors/useSelectNetworkByGenesisHash.ts b/src/extension/selectors/useSelectNetworkByGenesisHash.ts index 1c92c16a..ca579871 100644 --- a/src/extension/selectors/useSelectNetworkByGenesisHash.ts +++ b/src/extension/selectors/useSelectNetworkByGenesisHash.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IMainRootState, INetwork } from '@extension/types'; /** diff --git a/src/extension/selectors/useSelectNetworks.ts b/src/extension/selectors/useSelectNetworks.ts index 2af8ac20..6afcb4fb 100644 --- a/src/extension/selectors/useSelectNetworks.ts +++ b/src/extension/selectors/useSelectNetworks.ts @@ -1,9 +1,9 @@ import { useSelector } from 'react-redux'; -// Enums +// enums import { NetworkTypeEnum } from '@extension/enums'; -// Types +// types import { IMainRootState, INetwork } from '@extension/types'; /** diff --git a/src/extension/selectors/useSelectPreferredBlockExplorer.ts b/src/extension/selectors/useSelectPreferredBlockExplorer.ts index cd4e820f..ae7be85b 100644 --- a/src/extension/selectors/useSelectPreferredBlockExplorer.ts +++ b/src/extension/selectors/useSelectPreferredBlockExplorer.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IExplorer, IMainRootState, INetwork } from '@extension/types'; /** diff --git a/src/extension/selectors/useSelectSavingAccounts.ts b/src/extension/selectors/useSelectSavingAccounts.ts index a93951c5..e7f8fc0d 100644 --- a/src/extension/selectors/useSelectSavingAccounts.ts +++ b/src/extension/selectors/useSelectSavingAccounts.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IMainRootState } from '@extension/types'; export default function useSelectSavingAccounts(): boolean { return useSelector((state) => state.accounts.saving); diff --git a/src/extension/selectors/useSelectSavingRegistration.ts b/src/extension/selectors/useSelectSavingRegistration.ts index eb5d0064..49bea47f 100644 --- a/src/extension/selectors/useSelectSavingRegistration.ts +++ b/src/extension/selectors/useSelectSavingRegistration.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IRegistrationRootState } from '@extension/types'; export default function useSelectSavingRegistration(): boolean { return useSelector( diff --git a/src/extension/selectors/useSelectSavingSessions.ts b/src/extension/selectors/useSelectSavingSessions.ts index 0470b54a..1fdfb4a1 100644 --- a/src/extension/selectors/useSelectSavingSessions.ts +++ b/src/extension/selectors/useSelectSavingSessions.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IMainRootState } from '@extension/types'; export default function useSelectSavingSessions(): boolean { return useSelector((state) => state.sessions.saving); diff --git a/src/extension/selectors/useSelectSavingSettings.ts b/src/extension/selectors/useSelectSavingSettings.ts index 2aa99904..7f50b359 100644 --- a/src/extension/selectors/useSelectSavingSettings.ts +++ b/src/extension/selectors/useSelectSavingSettings.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IMainRootState } from '@extension/types'; export default function useSelectSavingSettings(): boolean { return useSelector((state) => state.settings.saving); diff --git a/src/extension/selectors/useSelectSelectedNetwork.ts b/src/extension/selectors/useSelectSelectedNetwork.ts index 95c0f705..b1f844cb 100644 --- a/src/extension/selectors/useSelectSelectedNetwork.ts +++ b/src/extension/selectors/useSelectSelectedNetwork.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IMainRootState, INetwork } from '@extension/types'; /** diff --git a/src/extension/selectors/useSelectSessions.ts b/src/extension/selectors/useSelectSessions.ts index 95ef8f0c..15b00f1c 100644 --- a/src/extension/selectors/useSelectSessions.ts +++ b/src/extension/selectors/useSelectSessions.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IMainRootState, ISession } from '@extension/types'; /** diff --git a/src/extension/selectors/useSelectSettings.ts b/src/extension/selectors/useSelectSettings.ts index 4f0cbbdc..1d728604 100644 --- a/src/extension/selectors/useSelectSettings.ts +++ b/src/extension/selectors/useSelectSettings.ts @@ -1,9 +1,9 @@ import { useSelector } from 'react-redux'; -// Features +// features import { filterSettingsFromState } from '@extension/features/settings'; -// Types +// types import { IMainRootState, ISettings } from '@extension/types'; export default function useSelectSettings(): ISettings { diff --git a/src/extension/selectors/useSelectSideBar.ts b/src/extension/selectors/useSelectSideBar.ts index 5db1f323..e6209da6 100644 --- a/src/extension/selectors/useSelectSideBar.ts +++ b/src/extension/selectors/useSelectSideBar.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IBaseRootState } from '@extension/types'; export default function useSelectSideBar(): boolean { diff --git a/src/extension/selectors/useSelectSignBytesRequest.ts b/src/extension/selectors/useSelectSignBytesRequest.ts index 9f6d30e9..09b7f201 100644 --- a/src/extension/selectors/useSelectSignBytesRequest.ts +++ b/src/extension/selectors/useSelectSignBytesRequest.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IMainRootState, ISignBytesRequest } from '@extension/types'; /** diff --git a/src/extension/selectors/useSelectSignTxnsRequest.ts b/src/extension/selectors/useSelectSignTxnsRequest.ts index 9e28a24e..c7649dd2 100644 --- a/src/extension/selectors/useSelectSignTxnsRequest.ts +++ b/src/extension/selectors/useSelectSignTxnsRequest.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IMainRootState, ISignTxnsRequest } from '@extension/types'; /** diff --git a/src/extension/selectors/useSelectToast.ts b/src/extension/selectors/useSelectToast.ts index dbc0aa48..6162c215 100644 --- a/src/extension/selectors/useSelectToast.ts +++ b/src/extension/selectors/useSelectToast.ts @@ -1,7 +1,7 @@ import { CreateToastFnReturn } from '@chakra-ui/react'; import { useSelector } from 'react-redux'; -// Types +// types import { IBaseRootState } from '@extension/types'; export default function useSelectToast(): CreateToastFnReturn | null { diff --git a/src/extension/selectors/useSelectUpdatingAccounts.ts b/src/extension/selectors/useSelectUpdatingAccounts.ts index 44192455..cf5a3408 100644 --- a/src/extension/selectors/useSelectUpdatingAccounts.ts +++ b/src/extension/selectors/useSelectUpdatingAccounts.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IMainRootState } from '@extension/types'; export default function useSelectUpdatingAccounts(): boolean { return useSelector( diff --git a/src/extension/selectors/useSelectUpdatingAssets.ts b/src/extension/selectors/useSelectUpdatingAssets.ts index 80b0fc2b..8ed5009c 100644 --- a/src/extension/selectors/useSelectUpdatingAssets.ts +++ b/src/extension/selectors/useSelectUpdatingAssets.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IMainRootState } from '@extension/types'; export default function useSelectUpdatingAssets(): boolean { return useSelector((state) => state.assets.updating); diff --git a/src/extension/selectors/useSelectWalletConnectModalOpen.ts b/src/extension/selectors/useSelectWalletConnectModalOpen.ts index 6a53c69a..68197b1f 100644 --- a/src/extension/selectors/useSelectWalletConnectModalOpen.ts +++ b/src/extension/selectors/useSelectWalletConnectModalOpen.ts @@ -1,6 +1,6 @@ import { useSelector } from 'react-redux'; -// Types +// types import { IMainRootState } from '@extension/types'; export default function useSelectWalletConnectModalOpen(): boolean { return useSelector( diff --git a/src/extension/selectors/useSelectWeb3Wallet.ts b/src/extension/selectors/useSelectWeb3Wallet.ts index c8a8404a..b1211720 100644 --- a/src/extension/selectors/useSelectWeb3Wallet.ts +++ b/src/extension/selectors/useSelectWeb3Wallet.ts @@ -1,7 +1,7 @@ import { IWeb3Wallet } from '@walletconnect/web3wallet/dist/types'; import { useSelector } from 'react-redux'; -// Types +// types import { IMainRootState } from '@extension/types'; export default function useSelectWeb3Wallet(): IWeb3Wallet | null { return useSelector( diff --git a/src/extension/services/AccountService.ts b/src/extension/services/AccountService.ts index e7f21c58..3011aa2f 100644 --- a/src/extension/services/AccountService.ts +++ b/src/extension/services/AccountService.ts @@ -2,16 +2,16 @@ import { decode as decodeAsHex, encode as encodeHex } from '@stablelib/hex'; import { decodeAddress, encodeAddress } from 'algosdk'; import { v4 as uuid } from 'uuid'; -// Config +// config import { networks } from '@extension/config'; -// Constants +// constants import { ACCOUNTS_ITEM_KEY_PREFIX } from '@extension/constants'; // Service import StorageManager from './StorageManager'; -// Types +// types import { IBaseOptions, ILogger } from '@common/types'; import { IAccount, @@ -20,7 +20,7 @@ import { INetwork, } from '@extension/types'; -// Utils +// utils import { convertGenesisHashToHex } from '@extension/utils'; export default class AccountService { diff --git a/src/extension/services/BackgroundService.ts b/src/extension/services/BackgroundService.ts index 14bd91c8..1ca22e38 100644 --- a/src/extension/services/BackgroundService.ts +++ b/src/extension/services/BackgroundService.ts @@ -1,22 +1,22 @@ import browser, { Runtime, Windows } from 'webextension-polyfill'; -// Constants +// constants import { DEFAULT_POPUP_HEIGHT, DEFAULT_POPUP_WIDTH, } from '@extension/constants'; -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Events +// events import { BaseEvent, ExtensionBackgroundAppLoadEvent } from '@common/events'; -// Services +// servcies import PrivateKeyService from './PrivateKeyService'; import StorageManager from './StorageManager'; -// Types +// types import { IBaseOptions, IAllExtensionEvents, diff --git a/src/extension/services/ExternalEventService.ts b/src/extension/services/ExternalEventService.ts index 05b77d46..f6d44629 100644 --- a/src/extension/services/ExternalEventService.ts +++ b/src/extension/services/ExternalEventService.ts @@ -5,16 +5,16 @@ import { import { decodeUnsignedTransaction, Transaction } from 'algosdk'; import browser from 'webextension-polyfill'; -// Config +// config import { networks } from '@extension/config'; -// Constants +// constants import { SETTINGS_GENERAL_KEY } from '@extension/constants'; -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Errors +// errors import { SerializableInvalidGroupIdError, SerializableInvalidInputError, @@ -22,7 +22,7 @@ import { SerializableUnauthorizedSignerError, } from '@common/errors'; -// Events +// events import { ExtensionEnableRequestEvent, ExtensionEnableResponseEvent, @@ -38,12 +38,12 @@ import { ExternalSignTxnsResponseEvent, } from '@common/events'; -// Services +// servcies import AccountService from './AccountService'; import SessionService from './SessionService'; import StorageManager from './StorageManager'; -// Types +// types import { IBaseExtensionRequestPayload, IBaseOptions, @@ -61,7 +61,7 @@ import { IStorageItemTypes, } from '@extension/types'; -// Utils +// utils import { computeGroupId } from '@common/utils'; import { getAuthorizedAddressesForHost, diff --git a/src/extension/services/PrivateKeyService.test.ts b/src/extension/services/PrivateKeyService.test.ts index 64413b20..5badd095 100644 --- a/src/extension/services/PrivateKeyService.test.ts +++ b/src/extension/services/PrivateKeyService.test.ts @@ -2,13 +2,13 @@ import { faker } from '@faker-js/faker'; import { encode as encodeHex } from '@stablelib/hex'; import { Account, generateAccount } from 'algosdk'; -// Services +// servcies import PrivateKeyService from './PrivateKeyService'; -// Types +// types import type { ILogger } from '@common/types'; -// Utils +// utils import { createLogger } from '@common/utils'; describe(PrivateKeyService.name, () => { diff --git a/src/extension/services/PrivateKeyService.ts b/src/extension/services/PrivateKeyService.ts index 8f8357ce..f0169011 100644 --- a/src/extension/services/PrivateKeyService.ts +++ b/src/extension/services/PrivateKeyService.ts @@ -4,13 +4,13 @@ import scrypt from 'scrypt-async'; import { hash, randomBytes, secretbox, sign, SignKeyPair } from 'tweetnacl'; import { v4 as uuid } from 'uuid'; -// Constants +// constants import { PASSWORD_TAG_ITEM_KEY, PRIVATE_KEY_ITEM_KEY_PREFIX, } from '@extension/constants'; -// Errors +// errors import { DecryptionError, EncryptionError, @@ -18,10 +18,10 @@ import { MalformedDataError, } from '@extension/errors'; -// Services +// servcies import StorageManager from './StorageManager'; -// Types +// types import { IBaseOptions, ILogger } from '@common/types'; import { IPasswordTag, IPrivateKey } from '@extension/types'; diff --git a/src/extension/services/SessionService.ts b/src/extension/services/SessionService.ts index e3d9ad35..fbe91503 100644 --- a/src/extension/services/SessionService.ts +++ b/src/extension/services/SessionService.ts @@ -1,10 +1,10 @@ -// Constants +// constants import { SESSION_ITEM_KEY_PREFIX } from '@extension/constants'; -// Services +// servcies import StorageManager from './StorageManager'; -// Types +// types import { IBaseOptions, ILogger } from '@common/types'; import { ISession } from '@extension/types'; diff --git a/src/extension/services/StorageManager.ts b/src/extension/services/StorageManager.ts index 6e696c32..f74c1dc7 100644 --- a/src/extension/services/StorageManager.ts +++ b/src/extension/services/StorageManager.ts @@ -1,6 +1,6 @@ import browser from 'webextension-polyfill'; -// Types +// types import { IStorageItemTypes } from '@extension/types'; export default class StorageManager { diff --git a/src/extension/theme/theme.tsx b/src/extension/theme/theme.tsx index 3442ad64..95305a64 100644 --- a/src/extension/theme/theme.tsx +++ b/src/extension/theme/theme.tsx @@ -2,7 +2,7 @@ import { extendTheme } from '@chakra-ui/react'; import { Dict } from '@chakra-ui/utils'; import { StepsTheme as Steps } from 'chakra-ui-steps'; -// Themes +// themes import Tag from './tag'; const theme: Dict = extendTheme({ @@ -70,9 +70,18 @@ const theme: Dict = extendTheme({ Tag, }, fonts: { - heading: 'AnonymousPro - Bold', + heading: 'AnonymousPro', body: 'AnonymousPro', }, + styles: { + global: { + // remove scrollbars + ['*::-webkit-scrollbar']: { + display: 'none', + }, + ['scrollbar-width']: 'none', + }, + }, }); export default theme; diff --git a/src/extension/translations/en.ts b/src/extension/translations/en.ts index 8cff6fbe..1a34c882 100644 --- a/src/extension/translations/en.ts +++ b/src/extension/translations/en.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import { IResourceLanguage } from '@extension/types'; const translation: IResourceLanguage = { diff --git a/src/extension/types/IAccount.ts b/src/extension/types/IAccount.ts index b97f6ed4..154b97df 100644 --- a/src/extension/types/IAccount.ts +++ b/src/extension/types/IAccount.ts @@ -1,4 +1,4 @@ -// Types +// types import IAccountInformation from './IAccountInformation'; /** diff --git a/src/extension/types/IAccountInformation.ts b/src/extension/types/IAccountInformation.ts index a6b96748..a304ab81 100644 --- a/src/extension/types/IAccountInformation.ts +++ b/src/extension/types/IAccountInformation.ts @@ -1,4 +1,4 @@ -// Types +// types import IAssetHolding from './IAssetHolding'; /** diff --git a/src/extension/types/IAlgorandAccountInformation.ts b/src/extension/types/IAlgorandAccountInformation.ts index 315a1ec6..f53ad084 100644 --- a/src/extension/types/IAlgorandAccountInformation.ts +++ b/src/extension/types/IAlgorandAccountInformation.ts @@ -1,4 +1,4 @@ -// Types +// types import IAlgorandAssetHolding from './IAlgorandAssetHolding'; interface IAlgorandAccountInformation { diff --git a/src/extension/types/IAlgorandAccountTransaction.ts b/src/extension/types/IAlgorandAccountTransaction.ts index f65467a9..9a73bb12 100644 --- a/src/extension/types/IAlgorandAccountTransaction.ts +++ b/src/extension/types/IAlgorandAccountTransaction.ts @@ -1,4 +1,4 @@ -// Types +// types import IAlgorandTransaction from './IAlgorandTransaction'; interface IAlgorandAccountTransaction { diff --git a/src/extension/types/IAlgorandApplicationTransaction.ts b/src/extension/types/IAlgorandApplicationTransaction.ts index 0dd21a9f..9c92ccf6 100644 --- a/src/extension/types/IAlgorandApplicationTransaction.ts +++ b/src/extension/types/IAlgorandApplicationTransaction.ts @@ -1,4 +1,4 @@ -// Types +// types import IAlgorandStateSchema from './IAlgorandStateSchema'; interface IAlgorandApplicationTransaction { diff --git a/src/extension/types/IAlgorandAsset.ts b/src/extension/types/IAlgorandAsset.ts index ac6e98c2..664288b0 100644 --- a/src/extension/types/IAlgorandAsset.ts +++ b/src/extension/types/IAlgorandAsset.ts @@ -1,4 +1,4 @@ -// Types +// types import IAlgorandAssetParams from './IAlgorandAssetParams'; interface IAlgorandAsset { diff --git a/src/extension/types/IAlgorandAssetConfigTransaction.ts b/src/extension/types/IAlgorandAssetConfigTransaction.ts index b023b37e..04830064 100644 --- a/src/extension/types/IAlgorandAssetConfigTransaction.ts +++ b/src/extension/types/IAlgorandAssetConfigTransaction.ts @@ -1,4 +1,4 @@ -// Types +// types import IAlgorandAssetParams from './IAlgorandAssetParams'; interface IAlgorandAssetConfigTransaction { diff --git a/src/extension/types/IAlgorandTransaction.ts b/src/extension/types/IAlgorandTransaction.ts index 4a1e1217..81916f1f 100644 --- a/src/extension/types/IAlgorandTransaction.ts +++ b/src/extension/types/IAlgorandTransaction.ts @@ -1,4 +1,4 @@ -// Types +// types import IAlgorandApplicationTransaction from './IAlgorandApplicationTransaction'; import IAlgorandAssetConfigTransaction from './IAlgorandAssetConfigTransaction'; import IAlgorandAssetFreezeTransaction from './IAlgorandAssetFreezeTransaction'; diff --git a/src/extension/types/IAppThunkDispatch.ts b/src/extension/types/IAppThunkDispatch.ts index 3442145d..628dfa28 100644 --- a/src/extension/types/IAppThunkDispatch.ts +++ b/src/extension/types/IAppThunkDispatch.ts @@ -1,6 +1,6 @@ import { AnyAction, ThunkDispatch } from '@reduxjs/toolkit'; -// Types +// types import IMainRootState from './IMainRootState'; type IAppThunkDispatch = ThunkDispatch; diff --git a/src/extension/types/IApplicationTransaction.ts b/src/extension/types/IApplicationTransaction.ts index fa071f0a..41853fb4 100644 --- a/src/extension/types/IApplicationTransaction.ts +++ b/src/extension/types/IApplicationTransaction.ts @@ -1,4 +1,4 @@ -// Types +// types import IApplicationTransactionTypes from './IApplicationTransactionTypes'; import IBaseTransaction from './IBaseTransaction'; import ITransactions from './ITransactions'; diff --git a/src/extension/types/IApplicationTransactionTypes.ts b/src/extension/types/IApplicationTransactionTypes.ts index f5cbcd4d..fef78b19 100644 --- a/src/extension/types/IApplicationTransactionTypes.ts +++ b/src/extension/types/IApplicationTransactionTypes.ts @@ -1,4 +1,4 @@ -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; type IApplicationTransactionTypes = diff --git a/src/extension/types/IAssetConfigTransaction.ts b/src/extension/types/IAssetConfigTransaction.ts index 7850188e..b7576b0c 100644 --- a/src/extension/types/IAssetConfigTransaction.ts +++ b/src/extension/types/IAssetConfigTransaction.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import IBaseTransaction from './IBaseTransaction'; interface IAssetConfigTransaction extends IBaseTransaction { diff --git a/src/extension/types/IAssetCreateTransaction.ts b/src/extension/types/IAssetCreateTransaction.ts index bf920385..e8053bcb 100644 --- a/src/extension/types/IAssetCreateTransaction.ts +++ b/src/extension/types/IAssetCreateTransaction.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import IBaseTransaction from './IBaseTransaction'; interface IAssetCreateTransaction extends IBaseTransaction { diff --git a/src/extension/types/IAssetDestroyTransaction.ts b/src/extension/types/IAssetDestroyTransaction.ts index a2b9f61d..49769cd9 100644 --- a/src/extension/types/IAssetDestroyTransaction.ts +++ b/src/extension/types/IAssetDestroyTransaction.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import IBaseTransaction from './IBaseTransaction'; interface IAssetDestroyTransaction extends IBaseTransaction { diff --git a/src/extension/types/IAssetFreezeTransaction.ts b/src/extension/types/IAssetFreezeTransaction.ts index 7ede62d0..95ceff14 100644 --- a/src/extension/types/IAssetFreezeTransaction.ts +++ b/src/extension/types/IAssetFreezeTransaction.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import IBaseAssetFreezeTransaction from './IBaseAssetFreezeTransaction'; interface IAssetFreezeTransaction extends IBaseAssetFreezeTransaction { diff --git a/src/extension/types/IAssetTransferTransaction.ts b/src/extension/types/IAssetTransferTransaction.ts index df476717..73aacbda 100644 --- a/src/extension/types/IAssetTransferTransaction.ts +++ b/src/extension/types/IAssetTransferTransaction.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import IBaseTransaction from './IBaseTransaction'; interface IAssetTransferTransaction extends IBaseTransaction { diff --git a/src/extension/types/IAssetUnfreezeTransaction.ts b/src/extension/types/IAssetUnfreezeTransaction.ts index 7ac956ab..9aeff88a 100644 --- a/src/extension/types/IAssetUnfreezeTransaction.ts +++ b/src/extension/types/IAssetUnfreezeTransaction.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import IBaseAssetFreezeTransaction from './IBaseAssetFreezeTransaction'; interface IAssetUnfreezeTransaction extends IBaseAssetFreezeTransaction { diff --git a/src/extension/types/IBaseAssetFreezeTransaction.ts b/src/extension/types/IBaseAssetFreezeTransaction.ts index 760ae23e..82b249a7 100644 --- a/src/extension/types/IBaseAssetFreezeTransaction.ts +++ b/src/extension/types/IBaseAssetFreezeTransaction.ts @@ -1,4 +1,4 @@ -// Types +// types import IBaseTransaction from './IBaseTransaction'; interface IBaseAssetFreezeTransaction extends IBaseTransaction { diff --git a/src/extension/types/IBaseRootState.ts b/src/extension/types/IBaseRootState.ts index f0cee20e..582738bc 100644 --- a/src/extension/types/IBaseRootState.ts +++ b/src/extension/types/IBaseRootState.ts @@ -1,4 +1,4 @@ -// Features +// features import { ISystemState } from '@extension/features/system'; interface IBaseRootState { diff --git a/src/extension/types/IDecodedJwt.ts b/src/extension/types/IDecodedJwt.ts index f14cc5a5..bab1c691 100644 --- a/src/extension/types/IDecodedJwt.ts +++ b/src/extension/types/IDecodedJwt.ts @@ -1,4 +1,4 @@ -// Types +// types import IDecodedJwtHeader from './IDecodedJwtHeader'; import IDecodedJwtPayload from './IDecodedJwtPayload'; diff --git a/src/extension/types/IEnableRequest.ts b/src/extension/types/IEnableRequest.ts index 78ded98b..458e3d96 100644 --- a/src/extension/types/IEnableRequest.ts +++ b/src/extension/types/IEnableRequest.ts @@ -1,4 +1,4 @@ -// Types +// types import IBaseRequest from './IBaseRequest'; import INetwork from './INetwork'; diff --git a/src/extension/types/IKeyRegistrationOfflineTransaction.ts b/src/extension/types/IKeyRegistrationOfflineTransaction.ts index ada1004b..7d01e9fe 100644 --- a/src/extension/types/IKeyRegistrationOfflineTransaction.ts +++ b/src/extension/types/IKeyRegistrationOfflineTransaction.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import IBaseTransaction from './IBaseTransaction'; interface IKeyRegistrationOfflineTransaction extends IBaseTransaction { diff --git a/src/extension/types/IKeyRegistrationOnlineTransaction.ts b/src/extension/types/IKeyRegistrationOnlineTransaction.ts index c4eb8e2b..b53966dd 100644 --- a/src/extension/types/IKeyRegistrationOnlineTransaction.ts +++ b/src/extension/types/IKeyRegistrationOnlineTransaction.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import IBaseTransaction from './IBaseTransaction'; interface IKeyRegistrationOnlineTransaction extends IBaseTransaction { diff --git a/src/extension/types/IMainRootState.ts b/src/extension/types/IMainRootState.ts index a727ed8b..94268b3b 100644 --- a/src/extension/types/IMainRootState.ts +++ b/src/extension/types/IMainRootState.ts @@ -1,4 +1,4 @@ -// Features +// features import { IAccountsState } from '@extension/features/accounts'; import { IAssetsState } from '@extension/features/assets'; import { IMessagesState } from '@extension/features/messages'; @@ -7,7 +7,7 @@ import { ISessionsState } from '@extension/features/sessions'; import { ISettingsState } from '@extension/features/settings'; import { ITransactionsState } from '@extension/features/transactions'; -// Types +// types import IBaseRootState from './IBaseRootState'; interface IMainRootState extends IBaseRootState { diff --git a/src/extension/types/INetwork.ts b/src/extension/types/INetwork.ts index dc014ec4..8e1b19ee 100644 --- a/src/extension/types/INetwork.ts +++ b/src/extension/types/INetwork.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { NetworkTypeEnum } from '../enums'; -// Types +// types import IChainNamespace from './IChainNamespace'; import IExplorer from './IExplorer'; import INativeCurrency from './INativeCurrency'; diff --git a/src/extension/types/IPaymentTransaction.ts b/src/extension/types/IPaymentTransaction.ts index 1b213f2a..f248122a 100644 --- a/src/extension/types/IPaymentTransaction.ts +++ b/src/extension/types/IPaymentTransaction.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import IBaseTransaction from './IBaseTransaction'; interface IPaymentTransaction extends IBaseTransaction { diff --git a/src/extension/types/IRegistrationRootState.ts b/src/extension/types/IRegistrationRootState.ts index 05f7babb..a9bb28ee 100644 --- a/src/extension/types/IRegistrationRootState.ts +++ b/src/extension/types/IRegistrationRootState.ts @@ -1,9 +1,9 @@ -// Features +// features import { INetworksState } from '../features/networks'; import { ISettingsState } from '../features/settings'; import { IRegistrationState } from '../features/registration'; -// Types +// types import IBaseRootState from './IBaseRootState'; interface IRegistrationRootState extends IBaseRootState { diff --git a/src/extension/types/ISettings.ts b/src/extension/types/ISettings.ts index 08c07e95..7f2517ee 100644 --- a/src/extension/types/ISettings.ts +++ b/src/extension/types/ISettings.ts @@ -1,4 +1,4 @@ -// Types +// types import IAdvancedSettings from './IAdvancedSettings'; import IAppearanceSettings from './IAppearanceSettings'; import IGeneralSettings from './IGeneralSettings'; diff --git a/src/extension/types/ISignBytesRequest.ts b/src/extension/types/ISignBytesRequest.ts index 3c957acf..c178e4c9 100644 --- a/src/extension/types/ISignBytesRequest.ts +++ b/src/extension/types/ISignBytesRequest.ts @@ -1,4 +1,4 @@ -// Types +// types import IBaseRequest from './IBaseRequest'; interface ISignBytesRequest extends IBaseRequest { diff --git a/src/extension/types/ISignTxnsRequest.ts b/src/extension/types/ISignTxnsRequest.ts index ce9c34c5..d568a6f6 100644 --- a/src/extension/types/ISignTxnsRequest.ts +++ b/src/extension/types/ISignTxnsRequest.ts @@ -1,6 +1,6 @@ import { IWalletTransaction } from '@agoralabs-sh/algorand-provider'; -// Types +// types import IBaseRequest from './IBaseRequest'; import INetwork from './INetwork'; diff --git a/src/extension/types/IStorageItemTypes.ts b/src/extension/types/IStorageItemTypes.ts index 84d9b276..eb35386d 100644 --- a/src/extension/types/IStorageItemTypes.ts +++ b/src/extension/types/IStorageItemTypes.ts @@ -1,4 +1,4 @@ -// Types +// types import IAccount from './IAccount'; import IAdvancedSettings from './IAdvancedSettings'; import IAppearanceSettings from './IAppearanceSettings'; diff --git a/src/extension/types/ITransactions.ts b/src/extension/types/ITransactions.ts index 6be7ece6..3aa14f28 100644 --- a/src/extension/types/ITransactions.ts +++ b/src/extension/types/ITransactions.ts @@ -1,4 +1,4 @@ -// Types +// types import IAssetConfigTransaction from './IAssetConfigTransaction'; import IAssetCreateTransaction from './IAssetCreateTransaction'; import IAssetDestroyTransaction from './IAssetDestroyTransaction'; diff --git a/src/extension/types/IUnknownTransaction.ts b/src/extension/types/IUnknownTransaction.ts index 06ba2cca..a34ff0d7 100644 --- a/src/extension/types/IUnknownTransaction.ts +++ b/src/extension/types/IUnknownTransaction.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import IBaseTransaction from './IBaseTransaction'; interface IUnknownTransaction extends IBaseTransaction { diff --git a/src/extension/utils/bootstrapApp.ts b/src/extension/utils/bootstrapApp.ts index c2acc190..9d4fd561 100644 --- a/src/extension/utils/bootstrapApp.ts +++ b/src/extension/utils/bootstrapApp.ts @@ -3,16 +3,16 @@ import { createElement, FC } from 'react'; import { createRoot, Root } from 'react-dom/client'; import { initReactI18next } from 'react-i18next'; -// Constants +// constants import { SETTINGS_APPEARANCE_KEY } from '@extension/constants'; -// Services +// services import { StorageManager } from '@extension/services'; -// Translations +// translations import { en } from '@extension/translations'; -// Types +// types import { IAppearanceSettings, IAppProps } from '@extension/types'; export default function bootstrapApp(app: FC): () => Promise { diff --git a/src/extension/utils/createIconFromDataUri.test.tsx b/src/extension/utils/createIconFromDataUri.test.tsx index 1300945c..a2b5ce71 100644 --- a/src/extension/utils/createIconFromDataUri.test.tsx +++ b/src/extension/utils/createIconFromDataUri.test.tsx @@ -1,7 +1,7 @@ import { IconProps } from '@chakra-ui/react'; import React, { ReactNode } from 'react'; -// Utils +// utils import createIconFromDataUri from './createIconFromDataUri'; interface ITestParams { diff --git a/src/extension/utils/decodeJwt.ts b/src/extension/utils/decodeJwt.ts index 71c31219..4d7855b1 100644 --- a/src/extension/utils/decodeJwt.ts +++ b/src/extension/utils/decodeJwt.ts @@ -1,6 +1,6 @@ import { decodeURLSafe as decodeBase64Url } from '@stablelib/base64'; -// Types +// types import { IDecodedJwt, IDecodedJwtHeader, diff --git a/src/extension/utils/fetchAssetList.ts b/src/extension/utils/fetchAssetList.ts index c91f07f6..ad98365f 100644 --- a/src/extension/utils/fetchAssetList.ts +++ b/src/extension/utils/fetchAssetList.ts @@ -1,7 +1,7 @@ -// Constants +// constants import { TINYMAN_ASA_LIST_API_URL } from '@extension/constants'; -// Types +// types import { IBaseOptions, ILogger } from '@common/types'; import { ITinyManAssetResponse } from '@extension/types'; diff --git a/src/extension/utils/fetchAssetVerification.ts b/src/extension/utils/fetchAssetVerification.ts index 4e0cd485..a6a68014 100644 --- a/src/extension/utils/fetchAssetVerification.ts +++ b/src/extension/utils/fetchAssetVerification.ts @@ -1,11 +1,11 @@ -// Constants +// constants import { VESTIGE_FI_API_URL } from '@extension/constants'; -// Types +// types import { IBaseOptions, ILogger } from '@common/types'; import { IVestigeFiAssetResponse } from '@extension/types'; -// Utils +// utils import fetchWithDelay from './fetchWithDelay'; interface IOptions extends IBaseOptions { diff --git a/src/extension/utils/getAddressFromPrivateKey.ts b/src/extension/utils/getAddressFromPrivateKey.ts index b816e3af..fc0a8dca 100644 --- a/src/extension/utils/getAddressFromPrivateKey.ts +++ b/src/extension/utils/getAddressFromPrivateKey.ts @@ -1,7 +1,7 @@ import { encodeAddress } from 'algosdk'; import { sign } from 'tweetnacl'; -// Types +// types import { IBaseOptions } from '@common/types'; /** diff --git a/src/extension/utils/getAuthorizedAddressesForHost.ts b/src/extension/utils/getAuthorizedAddressesForHost.ts index 521fe704..128166d6 100644 --- a/src/extension/utils/getAuthorizedAddressesForHost.ts +++ b/src/extension/utils/getAuthorizedAddressesForHost.ts @@ -1,4 +1,4 @@ -// Types +// types import { ISession } from '@extension/types'; /** diff --git a/src/extension/utils/isAccountKnown.ts b/src/extension/utils/isAccountKnown.ts index 2183bf81..0f378d2b 100644 --- a/src/extension/utils/isAccountKnown.ts +++ b/src/extension/utils/isAccountKnown.ts @@ -1,7 +1,7 @@ -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { IAccount } from '@extension/types'; export default function isAccountKnown( diff --git a/src/extension/utils/makeStore.ts b/src/extension/utils/makeStore.ts index bbf0f594..b4e0f269 100644 --- a/src/extension/utils/makeStore.ts +++ b/src/extension/utils/makeStore.ts @@ -1,6 +1,6 @@ import { configureStore, Store, Reducer } from '@reduxjs/toolkit'; -// Features +// features import { setConfirm, setError, @@ -9,7 +9,7 @@ import { } from '@extension/features/system'; import { initializeWalletConnectThunk } from '@extension/features/sessions'; -// Types +// types import { IBaseRootState } from '@extension/types'; export default function makeStore( diff --git a/src/extension/utils/mapAddressToWalletAccount.ts b/src/extension/utils/mapAddressToWalletAccount.ts index 8c25747e..337485d5 100644 --- a/src/extension/utils/mapAddressToWalletAccount.ts +++ b/src/extension/utils/mapAddressToWalletAccount.ts @@ -1,9 +1,9 @@ import { IWalletAccount } from '@agoralabs-sh/algorand-provider'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { IAccount, IAccountInformation, INetwork } from '@extension/types'; interface IOptions { diff --git a/src/extension/utils/mapAlgorandAccountInformationToAccount.ts b/src/extension/utils/mapAlgorandAccountInformationToAccount.ts index f2aafbb9..b76e879b 100644 --- a/src/extension/utils/mapAlgorandAccountInformationToAccount.ts +++ b/src/extension/utils/mapAlgorandAccountInformationToAccount.ts @@ -1,6 +1,6 @@ import { BigNumber } from 'bignumber.js'; -// Types +// types import { IAccountInformation, IAlgorandAccountInformation, diff --git a/src/extension/utils/mapAlgorandTransactionToTransaction/mapAlgorandTransactionToTransaction.ts b/src/extension/utils/mapAlgorandTransactionToTransaction/mapAlgorandTransactionToTransaction.ts index 273437c7..d6e1204a 100644 --- a/src/extension/utils/mapAlgorandTransactionToTransaction/mapAlgorandTransactionToTransaction.ts +++ b/src/extension/utils/mapAlgorandTransactionToTransaction/mapAlgorandTransactionToTransaction.ts @@ -2,17 +2,17 @@ import { decode as decodeBase64 } from '@stablelib/base64'; import { decode as decodeUtf8 } from '@stablelib/utf8'; import { BigNumber } from 'bignumber.js'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import { IAlgorandTransaction, IBaseTransaction, ITransactions, } from '@extension/types'; -// Utils +// utils import parseApplicationTransaction from './parseApplicationTransaction'; import parseAssetConfigTransaction from './parseAssetConfigTransaction'; import parseAssetFreezeTransaction from './parseAssetFreezeTransaction'; diff --git a/src/extension/utils/mapAlgorandTransactionToTransaction/parseApplicationTransaction.ts b/src/extension/utils/mapAlgorandTransactionToTransaction/parseApplicationTransaction.ts index 3391d348..a397590f 100644 --- a/src/extension/utils/mapAlgorandTransactionToTransaction/parseApplicationTransaction.ts +++ b/src/extension/utils/mapAlgorandTransactionToTransaction/parseApplicationTransaction.ts @@ -1,9 +1,9 @@ import { BigNumber } from 'bignumber.js'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import { IAlgorandApplicationTransaction, IAlgorandTransaction, @@ -12,7 +12,7 @@ import { IBaseTransaction, } from '@extension/types'; -// Utils +// utils import mapAlgorandTransactionToTransaction from './mapAlgorandTransactionToTransaction'; export default function parseApplicationTransaction( diff --git a/src/extension/utils/mapAlgorandTransactionToTransaction/parseAssetConfigTransaction.ts b/src/extension/utils/mapAlgorandTransactionToTransaction/parseAssetConfigTransaction.ts index 91e4f5bc..3bf704e3 100644 --- a/src/extension/utils/mapAlgorandTransactionToTransaction/parseAssetConfigTransaction.ts +++ b/src/extension/utils/mapAlgorandTransactionToTransaction/parseAssetConfigTransaction.ts @@ -1,9 +1,9 @@ import { BigNumber } from 'bignumber.js'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import { IAlgorandAssetConfigTransaction, IAssetConfigTransaction, diff --git a/src/extension/utils/mapAlgorandTransactionToTransaction/parseAssetFreezeTransaction.ts b/src/extension/utils/mapAlgorandTransactionToTransaction/parseAssetFreezeTransaction.ts index d847993e..9dc251f7 100644 --- a/src/extension/utils/mapAlgorandTransactionToTransaction/parseAssetFreezeTransaction.ts +++ b/src/extension/utils/mapAlgorandTransactionToTransaction/parseAssetFreezeTransaction.ts @@ -1,9 +1,9 @@ import { BigNumber } from 'bignumber.js'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import { IAlgorandAssetFreezeTransaction, IAssetFreezeTransaction, diff --git a/src/extension/utils/mapAlgorandTransactionToTransaction/parseAssetTransferTransaction.ts b/src/extension/utils/mapAlgorandTransactionToTransaction/parseAssetTransferTransaction.ts index 3b3b145d..ef1b3ab0 100644 --- a/src/extension/utils/mapAlgorandTransactionToTransaction/parseAssetTransferTransaction.ts +++ b/src/extension/utils/mapAlgorandTransactionToTransaction/parseAssetTransferTransaction.ts @@ -1,9 +1,9 @@ import { BigNumber } from 'bignumber.js'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import { IBaseTransaction, IAlgorandAssetTransferTransaction, diff --git a/src/extension/utils/mapAlgorandTransactionToTransaction/parseKeyRegistrationTransaction.ts b/src/extension/utils/mapAlgorandTransactionToTransaction/parseKeyRegistrationTransaction.ts index 4e15d0ec..64256a4d 100644 --- a/src/extension/utils/mapAlgorandTransactionToTransaction/parseKeyRegistrationTransaction.ts +++ b/src/extension/utils/mapAlgorandTransactionToTransaction/parseKeyRegistrationTransaction.ts @@ -1,9 +1,9 @@ import { BigNumber } from 'bignumber.js'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import { IAlgorandKeyRegistrationTransaction, IBaseTransaction, diff --git a/src/extension/utils/mapAlgorandTransactionToTransaction/parsePaymentTransaction.ts b/src/extension/utils/mapAlgorandTransactionToTransaction/parsePaymentTransaction.ts index a8454b24..ea73cd69 100644 --- a/src/extension/utils/mapAlgorandTransactionToTransaction/parsePaymentTransaction.ts +++ b/src/extension/utils/mapAlgorandTransactionToTransaction/parsePaymentTransaction.ts @@ -1,9 +1,9 @@ import { BigNumber } from 'bignumber.js'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Types +// types import { IBaseTransaction, IAlgorandPaymentTransaction, diff --git a/src/extension/utils/mapAssetFromAlgorandAsset.ts b/src/extension/utils/mapAssetFromAlgorandAsset.ts index abf1426b..3a3cb4df 100644 --- a/src/extension/utils/mapAssetFromAlgorandAsset.ts +++ b/src/extension/utils/mapAssetFromAlgorandAsset.ts @@ -1,6 +1,6 @@ import { BigNumber } from 'bignumber.js'; -// Types +// types import { IAlgorandAsset, IAsset } from '@extension/types'; export default function mapAssetFromAlgorandAsset( diff --git a/src/extension/utils/mapSessionFromEnableRequest.ts b/src/extension/utils/mapSessionFromEnableRequest.ts index 44a3b142..2535e11a 100644 --- a/src/extension/utils/mapSessionFromEnableRequest.ts +++ b/src/extension/utils/mapSessionFromEnableRequest.ts @@ -1,6 +1,6 @@ import { v4 as uuid } from 'uuid'; -// Types +// types import { IEnableRequest, ISession } from '@extension/types'; export default function mapSessionFromEnableRequest({ diff --git a/src/extension/utils/mapSessionFromWalletConnectSession.ts b/src/extension/utils/mapSessionFromWalletConnectSession.ts index e9f72162..501ff123 100644 --- a/src/extension/utils/mapSessionFromWalletConnectSession.ts +++ b/src/extension/utils/mapSessionFromWalletConnectSession.ts @@ -1,7 +1,7 @@ import { SessionTypes } from '@walletconnect/types'; import { v4 as uuid } from 'uuid'; -// Types +// types import { INetwork, ISession } from '@extension/types'; interface IOptions { diff --git a/src/extension/utils/parseTransactionType.ts b/src/extension/utils/parseTransactionType.ts index 1c531b45..48995487 100644 --- a/src/extension/utils/parseTransactionType.ts +++ b/src/extension/utils/parseTransactionType.ts @@ -1,13 +1,13 @@ import { encode as encodeHex } from '@stablelib/hex'; import { EncodedTransaction, OnApplicationComplete } from 'algosdk'; -// Enums +// enums import { TransactionTypeEnum } from '@extension/enums'; -// Services +// servcies import { AccountService } from '@extension/services'; -// Types +// types import { IAccount, IAccountInformation, INetwork } from '@extension/types'; interface IOptions { diff --git a/src/extension/utils/selectDefaultNetwork.ts b/src/extension/utils/selectDefaultNetwork.ts index a2ab1c46..61214e88 100644 --- a/src/extension/utils/selectDefaultNetwork.ts +++ b/src/extension/utils/selectDefaultNetwork.ts @@ -1,7 +1,7 @@ -// Enums +// enums import { NetworkTypeEnum } from '@extension/enums'; -// Types +// types import { INetwork } from '@extension/types'; /** diff --git a/src/extension/utils/verifyTransactionGroupId.test.tsx b/src/extension/utils/verifyTransactionGroupId.test.tsx index 54bfc44f..0a56033b 100644 --- a/src/extension/utils/verifyTransactionGroupId.test.tsx +++ b/src/extension/utils/verifyTransactionGroupId.test.tsx @@ -11,7 +11,7 @@ import { Transaction, } from 'algosdk'; -// Utils +// utils import verifyTransactionGroupId from './verifyTransactionGroupId'; describe(`${verifyTransactionGroupId.name}()`, () => { diff --git a/src/extension/utils/verifyTransactionGroupId.ts b/src/extension/utils/verifyTransactionGroupId.ts index 767bb1fb..9a41199c 100644 --- a/src/extension/utils/verifyTransactionGroupId.ts +++ b/src/extension/utils/verifyTransactionGroupId.ts @@ -1,7 +1,7 @@ import { Transaction } from 'algosdk'; import { encode as encodeBase64 } from '@stablelib/base64'; -// Utils +// utils import { computeGroupId } from '@common/utils'; /** diff --git a/src/external/services/KibisisWalletManager.ts b/src/external/services/KibisisWalletManager.ts index 5f778741..c117407b 100644 --- a/src/external/services/KibisisWalletManager.ts +++ b/src/external/services/KibisisWalletManager.ts @@ -17,16 +17,16 @@ import { encode as encodeBase64, } from '@stablelib/base64'; -// Constants +// constants import { EXTERNAL_MESSAGE_REQUEST_TIMEOUT, WALLET_ID, } from '@external/constants'; -// Enums +// enums import { EventNameEnum } from '@common/enums'; -// Events +// events import { BaseEvent, ExternalEnableRequestEvent, @@ -34,7 +34,7 @@ import { ExternalSignTxnsRequestEvent, } from '@common/events'; -// Types +// types import type { IBaseOptions, IBaseSignBytesResponsePayload, @@ -42,25 +42,20 @@ import type { ILogger, } from '@common/types'; -// Utils +// utils import { mapSerializableErrors } from '@common/utils'; type IResults = IBaseSignBytesResponsePayload | IEnableResult | ISignTxnsResult; -interface INewOptions extends IBaseOptions { - extensionId: string; -} - export default class KibisisWalletManager extends BaseWalletManager { private readonly extensionId: string; private readonly logger: ILogger | null; - constructor({ extensionId, logger }: INewOptions) { + constructor({ logger }: IBaseOptions) { super({ id: WALLET_ID, }); - this.extensionId = extensionId; this.logger = logger || null; } @@ -73,6 +68,8 @@ export default class KibisisWalletManager extends BaseWalletManager { responseEvent?: string, timeout?: number ): Promise { + const _functionName: string = 'handleEvent'; + return new Promise((resolve, reject) => { const controller: AbortController = new AbortController(); let eventListener: (event: MessageEvent) => void; @@ -80,7 +77,7 @@ export default class KibisisWalletManager extends BaseWalletManager { this.logger && this.logger.debug( - `${KibisisWalletManager.name}#handleEvent(): handling event "${message.event}"` + `${KibisisWalletManager.name}#${_functionName}(): handling event "${message.event}"` ); eventListener = (event: MessageEvent) => { @@ -94,7 +91,7 @@ export default class KibisisWalletManager extends BaseWalletManager { this.logger && this.logger.debug( - `${KibisisWalletManager.name}#handleEvent(): handling response event "${event.data.event}"` + `${KibisisWalletManager.name}#${_functionName}(): handling response event "${event.data.event}"` ); // clear the timer, we can handle it from here @@ -135,7 +132,7 @@ export default class KibisisWalletManager extends BaseWalletManager { timer = window.setTimeout(() => { this.logger && this.logger.debug( - `${KibisisWalletManager.name}#handleEvent(): event "${message.event}" timed out` + `${KibisisWalletManager.name}#${_functionName}(): event "${message.event}" timed out` ); window.removeEventListener('message', eventListener); diff --git a/src/manifest.chrome.json b/src/manifest.chrome.json new file mode 100644 index 00000000..8d85ff0c --- /dev/null +++ b/src/manifest.chrome.json @@ -0,0 +1,17 @@ +{ + "manifest_version": 3, + "permissions": ["downloads", "storage"], + "host_permissions": [""], + "action": { + "default_title": "Kibisis" + }, + "background": { + "service_worker": "background.js" + }, + "web_accessible_resources": [ + { + "matches": [""], + "resources": ["wallet-initializer.js"] + } + ] +} diff --git a/src/manifest.common.json b/src/manifest.common.json new file mode 100644 index 00000000..cae3fdbc --- /dev/null +++ b/src/manifest.common.json @@ -0,0 +1,16 @@ +{ + "name": "Kibisis", + "version": "1.2.0", + "description": "An AVM wallet in your browser that goes beyond just DeFi.", + "author": "Agora Labs", + "icons": { + "48": "icons/icon-48.png", + "96": "icons/icon-96.png" + }, + "content_scripts": [ + { + "matches": [""], + "js": ["content-script.js"] + } + ] +} diff --git a/src/manifest.firefox.json b/src/manifest.firefox.json new file mode 100644 index 00000000..0f5e10a6 --- /dev/null +++ b/src/manifest.firefox.json @@ -0,0 +1,17 @@ +{ + "manifest_version": 2, + "permissions": ["", "downloads", "storage"], + "browser_action": { + "default_title": "Kibisis" + }, + "browser_specific_settings": { + "gecko": { + "id": "kibisis@kibis.is" + } + }, + "background": { + "scripts": ["background.js"], + "persistent": true + }, + "web_accessible_resources": ["wallet-initializer.js"] +} diff --git a/src/manifest.json b/src/manifest.json deleted file mode 100644 index d9a2b2c2..00000000 --- a/src/manifest.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "manifest_version": 2, - "name": "Kibisis", - "version": "1.2.0", - "description": "An Algorand wallet browser extension to sign data, send transactions and rekey with another account.", - "icons": { - "48": "icons/icon-48.png", - "96": "icons/icon-96.png" - }, - "permissions": [ - "*://developer.mozilla.org/*", - "*://*.algoexplorerapi.io/*", - "*://algosigner.api.purestake.io/*", - "*://*.algonode.cloud/*", - "*://*.algorpc.pro/*", - "", - "downloads", - "storage" - ], - "browser_specific_settings": { - "gecko": { - "id": "kibisis@kibis.is" - } - }, - "browser_action": { - "default_title": "Kibisis" - }, - "background": { - "scripts": [ - "background.js" - ], - "persistent": true - }, - "content_scripts": [ - { - "matches": [ - "" - ], - "js": [ - "content-script.js" - ] - } - ], - "web_accessible_resources": [ - "wallet-initializer.js" - ] -} diff --git a/src/wallet-initializer.ts b/src/wallet-initializer.ts index 4b9d8367..62489317 100644 --- a/src/wallet-initializer.ts +++ b/src/wallet-initializer.ts @@ -1,13 +1,13 @@ import { AlgorandProvider } from '@agoralabs-sh/algorand-provider'; -// Services +// services import { KibisisWalletManager } from '@external/services'; -// Types +// types import { ILogger } from '@common/types'; import { IWindow } from '@external/types'; -// Utils +// utils import { createLogger } from '@common/utils'; (() => { @@ -28,7 +28,6 @@ import { createLogger } from '@common/utils'; } walletManager = new KibisisWalletManager({ - extensionId: __EXTENSION_ID__, logger, }); diff --git a/test/setup.ts b/test/setup.ts index cda1355d..4743b0a7 100644 --- a/test/setup.ts +++ b/test/setup.ts @@ -1,11 +1,12 @@ import 'mockzilla-webextension'; import { TextDecoder, TextEncoder } from 'util'; +import { v4 as uuid } from 'uuid'; -import { version } from '../package.json'; -import { browser_specific_settings } from '../src/manifest.json'; +// config +import { name, version } from '../package.json'; -Object.defineProperty(global, '__EXTENSION_ID__', { - value: browser_specific_settings.gecko.id, +Object.defineProperty(global, '__APP_TITLE__', { + value: `${name}-test`, }); Object.defineProperty(global, '__ENV__', { value: 'test', @@ -13,6 +14,9 @@ Object.defineProperty(global, '__ENV__', { Object.defineProperty(global, '__VERSION__', { value: `${version}-test`, }); +Object.defineProperty(global, '__WALLET_CONNECT_PROJECT_ID__', { + value: uuid(), +}); Object.defineProperty(global, 'TextDecoder', { value: TextDecoder, }); diff --git a/web-ext-config.js b/web-ext-config.js deleted file mode 100644 index cf514cde..00000000 --- a/web-ext-config.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = { - // global options - artifactsDir: 'dist', - sourceDir: '.build', - - // build options - build: { - overwriteDest: true, - }, - - // run options - run: { - firefox: '.firefox/firefox', - }, -}; diff --git a/webpack/constants/Directories.ts b/webpack/constants/Directories.ts index f99e397a..4829f791 100644 --- a/webpack/constants/Directories.ts +++ b/webpack/constants/Directories.ts @@ -1,6 +1,13 @@ import { resolve } from 'path'; -export const BUILD_PATH: string = resolve(process.cwd(), '.build'); +export const CHROME_BUILD_PATH: string = resolve( + process.cwd(), + '.chrome_build' +); export const DAPP_BUILD_PATH: string = resolve(process.cwd(), '.dapp'); export const DAPP_SRC_PATH: string = resolve(process.cwd(), 'dapp'); +export const FIREFOX_BUILD_PATH: string = resolve( + process.cwd(), + '.firefox_build' +); export const SRC_PATH: string = resolve(process.cwd(), 'src'); diff --git a/webpack/constants/Environments.ts b/webpack/constants/Environments.ts deleted file mode 100644 index 6691fb47..00000000 --- a/webpack/constants/Environments.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const DAPP_ENVIRONMENT: string = 'dapp'; -export const DEVELOPMENT_ENVIRONMENT: string = 'development'; -export const PRODUCTION_ENVIRONMENT: string = 'production'; diff --git a/webpack/constants/Names.ts b/webpack/constants/Names.ts new file mode 100644 index 00000000..f585cf3b --- /dev/null +++ b/webpack/constants/Names.ts @@ -0,0 +1 @@ +export const DAPP_CONFIG_NAME: string = 'dapp'; diff --git a/webpack/constants/index.ts b/webpack/constants/index.ts index abbb7412..44ddf018 100644 --- a/webpack/constants/index.ts +++ b/webpack/constants/index.ts @@ -1,3 +1,3 @@ export * from './Directories'; -export * from './Environments'; +export * from './Names'; export * from './Titles'; diff --git a/webpack/enums/EnvironmentEnum.ts b/webpack/enums/EnvironmentEnum.ts new file mode 100644 index 00000000..450882c5 --- /dev/null +++ b/webpack/enums/EnvironmentEnum.ts @@ -0,0 +1,6 @@ +enum EnvironmentEnum { + Development = 'development', + Production = 'production', +} + +export default EnvironmentEnum; diff --git a/webpack/enums/index.ts b/webpack/enums/index.ts new file mode 100644 index 00000000..f1fa9c6c --- /dev/null +++ b/webpack/enums/index.ts @@ -0,0 +1 @@ +export { default as EnvironmentEnum } from './EnvironmentEnum'; diff --git a/webpack/plugins/ManifestBuilderPlugin/ManifestBuilderPlugin.ts b/webpack/plugins/ManifestBuilderPlugin/ManifestBuilderPlugin.ts new file mode 100644 index 00000000..0ba2103b --- /dev/null +++ b/webpack/plugins/ManifestBuilderPlugin/ManifestBuilderPlugin.ts @@ -0,0 +1,42 @@ +import { readFileSync } from 'fs'; +import { writeFile } from 'fs/promises'; +import { Compiler } from 'webpack'; + +// types +import { ICompilationHookFunction } from '../../types'; + +export default class ManifestBuilderPlugin { + private readonly manifestPaths: string[]; + private readonly pluginName: string = 'ManifestBuilderPlugin'; + + constructor(...manifestPaths: string[]) { + this.manifestPaths = manifestPaths || []; + } + + private afterEmit(compiler: Compiler): ICompilationHookFunction { + return async (): Promise => await this.run(compiler.outputPath); + } + + private async run(outputPath: string): Promise { + const manifest: Record = this.manifestPaths.reduce( + (acc, value) => { + const buffer: Buffer = readFileSync(value); + + return { + ...acc, + ...JSON.parse(buffer.toString()), + }; + }, + {} + ); + + await writeFile(`${outputPath}/manifest.json`, JSON.stringify(manifest)); + } + + public apply(compiler: Compiler): void { + compiler.hooks.afterEmit.tapPromise( + this.pluginName, + this.afterEmit(compiler) + ); + } +} diff --git a/webpack/plugins/ManifestBuilderPlugin/index.ts b/webpack/plugins/ManifestBuilderPlugin/index.ts new file mode 100644 index 00000000..7ea65b84 --- /dev/null +++ b/webpack/plugins/ManifestBuilderPlugin/index.ts @@ -0,0 +1 @@ +export { default } from './ManifestBuilderPlugin'; diff --git a/webpack/plugins/WebExtPlugin/WebExtPlugin.ts b/webpack/plugins/WebExtPlugin/WebExtPlugin.ts index e8f8d709..d0a3ad74 100644 --- a/webpack/plugins/WebExtPlugin/WebExtPlugin.ts +++ b/webpack/plugins/WebExtPlugin/WebExtPlugin.ts @@ -2,8 +2,9 @@ import { ChildProcess, spawn } from 'child_process'; import { resolve } from 'path'; import { Compiler } from 'webpack'; -// Types -import { ICompilationHookFunction, IOptions } from './types'; +// types +import { ICompilationHookFunction, ITargetType } from '../../types'; +import { IOptions } from './types'; export default class WebExtPlugin { private readonly browserConsole: boolean; @@ -11,6 +12,7 @@ export default class WebExtPlugin { private readonly persistState: boolean; private readonly pluginName: string = 'WebExtPlugin'; private readonly startUrls: string[]; + private readonly target: ITargetType; private webExtRunProcess: ChildProcess | null; constructor(options?: IOptions) { @@ -20,6 +22,7 @@ export default class WebExtPlugin { this.startUrls = options?.startUrls || [ 'http://info.cern.ch/hypertext/WWW/TheProject.html', ]; + this.target = options?.target || 'firefox'; this.webExtRunProcess = null; } @@ -32,14 +35,29 @@ export default class WebExtPlugin { } private run(sourceDir: string): void { + let targetFlag: string = `--target=firefox-desktop`; let runCommand: string[] = [ 'run', - '--no-config-discovery', // ignore the config file + `--chromium-profile=${resolve(process.cwd(), '.chrome_profile')}`, + `--chromium-binary=${resolve(process.cwd(), '.chrome', 'chrome')}`, + `--firefox=${resolve(process.cwd(), '.firefox', 'firefox')}`, + `--firefox-profile=${resolve(process.cwd(), '.firefox_profile')}`, + '--no-config-discovery', // ignore the config file at project root `--source-dir=${sourceDir}`, - `--firefox=${resolve(process.cwd(), '.firefox', 'firefox')}`, // use the installed version from the npm prepare script ...this.startUrls.map((value) => `--start-url=${value}`), ]; + switch (this.target) { + case 'chrome': + targetFlag = '--target=chromium'; + break; + case 'firefox': + default: + break; + } + + runCommand = [...runCommand, targetFlag]; + if (this.browserConsole) { runCommand = [...runCommand, '--browser-console']; } @@ -53,7 +71,6 @@ export default class WebExtPlugin { ...runCommand, '--keep-profile-changes', '--profile-create-if-missing', - `--firefox-profile=${resolve(process.cwd(), '.firefox_profile')}`, ]; } diff --git a/webpack/plugins/WebExtPlugin/constants/Profiles.ts b/webpack/plugins/WebExtPlugin/constants/Profiles.ts deleted file mode 100644 index 4b3729da..00000000 --- a/webpack/plugins/WebExtPlugin/constants/Profiles.ts +++ /dev/null @@ -1 +0,0 @@ -export const DEVELOPMENT_PROFILE: string = 'development'; diff --git a/webpack/plugins/WebExtPlugin/constants/index.ts b/webpack/plugins/WebExtPlugin/constants/index.ts deleted file mode 100644 index 227f2987..00000000 --- a/webpack/plugins/WebExtPlugin/constants/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './Profiles'; diff --git a/webpack/plugins/WebExtPlugin/index.ts b/webpack/plugins/WebExtPlugin/index.ts index 8b21024e..b4a44fc1 100644 --- a/webpack/plugins/WebExtPlugin/index.ts +++ b/webpack/plugins/WebExtPlugin/index.ts @@ -1 +1,2 @@ export { default } from './WebExtPlugin'; +export * from './types'; diff --git a/webpack/plugins/WebExtPlugin/types/IOptions.ts b/webpack/plugins/WebExtPlugin/types/IOptions.ts index 066acc21..f78f3a04 100644 --- a/webpack/plugins/WebExtPlugin/types/IOptions.ts +++ b/webpack/plugins/WebExtPlugin/types/IOptions.ts @@ -1,3 +1,6 @@ +// types +import { ITargetType } from '../../../types'; + /** * @property {boolean} browserConsole - [optional] opens the browser console. Defaults to `false`. * @property {boolean} devtools - [optional] opens the dev tools. Defaults to `false`. @@ -6,12 +9,14 @@ * @see {@link https://extensionworkshop.com/documentation/develop/getting-started-with-web-ext/#using-web-ext-section} * @property {string[]} startUrls - [optional] opens tabs to the at the specified URLs. Defaults to * [`http://info.cern.ch/hypertext/WWW/TheProject.html`]. + * @property {'chrome' | 'firefox'} target - [optional] target a specific browser. Defaults to 'firefox'. */ interface IOptions { browserConsole?: boolean; devtools?: boolean; persistState?: boolean; startUrls?: string[]; + target?: ITargetType; } export default IOptions; diff --git a/webpack/plugins/WebExtPlugin/types/index.ts b/webpack/plugins/WebExtPlugin/types/index.ts index 0e1adffe..68e70016 100644 --- a/webpack/plugins/WebExtPlugin/types/index.ts +++ b/webpack/plugins/WebExtPlugin/types/index.ts @@ -1,2 +1 @@ -export { default as ICompilationHookFunction } from './ICompilationHookFunction'; -export { default as IOptions } from './IOptions'; +export type { default as IOptions } from './IOptions'; diff --git a/webpack/plugins/WebExtPlugin/types/ICompilationHookFunction.ts b/webpack/types/ICompilationHookFunction.ts similarity index 100% rename from webpack/plugins/WebExtPlugin/types/ICompilationHookFunction.ts rename to webpack/types/ICompilationHookFunction.ts diff --git a/webpack/types/ITargetType.ts b/webpack/types/ITargetType.ts new file mode 100644 index 00000000..b4669aab --- /dev/null +++ b/webpack/types/ITargetType.ts @@ -0,0 +1,3 @@ +type ITargetType = 'chrome' | 'firefox'; + +export default ITargetType; diff --git a/webpack/types/IWebpackEnvironmentVariables.ts b/webpack/types/IWebpackEnvironmentVariables.ts new file mode 100644 index 00000000..7cd81355 --- /dev/null +++ b/webpack/types/IWebpackEnvironmentVariables.ts @@ -0,0 +1,10 @@ +// types +import ITargetType from './ITargetType'; + +interface IWebpackEnvironmentVariables { + WEBPACK_SERVE?: boolean; + WEBPACK_WATCH?: boolean; + target?: ITargetType; +} + +export default IWebpackEnvironmentVariables; diff --git a/webpack/types/index.ts b/webpack/types/index.ts new file mode 100644 index 00000000..2161f211 --- /dev/null +++ b/webpack/types/index.ts @@ -0,0 +1,3 @@ +export type { default as ICompilationHookFunction } from './ICompilationHookFunction'; +export type { default as ITargetType } from './ITargetType'; +export type { default as IWebpackEnvironmentVariables } from './IWebpackEnvironmentVariables'; diff --git a/webpack/utils/createCommonConfig.ts b/webpack/utils/createCommonConfig.ts new file mode 100644 index 00000000..e5a5b12d --- /dev/null +++ b/webpack/utils/createCommonConfig.ts @@ -0,0 +1,214 @@ +import CopyPlugin from 'copy-webpack-plugin'; +import HtmlWebpackPlugin from 'html-webpack-plugin'; +import { resolve } from 'path'; +import { Configuration } from 'webpack'; + +// constants +import { + APP_TITLE, + CHROME_BUILD_PATH, + FIREFOX_BUILD_PATH, + SRC_PATH, +} from '../constants'; + +// plugins +import ManifestBuilderPlugin from '../plugins/ManifestBuilderPlugin'; + +// types +import { ITargetType } from '../types'; + +interface IOptions { + target: ITargetType; +} + +/** + * Creates a common config. + * @param {IOptions} options - various options to alter the configuration. + * @returns {Configuration} a common configuration. + */ +export default function createCommonConfig({ + target, +}: IOptions): Configuration { + const commonPath: string = resolve(SRC_PATH, 'common'); + const extensionPath: string = resolve(SRC_PATH, 'extension'); + const externalPath: string = resolve(SRC_PATH, 'external'); + let buildPath: string = FIREFOX_BUILD_PATH; + + switch (target) { + case 'chrome': + buildPath = CHROME_BUILD_PATH; + break; + case 'firefox': + default: + break; + } + + return { + entry: { + // injected scripts + ['wallet-initializer']: resolve(SRC_PATH, 'wallet-initializer.ts'), + ['background']: resolve(SRC_PATH, 'background.ts'), + ['content-script']: resolve(SRC_PATH, 'content-script.ts'), + // extension apps + ['background-app']: resolve( + extensionPath, + 'apps', + 'background', + 'index.ts' + ), + ['main-app']: resolve(extensionPath, 'apps', 'main', 'index.ts'), + ['registration-app']: resolve( + extensionPath, + 'apps', + 'registration', + 'index.ts' + ), + }, + + module: { + rules: [ + { + loader: 'handlebars-loader', + test: /\.hbs$/, + }, + { + test: /\.(svg?.+|ttf?.+|woff?.+|woff2?.+)$/, + type: 'asset/resource', + generator: { + filename: 'assets/[hash][ext][query]', + }, + }, + ], + }, + + output: { + clean: true, + filename: '[name].js', + path: buildPath, + }, + + plugins: [ + //assets + new CopyPlugin({ + patterns: [ + { + from: resolve(SRC_PATH, 'documents'), + to: resolve(buildPath, 'documents'), + }, + { + from: resolve(SRC_PATH, 'icons'), + to: resolve(buildPath, 'icons'), + }, + ], + }), + new ManifestBuilderPlugin( + resolve(SRC_PATH, 'manifest.common.json'), + resolve(SRC_PATH, `manifest.${target}.json`) + ), + // htmls + new HtmlWebpackPlugin({ + chunks: ['background-app'], + filename: 'background-app.html', + inject: 'head', + template: resolve(SRC_PATH, 'index.hbs'), + title: APP_TITLE, + }), + new HtmlWebpackPlugin({ + chunks: ['main-app'], + filename: 'main-app.html', + inject: 'head', + template: resolve(SRC_PATH, 'index.hbs'), + title: APP_TITLE, + }), + new HtmlWebpackPlugin({ + chunks: ['registration-app'], + filename: 'registration-app.html', + inject: 'head', + template: resolve(SRC_PATH, 'index.hbs'), + title: APP_TITLE, + }), + ], + + resolve: { + alias: { + // common + ['@common/enums']: resolve(commonPath, 'enums'), + ['@common/errors']: resolve(commonPath, 'errors'), + ['@common/events']: resolve(commonPath, 'events'), + ['@common/types']: resolve(commonPath, 'types'), + ['@common/utils']: resolve(commonPath, 'utils'), + // extension + ['@extension/components']: resolve(extensionPath, 'components'), + ['@extension/config']: resolve(extensionPath, 'config'), + ['@extension/constants']: resolve(extensionPath, 'constants'), + ['@extension/enums']: resolve(extensionPath, 'enums'), + ['@extension/errors']: resolve(extensionPath, 'errors'), + ['@extension/features/accounts']: resolve( + extensionPath, + 'features', + 'accounts' + ), + ['@extension/features/assets']: resolve( + extensionPath, + 'features', + 'assets' + ), + ['@extension/features/messages']: resolve( + extensionPath, + 'features', + 'messages' + ), + ['@extension/features/networks']: resolve( + extensionPath, + 'features', + 'networks' + ), + ['@extension/features/registration']: resolve( + extensionPath, + 'features', + 'registration' + ), + ['@extension/features/sessions']: resolve( + extensionPath, + 'features', + 'sessions' + ), + ['@extension/features/settings']: resolve( + extensionPath, + 'features', + 'settings' + ), + ['@extension/features/system']: resolve( + extensionPath, + 'features', + 'system' + ), + ['@extension/features/transactions']: resolve( + extensionPath, + 'features', + 'transactions' + ), + ['@extension/fonts']: resolve(extensionPath, 'fonts'), + ['@extension/hooks']: resolve(extensionPath, 'hooks'), + ['@extension/pages']: resolve(extensionPath, 'pages'), + ['@extension/selectors']: resolve(extensionPath, 'selectors'), + ['@extension/services']: resolve(extensionPath, 'services'), + ['@extension/theme']: resolve(extensionPath, 'theme'), + ['@extension/translations']: resolve(extensionPath, 'translations'), + ['@extension/types']: resolve(extensionPath, 'types'), + ['@extension/utils']: resolve(extensionPath, 'utils'), + // external + ['@external/constants']: resolve(externalPath, 'constants'), + ['@external/services']: resolve(externalPath, 'services'), + ['@external/types']: resolve(externalPath, 'types'), + }, + + extensions: ['.js', '.ts', '.tsx'], + }, + + stats: { + assetsSpace: 100, + modules: false, + }, + }; +} diff --git a/webpack/utils/index.ts b/webpack/utils/index.ts new file mode 100644 index 00000000..02a1269e --- /dev/null +++ b/webpack/utils/index.ts @@ -0,0 +1 @@ +export { default as createCommonConfig } from './createCommonConfig'; diff --git a/webpack/webpack.common.config.ts b/webpack/webpack.common.config.ts deleted file mode 100644 index 299b1552..00000000 --- a/webpack/webpack.common.config.ts +++ /dev/null @@ -1,179 +0,0 @@ -import CopyPlugin from 'copy-webpack-plugin'; -import HtmlWebpackPlugin from 'html-webpack-plugin'; -import { resolve } from 'path'; -import { Configuration } from 'webpack'; - -// constants -import { APP_TITLE, BUILD_PATH, SRC_PATH } from './constants'; - -const COMMON_PATH: string = resolve(SRC_PATH, 'common'); -const EXTENSION_PATH: string = resolve(SRC_PATH, 'extension'); -const EXTERNAL_PATH: string = resolve(SRC_PATH, 'external'); -const config: Configuration = { - entry: { - // injected scripts - ['wallet-initializer']: resolve(SRC_PATH, 'wallet-initializer.ts'), - ['background']: resolve(SRC_PATH, 'background.ts'), - ['content-script']: resolve(SRC_PATH, 'content-script.ts'), - // extension apps - ['background-app']: resolve( - EXTENSION_PATH, - 'apps', - 'background', - 'index.ts' - ), - ['main-app']: resolve(EXTENSION_PATH, 'apps', 'main', 'index.ts'), - ['registration-app']: resolve( - EXTENSION_PATH, - 'apps', - 'registration', - 'index.ts' - ), - }, - - module: { - rules: [ - { - loader: 'handlebars-loader', - test: /\.hbs$/, - }, - { - test: /\.(svg?.+|ttf?.+|woff?.+|woff2?.+)$/, - type: 'asset/resource', - generator: { - filename: 'assets/[hash][ext][query]', - }, - }, - ], - }, - - output: { - clean: true, - filename: '[name].js', - path: BUILD_PATH, - }, - - plugins: [ - new CopyPlugin({ - patterns: [ - { - from: resolve(SRC_PATH, 'documents'), - to: resolve(BUILD_PATH, 'documents'), - }, - { - from: resolve(SRC_PATH, 'icons'), - to: resolve(BUILD_PATH, 'icons'), - }, - { - from: resolve(SRC_PATH, 'manifest.json'), - }, - ], - }), - /* htmls */ - new HtmlWebpackPlugin({ - chunks: ['background-app'], - filename: 'background-app.html', - inject: 'head', - template: resolve(SRC_PATH, 'index.hbs'), - title: APP_TITLE, - }), - new HtmlWebpackPlugin({ - chunks: ['main-app'], - filename: 'main-app.html', - inject: 'head', - template: resolve(SRC_PATH, 'index.hbs'), - title: APP_TITLE, - }), - new HtmlWebpackPlugin({ - chunks: ['registration-app'], - filename: 'registration-app.html', - inject: 'head', - template: resolve(SRC_PATH, 'index.hbs'), - title: APP_TITLE, - }), - ], - - resolve: { - alias: { - // common - ['@common/enums']: resolve(COMMON_PATH, 'enums'), - ['@common/errors']: resolve(COMMON_PATH, 'errors'), - ['@common/events']: resolve(COMMON_PATH, 'events'), - ['@common/types']: resolve(COMMON_PATH, 'types'), - ['@common/utils']: resolve(COMMON_PATH, 'utils'), - // extension - ['@extension/components']: resolve(EXTENSION_PATH, 'components'), - ['@extension/config']: resolve(EXTENSION_PATH, 'config'), - ['@extension/constants']: resolve(EXTENSION_PATH, 'constants'), - ['@extension/enums']: resolve(EXTENSION_PATH, 'enums'), - ['@extension/errors']: resolve(EXTENSION_PATH, 'errors'), - ['@extension/features/accounts']: resolve( - EXTENSION_PATH, - 'features', - 'accounts' - ), - ['@extension/features/assets']: resolve( - EXTENSION_PATH, - 'features', - 'assets' - ), - ['@extension/features/messages']: resolve( - EXTENSION_PATH, - 'features', - 'messages' - ), - ['@extension/features/networks']: resolve( - EXTENSION_PATH, - 'features', - 'networks' - ), - ['@extension/features/registration']: resolve( - EXTENSION_PATH, - 'features', - 'registration' - ), - ['@extension/features/sessions']: resolve( - EXTENSION_PATH, - 'features', - 'sessions' - ), - ['@extension/features/settings']: resolve( - EXTENSION_PATH, - 'features', - 'settings' - ), - ['@extension/features/system']: resolve( - EXTENSION_PATH, - 'features', - 'system' - ), - ['@extension/features/transactions']: resolve( - EXTENSION_PATH, - 'features', - 'transactions' - ), - ['@extension/fonts']: resolve(EXTENSION_PATH, 'fonts'), - ['@extension/hooks']: resolve(EXTENSION_PATH, 'hooks'), - ['@extension/pages']: resolve(EXTENSION_PATH, 'pages'), - ['@extension/selectors']: resolve(EXTENSION_PATH, 'selectors'), - ['@extension/services']: resolve(EXTENSION_PATH, 'services'), - ['@extension/theme']: resolve(EXTENSION_PATH, 'theme'), - ['@extension/translations']: resolve(EXTENSION_PATH, 'translations'), - ['@extension/types']: resolve(EXTENSION_PATH, 'types'), - ['@extension/utils']: resolve(EXTENSION_PATH, 'utils'), - // external - ['@external/constants']: resolve(EXTERNAL_PATH, 'constants'), - ['@external/services']: resolve(EXTERNAL_PATH, 'services'), - ['@external/types']: resolve(EXTERNAL_PATH, 'types'), - }, - - extensions: ['.js', '.ts', '.tsx'], - }, - - stats: { - assetsSpace: 100, - modules: false, - }, -}; - -export default config; diff --git a/webpack/webpack.config.ts b/webpack/webpack.config.ts index ace5c4cc..0057ed89 100644 --- a/webpack/webpack.config.ts +++ b/webpack/webpack.config.ts @@ -1,3 +1,4 @@ +import { config } from 'dotenv'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import { resolve } from 'path'; import { Configuration, DefinePlugin } from 'webpack'; @@ -6,189 +7,206 @@ import { merge } from 'webpack-merge'; // config import { version } from '../package.json'; -import { browser_specific_settings } from '../src/manifest.json'; -import commonConfig from './webpack.common.config'; + +// enums +import { EnvironmentEnum } from './enums'; // constants import { APP_TITLE, - DEVELOPMENT_ENVIRONMENT, - DAPP_ENVIRONMENT, + DAPP_CONFIG_NAME, DAPP_BUILD_PATH, DAPP_SRC_PATH, - PRODUCTION_ENVIRONMENT, } from './constants'; // plugins import WebExtPlugin from './plugins/WebExtPlugin'; +// types +import { IWebpackEnvironmentVariables } from './types'; + +// utils +import { createCommonConfig } from './utils'; + const dappPort: number = 8080; const maxSize: number = 4000000; // 4 MB -const configs: (Configuration | DevelopmentConfiguration)[] = [ - /** - * development - */ - merge(commonConfig, { - devtool: 'cheap-module-source-map', - mode: 'development', - module: { - rules: [ - { - exclude: /node_modules/, - test: /\.tsx?$/, - use: [ - { - loader: 'ts-loader', - options: { - configFile: resolve(process.cwd(), 'tsconfig.json'), - transpileOnly: true, - }, - }, - ], - }, - ], - }, - name: DEVELOPMENT_ENVIRONMENT, - optimization: { - removeAvailableModules: false, - removeEmptyChunks: false, - splitChunks: false, - }, - output: { - pathinfo: false, - }, - plugins: [ - new DefinePlugin({ - __EXTENSION_ID__: JSON.stringify(browser_specific_settings.gecko.id), - __APP_TITLE__: JSON.stringify(APP_TITLE), - __ENV__: JSON.stringify(DEVELOPMENT_ENVIRONMENT), - __VERSION__: JSON.stringify(version), - }), - new WebExtPlugin({ - devtools: true, - persistState: true, - startUrls: [`http://localhost:${dappPort}`], // navigate to the dapp - }), - ], - }), +const configs: ( + env: IWebpackEnvironmentVariables +) => (Configuration | DevelopmentConfiguration)[] = ({ + target = 'firefox', // default to firefox +}: IWebpackEnvironmentVariables) => { + let commonConfig: Configuration; - /** - * production - */ - merge(commonConfig, { - devtool: false, + config(); - mode: 'production', + commonConfig = createCommonConfig({ + target, + }); - module: { - rules: [ - { - exclude: /node_modules/, - test: /\.tsx?$/, - use: [ - { - loader: 'ts-loader', - options: { - configFile: resolve(process.cwd(), 'tsconfig.json'), + return [ + /** + * development + */ + merge(commonConfig, { + devtool: 'cheap-module-source-map', + mode: 'development', + module: { + rules: [ + { + exclude: /node_modules/, + test: /\.tsx?$/, + use: [ + { + loader: 'ts-loader', + options: { + configFile: resolve(process.cwd(), 'tsconfig.json'), + transpileOnly: true, + }, }, - }, - ], - }, + ], + }, + ], + }, + name: EnvironmentEnum.Development, + optimization: { + removeAvailableModules: false, + removeEmptyChunks: false, + splitChunks: false, + }, + output: { + pathinfo: false, + }, + plugins: [ + new DefinePlugin({ + __APP_TITLE__: JSON.stringify(APP_TITLE), + __ENV__: JSON.stringify(EnvironmentEnum.Development), + __VERSION__: JSON.stringify(version), + __WALLET_CONNECT_PROJECT_ID__: JSON.stringify( + process.env.WALLET_CONNECT_PROJECT_ID + ), + }), + new WebExtPlugin({ + devtools: true, + persistState: true, + startUrls: [`http://localhost:${dappPort}`], // navigate to the dapp + target, + }), ], - }, - - name: PRODUCTION_ENVIRONMENT, + }), - optimization: { - splitChunks: { - cacheGroups: { - vendor: { - chunks: 'all', - maxSize, - name: 'vendor', - reuseExistingChunk: true, - test: /[\\/]node_modules[\\/]/, + /** + * production + */ + merge(commonConfig, { + devtool: false, + mode: 'production', + module: { + rules: [ + { + exclude: /node_modules/, + test: /\.tsx?$/, + use: [ + { + loader: 'ts-loader', + options: { + configFile: resolve(process.cwd(), 'tsconfig.json'), + }, + }, + ], }, + ], + }, + name: EnvironmentEnum.Production, + optimization: { + splitChunks: { + cacheGroups: { + vendor: { + chunks: 'all', + maxSize, + name: 'vendor', + reuseExistingChunk: true, + test: /[\\/]node_modules[\\/]/, + }, + }, + }, + runtimeChunk: { + name: 'runtime', }, }, - - runtimeChunk: { - name: 'runtime', + performance: { + hints: 'warning', + maxAssetSize: maxSize, + maxEntrypointSize: 10000000, // 10 MB }, - }, - - performance: { - hints: 'warning', - maxAssetSize: maxSize, - maxEntrypointSize: 10000000, // 10 MB - }, - - plugins: [ - new DefinePlugin({ - __EXTENSION_ID__: JSON.stringify(browser_specific_settings.gecko.id), - __APP_TITLE__: JSON.stringify(APP_TITLE), - __ENV__: JSON.stringify(PRODUCTION_ENVIRONMENT), - __VERSION__: JSON.stringify(version), - }), - ], - }), + plugins: [ + new DefinePlugin({ + __APP_TITLE__: JSON.stringify(APP_TITLE), + __ENV__: JSON.stringify(EnvironmentEnum.Production), + __VERSION__: JSON.stringify(version), + __WALLET_CONNECT_PROJECT_ID__: JSON.stringify( + process.env.WALLET_CONNECT_PROJECT_ID + ), + }), + ], + }), - /** - * example dapp - */ - { - devtool: 'cheap-module-source-map', - devServer: { - port: dappPort, - watchFiles: [`${DAPP_SRC_PATH}/**/*`], - }, - entry: { - ['main']: resolve(DAPP_SRC_PATH, 'index.ts'), - }, - mode: 'development', - module: { - rules: [ - ...(commonConfig.module?.rules ? commonConfig.module.rules : []), - { - exclude: /node_modules/, - test: /\.tsx?$/, - use: [ - { - loader: 'ts-loader', - options: { - configFile: resolve(process.cwd(), 'tsconfig.json'), - transpileOnly: true, + /** + * example dapp + */ + { + devtool: 'cheap-module-source-map', + devServer: { + port: dappPort, + watchFiles: [`${DAPP_SRC_PATH}/**/*`], + }, + entry: { + ['main']: resolve(DAPP_SRC_PATH, 'index.ts'), + }, + mode: 'development', + module: { + rules: [ + ...(commonConfig.module?.rules ? commonConfig.module.rules : []), + { + exclude: /node_modules/, + test: /\.tsx?$/, + use: [ + { + loader: 'ts-loader', + options: { + configFile: resolve(process.cwd(), 'tsconfig.json'), + transpileOnly: true, + }, }, - }, - ], - }, + ], + }, + ], + }, + name: DAPP_CONFIG_NAME, + optimization: { + removeAvailableModules: false, + removeEmptyChunks: false, + splitChunks: false, + }, + output: { + clean: true, + filename: '[name].js', + path: DAPP_BUILD_PATH, + pathinfo: false, + }, + plugins: [ + new HtmlWebpackPlugin({ + chunks: ['main'], + favicon: resolve(DAPP_SRC_PATH, 'favicon.png'), + filename: 'index.html', + inject: 'body', + template: resolve(DAPP_SRC_PATH, 'index.hbs'), + title: `${APP_TITLE} DApp Example`, + }), ], + resolve: commonConfig.resolve, }, - name: DAPP_ENVIRONMENT, - optimization: { - removeAvailableModules: false, - removeEmptyChunks: false, - splitChunks: false, - }, - output: { - clean: true, - filename: '[name].js', - path: DAPP_BUILD_PATH, - pathinfo: false, - }, - plugins: [ - new HtmlWebpackPlugin({ - chunks: ['main'], - favicon: resolve(DAPP_SRC_PATH, 'favicon.png'), - filename: 'index.html', - inject: 'body', - template: resolve(DAPP_SRC_PATH, 'index.hbs'), - title: `${APP_TITLE} DApp Example`, - }), - ], - resolve: commonConfig.resolve, - }, -]; + ]; +}; export default configs; diff --git a/yarn.lock b/yarn.lock index e5eec249..df564053 100644 --- a/yarn.lock +++ b/yarn.lock @@ -294,14 +294,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.19.0" -"@babel/runtime@7.20.13": - version "7.20.13" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.13.tgz#7055ab8a7cff2b8f6058bf6ae45ff84ad2aded4b" - integrity sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA== - dependencies: - regenerator-runtime "^0.13.11" - -"@babel/runtime@^7.0.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.18.3", "@babel/runtime@^7.20.6", "@babel/runtime@^7.9.2": +"@babel/runtime@7.21.0", "@babel/runtime@^7.0.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.18.3", "@babel/runtime@^7.20.6", "@babel/runtime@^7.9.2": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.0.tgz#5b55c9d394e5fcf304909a8b00c07dc217b56673" integrity sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw== @@ -1568,21 +1561,6 @@ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== -"@eslint/eslintrc@^1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.1.tgz#af58772019a2d271b7e2d4c23ff4ddcba3ccfb3e" - integrity sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.4.0" - globals "^13.19.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - "@eslint/eslintrc@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.0.tgz#943309d8697c52fc82c076e90c1c74fbbe69dbff" @@ -1598,7 +1576,7 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/eslintrc@^2.1.3": +"@eslint/eslintrc@^2.1.2", "@eslint/eslintrc@^2.1.3": version "2.1.3" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.3.tgz#797470a75fe0fbd5a53350ee715e85e87baff22d" integrity sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA== @@ -1618,6 +1596,11 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.35.0.tgz#b7569632b0b788a0ca0e438235154e45d42813a7" integrity sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw== +"@eslint/js@8.48.0": + version "8.48.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.48.0.tgz#642633964e217905436033a2bd08bf322849b7fb" + integrity sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw== + "@eslint/js@8.53.0": version "8.53.0" resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.53.0.tgz#bea56f2ed2b5baea164348ff4d5a879f6f81f20d" @@ -1800,7 +1783,7 @@ resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== -"@humanwhocodes/config-array@^0.11.13": +"@humanwhocodes/config-array@^0.11.10", "@humanwhocodes/config-array@^0.11.13": version "0.11.13" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.13.tgz#075dc9684f40a531d9b26b0822153c1e832ee297" integrity sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ== @@ -2131,10 +2114,10 @@ dependencies: "@lit-labs/ssr-dom-shim" "^1.0.0" -"@mdn/browser-compat-data@5.2.29": - version "5.2.29" - resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-5.2.29.tgz#7f29e9a108aaf789600dd36e8442fe89ab41a815" - integrity sha512-bEBrkTWbDAs/PB4IdRg4CtU750oBRytXHK/wC2oIDkgKZqnt76nACSooQQuHF11mK5k43f/IgFUMO5t5quRPVA== +"@mdn/browser-compat-data@5.3.14": + version "5.3.14" + resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-5.3.14.tgz#ab35599e6fe350005c04c9c5fb7fd4ab70a892b9" + integrity sha512-Y9XQrphVcE6u9xMm+gIqN86opbU/5s2W1pdPyKRyFV5B7+2jWM2gLI5JpfhZncaoDKvhy6FYwK04aCz5UM/bTQ== "@mdn/browser-compat-data@5.3.29": version "5.3.29" @@ -3860,42 +3843,42 @@ add@^2.0.6: resolved "https://registry.yarnpkg.com/add/-/add-2.0.6.tgz#248f0a9f6e5a528ef2295dbeec30532130ae2235" integrity sha512-j5QzrmsokwWWp6kUcJQySpbG+xfOBqqKnup3OIk1pz+kB/80SLorZ9V8zHFLO92Lcd+hbvq8bT+zOGoPkmBV0Q== -addons-linter@5.27.0: - version "5.27.0" - resolved "https://registry.yarnpkg.com/addons-linter/-/addons-linter-5.27.0.tgz#23ecef4a274c41a96a89ad67cd038c9ab01e42e0" - integrity sha512-gDgl0FcmhZ5cs3St0qAaO9J1BoektwnY+p4dVgcvPu8WaBqH9MG2fk0gL/evCpoHSXeSw15GA87n8Y7zy7raVQ== +addons-linter@6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/addons-linter/-/addons-linter-6.13.0.tgz#c24016477bf154e2538a7ff906802a95b637f6ab" + integrity sha512-vYgDXl8aLmN1zU4HmsQdG6tUFByg499mHnTEMWDUbSkoYDq3koTne08EsqU6sD+o814u8FxclQP7580L0g/tPQ== dependencies: - "@mdn/browser-compat-data" "5.2.29" + "@fluent/syntax" "0.19.0" + "@mdn/browser-compat-data" "5.3.14" addons-moz-compare "1.3.0" - addons-scanner-utils "8.3.0" + addons-scanner-utils "9.3.0" ajv "8.12.0" chalk "4.1.2" cheerio "1.0.0-rc.12" columnify "1.6.0" common-tags "1.8.2" - deepmerge "4.2.2" - eslint "8.32.0" + deepmerge "4.3.1" + eslint "8.48.0" eslint-plugin-no-unsanitized "4.0.2" - eslint-visitor-keys "3.3.0" - espree "9.4.1" + eslint-visitor-keys "3.4.3" + espree "9.6.1" esprima "4.0.1" fast-json-patch "3.1.1" - fluent-syntax "0.14.0" - glob "8.1.0" + glob "10.3.4" image-size "1.0.2" is-mergeable-object "1.1.1" jed "1.1.1" json-merge-patch "1.0.2" os-locale "5.0.0" - pino "8.8.0" - postcss "8.4.21" + pino "8.15.0" + postcss "8.4.29" relaxed-json "1.0.3" - semver "7.3.8" + semver "7.5.4" sha.js "2.4.11" source-map-support "0.5.21" tosource "1.0.0" upath "2.0.1" - yargs "17.6.2" + yargs "17.7.2" yauzl "2.10.0" addons-linter@^6.17.0: @@ -3941,10 +3924,10 @@ addons-moz-compare@1.3.0: resolved "https://registry.yarnpkg.com/addons-moz-compare/-/addons-moz-compare-1.3.0.tgz#9074dce00291cef998c2fba6b462d041cc6b3e36" integrity sha512-/rXpQeaY0nOKhNx00pmZXdk5Mu+KhVlL3/pSBuAYwrxRrNiTvI/9xfQI8Lmm7DMMl+PDhtfAHY/0ibTpdeoQQQ== -addons-scanner-utils@8.3.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/addons-scanner-utils/-/addons-scanner-utils-8.3.0.tgz#2e2b5270bb207c6daf3796df1b40828cde6ccf7d" - integrity sha512-XP+2kxhZxlxiVFXVJ7lyJEuxpUS8ryrolUDqnUEnvOZ/3p8qt9hWCYSliXhI2W+Swf/hZ3F4CLAG6tBnqdxDYA== +addons-scanner-utils@9.3.0: + version "9.3.0" + resolved "https://registry.yarnpkg.com/addons-scanner-utils/-/addons-scanner-utils-9.3.0.tgz#6a2bfefaabb311f64e85090216e7618cbdc0055c" + integrity sha512-YZWzNpP+em650XlZNH7NbTUcHJXqC0ihLEgwn17GGTqervyChqQffd9sm/QXNur0dmj7Ks1mD77iTg9XcJw64A== dependencies: "@types/yauzl" "2.10.0" common-tags "1.8.2" @@ -5214,10 +5197,10 @@ copy-webpack-plugin@^11.0.0: schema-utils "^4.0.0" serialize-javascript "^6.0.0" -core-js@3.27.1: - version "3.27.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.27.1.tgz#23cc909b315a6bb4e418bf40a52758af2103ba46" - integrity sha512-GutwJLBChfGCpwwhbYoqfv03LAfmiz7e7D/BNxzeMxwQf10GRSzqiOjx7AmtEk+heiD/JWmBuyBPgFtx0Sg1ww== +core-js@3.29.0: + version "3.29.0" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.29.0.tgz#0273e142b67761058bcde5615c503c7406b572d6" + integrity sha512-VG23vuEisJNkGl6XQmFJd3rEG/so/CNatqeE+7uZAwTSwFeB/qaO0be8xZYUNWprJ/GIwL8aMt9cj1kvbpTZhg== core-util-is@1.0.2: version "1.0.2" @@ -5499,11 +5482,6 @@ deepcopy@2.1.0: dependencies: type-detect "^4.0.8" -deepmerge@4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" - integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== - deepmerge@4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" @@ -5757,6 +5735,11 @@ dot-prop@^6.0.1: dependencies: is-obj "^2.0.0" +dotenv@^16.3.1: + version "16.3.1" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" + integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== + dtrace-provider@~0.8: version "0.8.8" resolved "https://registry.yarnpkg.com/dtrace-provider/-/dtrace-provider-0.8.8.tgz#2996d5490c37e1347be263b423ed7b297fb0d97e" @@ -6019,11 +6002,6 @@ eslint-utils@^3.0.0: dependencies: eslint-visitor-keys "^2.0.0" -eslint-visitor-keys@3.3.0, eslint-visitor-keys@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" - integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== - eslint-visitor-keys@3.4.3, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" @@ -6034,49 +6012,52 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint@8.32.0: - version "8.32.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.32.0.tgz#d9690056bb6f1a302bd991e7090f5b68fbaea861" - integrity sha512-nETVXpnthqKPFyuY2FNjz/bEd6nbosRgKbkgS/y1C7LJop96gYHWpiguLecMHQ2XCPxn77DS0P+68WzG6vkZSQ== +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + +eslint@8.48.0: + version "8.48.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.48.0.tgz#bf9998ba520063907ba7bfe4c480dc8be03c2155" + integrity sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg== dependencies: - "@eslint/eslintrc" "^1.4.1" - "@humanwhocodes/config-array" "^0.11.8" + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.2" + "@eslint/js" "8.48.0" + "@humanwhocodes/config-array" "^0.11.10" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" - ajv "^6.10.0" + ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" debug "^4.3.2" doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - espree "^9.4.0" - esquery "^1.4.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" find-up "^5.0.0" glob-parent "^6.0.2" globals "^13.19.0" - grapheme-splitter "^1.0.4" + graphemer "^1.4.0" ignore "^5.2.0" - import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" is-path-inside "^3.0.3" - js-sdsl "^4.1.4" js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" lodash.merge "^4.6.2" minimatch "^3.1.2" natural-compare "^1.4.0" - optionator "^0.9.1" - regexpp "^3.2.0" + optionator "^0.9.3" strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" text-table "^0.2.0" eslint@8.53.0: @@ -6169,15 +6150,6 @@ eslint@^8.35.0: strip-json-comments "^3.1.0" text-table "^0.2.0" -espree@9.4.1, espree@^9.4.0: - version "9.4.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.1.tgz#51d6092615567a2c2cff7833445e37c28c0065bd" - integrity sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg== - dependencies: - acorn "^8.8.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.3.0" - espree@9.6.1, espree@^9.6.0, espree@^9.6.1: version "9.6.1" resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" @@ -6187,12 +6159,21 @@ espree@9.6.1, espree@^9.6.0, espree@^9.6.1: acorn-jsx "^5.3.2" eslint-visitor-keys "^3.4.1" +espree@^9.4.0: + version "9.4.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.1.tgz#51d6092615567a2c2cff7833445e37c28c0065bd" + integrity sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg== + dependencies: + acorn "^8.8.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.3.0" + esprima@4.0.1, esprima@^4.0.0, esprima@^4.0.1, esprima@~4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.4.0, esquery@^1.4.2: +esquery@^1.4.2: version "1.4.2" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.2.tgz#c6d3fee05dd665808e2ad870631f221f5617b1d1" integrity sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng== @@ -6546,16 +6527,16 @@ find-versions@^5.1.0: dependencies: semver-regex "^4.0.5" -firefox-profile@4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/firefox-profile/-/firefox-profile-4.2.2.tgz#1c7c78d103e2fe4102154e0300dbc17124847db5" - integrity sha512-3kI17Xl9dL9AeRkpV1yahsJ+UbekkPtlQswKrIsTY1NLgxtEOR4R19rjGGz5+7/rP8Jt6fvxHk+Bai9R6Eai3w== +firefox-profile@4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/firefox-profile/-/firefox-profile-4.3.2.tgz#01f423c8a899695ef46d46f997d5f91c9dc5c93d" + integrity sha512-/C+Eqa0YgIsQT2p66p7Ygzqe7NlE/GNTbhw2SBCm5V3OsWDPITNdTPEcH2Q2fe7eMpYYNPKdUcuVioZBZiR6kA== dependencies: adm-zip "~0.5.x" fs-extra "~9.0.1" ini "~2.0.0" minimist "^1.2.5" - xml2js "~0.4.23" + xml2js "^0.5.0" first-chunk-stream@3.0.0, first-chunk-stream@^3.0.0: version "3.0.0" @@ -6575,11 +6556,6 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== -fluent-syntax@0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/fluent-syntax/-/fluent-syntax-0.14.0.tgz#d332a67eb3c0a3cdd3d07ee097c89e1c0b95bb84" - integrity sha512-+k8uXWfRpSrE33764RbpjIKMzIX6R9EnSjFBgaA1s0Mboc3KnW9sYe0c6vjIoZQY1C4Gst1VFvAOP6YGJjTJuA== - focus-lock@^0.11.6: version "0.11.6" resolved "https://registry.yarnpkg.com/focus-lock/-/focus-lock-0.11.6.tgz#e8821e21d218f03e100f7dc27b733f9c4f61e683" @@ -6842,16 +6818,16 @@ glob@10.3.10: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-scurry "^1.10.1" -glob@8.1.0, glob@^8.0.1: - version "8.1.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== +glob@10.3.4: + version "10.3.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.4.tgz#c85c9c7ab98669102b6defda76d35c5b1ef9766f" + integrity sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ== dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" + foreground-child "^3.1.0" + jackspeak "^2.0.3" + minimatch "^9.0.1" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + path-scurry "^1.10.1" glob@^6.0.1: version "6.0.4" @@ -6876,6 +6852,17 @@ glob@^7.1.3, glob@^7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^8.0.1: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + global-dirs@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" @@ -7803,7 +7790,7 @@ istanbul-reports@^3.1.3: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jackspeak@^2.3.5: +jackspeak@^2.0.3, jackspeak@^2.3.5: version "2.3.6" resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" integrity sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ== @@ -8206,10 +8193,10 @@ jest@^29.4.3: import-local "^3.0.2" jest-cli "^29.4.3" -jose@4.11.2: - version "4.11.2" - resolved "https://registry.yarnpkg.com/jose/-/jose-4.11.2.tgz#d9699307c02e18ff56825843ba90e2fae9f09e23" - integrity sha512-njj0VL2TsIxCtgzhO+9RRobBvws4oYyCM8TpvoUQwl/MbIM3NFJRR9+e6x0sS5xXaP1t6OCBkaBME98OV9zU5A== +jose@4.13.1: + version "4.13.1" + resolved "https://registry.yarnpkg.com/jose/-/jose-4.13.1.tgz#449111bb5ab171db85c03f1bd2cb1647ca06db1c" + integrity sha512-MSJQC5vXco5Br38mzaQKiq9mwt7lwj2eXpgpRyQYNHYt2lq1PjkWa7DLXX0WVcQLE9HhMh3jPiufS7fhJf+CLQ== js-sdsl@^4.1.4: version "4.3.0" @@ -9595,11 +9582,6 @@ nan@^2.14.0: resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb" integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== -nanoid@^3.3.4: - version "3.3.4" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" - integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== - nanoid@^3.3.6: version "3.3.7" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" @@ -9662,10 +9644,10 @@ node-fetch@2.6.7: dependencies: whatwg-url "^5.0.0" -node-fetch@3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.0.tgz#37e71db4ecc257057af828d523a7243d651d91e4" - integrity sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA== +node-fetch@3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.1.tgz#b3eea7b54b3a48020e46f4f88b9c5a7430d20b2e" + integrity sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow== dependencies: data-uri-to-buffer "^4.0.0" fetch-blob "^3.1.4" @@ -10059,16 +10041,7 @@ onetime@^6.0.0: dependencies: mimic-fn "^4.0.0" -open@8.4.0: - version "8.4.0" - resolved "https://registry.yarnpkg.com/open/-/open-8.4.0.tgz#345321ae18f8138f82565a910fdc6b39e8c244f8" - integrity sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q== - dependencies: - define-lazy-prop "^2.0.0" - is-docker "^2.1.1" - is-wsl "^2.2.0" - -open@^8.0.9: +open@8.4.2, open@^8.0.9: version "8.4.2" resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== @@ -10516,38 +10489,38 @@ pino@7.11.0: sonic-boom "^2.2.1" thread-stream "^0.15.1" -pino@8.16.1: - version "8.16.1" - resolved "https://registry.yarnpkg.com/pino/-/pino-8.16.1.tgz#dcaf82764b1a27f24101317cdd6453e96290f1d9" - integrity sha512-3bKsVhBmgPjGV9pyn4fO/8RtoVDR8ssW1ev819FsRXlRNgW8gR/9Kx+gCK4UPWd4JjrRDLWpzd/pb1AyWm3MGA== +pino@8.15.0: + version "8.15.0" + resolved "https://registry.yarnpkg.com/pino/-/pino-8.15.0.tgz#67c61d5e397bf297e5a0433976a7f7b8aa6f876b" + integrity sha512-olUADJByk4twxccmAxb1RiGKOSvddHugCV3wkqjyv+3Sooa2KLrmXrKEWOKi0XPCLasRR5jBXxioE1jxUa4KzQ== dependencies: atomic-sleep "^1.0.0" fast-redact "^3.1.1" on-exit-leak-free "^2.1.0" - pino-abstract-transport v1.1.0 + pino-abstract-transport v1.0.0 pino-std-serializers "^6.0.0" process-warning "^2.0.0" quick-format-unescaped "^4.0.3" real-require "^0.2.0" safe-stable-stringify "^2.3.1" - sonic-boom "^3.7.0" + sonic-boom "^3.1.0" thread-stream "^2.0.0" -pino@8.8.0: - version "8.8.0" - resolved "https://registry.yarnpkg.com/pino/-/pino-8.8.0.tgz#1f0d6695a224aa06afc7ad60f2ccc4772d3b9233" - integrity sha512-cF8iGYeu2ODg2gIwgAHcPrtR63ILJz3f7gkogaHC/TXVVXxZgInmNYiIpDYEwgEkxZti2Se6P2W2DxlBIZe6eQ== +pino@8.16.1: + version "8.16.1" + resolved "https://registry.yarnpkg.com/pino/-/pino-8.16.1.tgz#dcaf82764b1a27f24101317cdd6453e96290f1d9" + integrity sha512-3bKsVhBmgPjGV9pyn4fO/8RtoVDR8ssW1ev819FsRXlRNgW8gR/9Kx+gCK4UPWd4JjrRDLWpzd/pb1AyWm3MGA== dependencies: atomic-sleep "^1.0.0" fast-redact "^3.1.1" on-exit-leak-free "^2.1.0" - pino-abstract-transport v1.0.0 + pino-abstract-transport v1.1.0 pino-std-serializers "^6.0.0" process-warning "^2.0.0" quick-format-unescaped "^4.0.3" real-require "^0.2.0" safe-stable-stringify "^2.3.1" - sonic-boom "^3.1.0" + sonic-boom "^3.7.0" thread-stream "^2.0.0" pirates@^4.0.4: @@ -10588,12 +10561,12 @@ postcss-value-parser@^4.0.2: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@8.4.21: - version "8.4.21" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.21.tgz#c639b719a57efc3187b13a1d765675485f4134f4" - integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg== +postcss@8.4.29: + version "8.4.29" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.29.tgz#33bc121cf3b3688d4ddef50be869b2a54185a1dd" + integrity sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw== dependencies: - nanoid "^3.3.4" + nanoid "^3.3.6" picocolors "^1.0.0" source-map-js "^1.0.2" @@ -11714,13 +11687,13 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -sign-addon@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/sign-addon/-/sign-addon-5.2.0.tgz#cd6f8a547286625c58d077640f3cdfc69c2188c6" - integrity sha512-t5CZ4MSKAd3uJBUfjgWfSyKYC1pQS6BMUbgI5OytzMkTOQ9NkdkFE8bB0AJLQIGqDrNS2b1+/ghAP56iuCUE+g== +sign-addon@5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/sign-addon/-/sign-addon-5.3.0.tgz#7aa440359aa0de2786f232f7eb0ec6ffb685bdbd" + integrity sha512-7nHlCzhQgVMLBNiXVEgbG/raq48awOW0lYMN5uo1BaB3mp0+k8M8pvDwbfTlr3apcxZJsk9HQsAW1POwoJugpQ== dependencies: common-tags "1.8.2" - core-js "3.27.1" + core-js "3.29.0" deepcopy "2.1.0" es6-error "4.1.1" es6-promisify "7.0.0" @@ -13022,42 +12995,42 @@ wcwidth@^1.0.0: dependencies: defaults "^1.0.3" -web-ext@^7.5.0: - version "7.5.0" - resolved "https://registry.yarnpkg.com/web-ext/-/web-ext-7.5.0.tgz#6da03afe527445dc46c9cce31ccc672c9d0c83e7" - integrity sha512-Ymflj7Aq/LOD+zGoyvwRbAPx/yMJeig2OEb/rRXYrWl6NWRI5E0c2iWGqlBcnL45iKrOzz70H438dVeJk0w2ug== +web-ext@^7.8.0: + version "7.8.0" + resolved "https://registry.yarnpkg.com/web-ext/-/web-ext-7.8.0.tgz#710cd73af79e3ac26fd4883b8894a3f6fd692d5d" + integrity sha512-ta+VjbNfK5q0pqRmrlH/DQMdJ89sAJFfgcvpqoUoe2gPxLu18zZ5mIakGvyjmfjrkJLOZ2NCNF7suj/qd6xaEQ== dependencies: - "@babel/runtime" "7.20.13" + "@babel/runtime" "7.21.0" "@devicefarmer/adbkit" "3.2.3" - addons-linter "5.27.0" + addons-linter "6.13.0" bunyan "1.8.15" camelcase "7.0.1" chrome-launcher "0.15.1" debounce "1.2.1" decamelize "6.0.0" es6-error "4.1.1" - firefox-profile "4.2.2" + firefox-profile "4.3.2" fs-extra "11.1.0" fx-runner "1.3.0" import-fresh "3.3.0" - jose "4.11.2" + jose "4.13.1" mkdirp "1.0.4" multimatch "6.0.0" mz "2.7.0" - node-fetch "3.3.0" + node-fetch "3.3.1" node-notifier "10.0.1" - open "8.4.0" + open "8.4.2" parse-json "6.0.2" promise-toolbox "0.21.0" - sign-addon "5.2.0" + sign-addon "5.3.0" source-map-support "0.5.21" strip-bom "5.0.0" strip-json-comments "5.0.0" tmp "0.2.1" update-notifier "6.0.2" watchpack "2.4.0" - ws "8.12.0" - yargs "17.6.2" + ws "8.13.0" + yargs "17.7.1" zip-dir "2.0.0" web-streams-polyfill@^3.0.3: @@ -13340,10 +13313,10 @@ write-file-atomic@^4.0.0, write-file-atomic@^4.0.1, write-file-atomic@^4.0.2: imurmurhash "^0.1.4" signal-exit "^3.0.7" -ws@8.12.0: - version "8.12.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.12.0.tgz#485074cc392689da78e1828a9ff23585e06cddd8" - integrity sha512-kU62emKIdKVeEIOIKVegvqpXMSTAMLJozpHZaJNDYqBjzlSYXQGviYwN1osDLJ9av68qHd4a2oSjd7yD4pacig== +ws@8.13.0, ws@^8.13.0: + version "8.13.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" + integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== ws@^7.5.1: version "7.5.9" @@ -13355,11 +13328,6 @@ ws@^8.11.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.12.1.tgz#c51e583d79140b5e42e39be48c934131942d4a8f" integrity sha512-1qo+M9Ba+xNhPB+YTWUlK6M17brTut5EXbcBaMRN5pH5dFrXz7lzz1ChFSUq3bOUl8yEvSenhHmYUNJxFzdJew== -ws@^8.13.0: - version "8.13.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" - integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== - xdg-basedir@^5.0.1, xdg-basedir@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-5.1.0.tgz#1efba19425e73be1bc6f2a6ceb52a3d2c884c0c9" @@ -13370,10 +13338,10 @@ xml-name-validator@^4.0.0: resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw== -xml2js@~0.4.23: - version "0.4.23" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66" - integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug== +xml2js@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.5.0.tgz#d9440631fbb2ed800203fad106f2724f62c493b7" + integrity sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA== dependencies: sax ">=0.6.0" xmlbuilder "~11.0.0" @@ -13441,10 +13409,10 @@ yargs-parser@^21.0.1, yargs-parser@^21.1.1: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== -yargs@17.6.2: - version "17.6.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.6.2.tgz#2e23f2944e976339a1ee00f18c77fedee8332541" - integrity sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw== +yargs@17.7.1, yargs@^17.0.0, yargs@^17.3.1, yargs@^17.5.1: + version "17.7.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.1.tgz#34a77645201d1a8fc5213ace787c220eabbd0967" + integrity sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw== dependencies: cliui "^8.0.1" escalade "^3.1.1" @@ -13484,19 +13452,6 @@ yargs@^15.3.1: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^17.0.0, yargs@^17.3.1, yargs@^17.5.1: - version "17.7.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.1.tgz#34a77645201d1a8fc5213ace787c220eabbd0967" - integrity sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - yarn@^1.22.19: version "1.22.19" resolved "https://registry.yarnpkg.com/yarn/-/yarn-1.22.19.tgz#4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"