From 5f71efceec417e0bbd8ad04ba84b9ab87a1015a4 Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Wed, 3 Apr 2024 03:09:09 +0400 Subject: [PATCH 01/29] Add signTransaction and getBalance methods to fastAuthController --- .../src/components/Sign/Sign.tsx | 27 ++++++-- .../src/lib/controller.ts | 68 ++++++++++++++++--- 2 files changed, 80 insertions(+), 15 deletions(-) diff --git a/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx b/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx index 3fe6c1bb..5291e1a8 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx +++ b/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx @@ -1,4 +1,4 @@ -import { encodeSignedDelegate } from '@near-js/transactions'; +import { encodeSignedDelegate, encodeTransaction } from '@near-js/transactions'; import BN from 'bn.js'; import { utils, transactions as transaction } from 'near-api-js'; import React, { @@ -190,14 +190,27 @@ function Sign() { const signedTransactions = []; const success_url = isUrlNotJavascriptProtocol(searchParams.get('success_url')) && searchParams.get('success_url'); for (let i = 0; i < transactionDetails.transactions.length; i += 1) { + let base64 = ''; try { // eslint-disable-next-line no-await-in-loop - const signed = await window.fastAuthController.signDelegateAction( - transactionDetails.transactions[i] - ); - const base64 = Buffer.from(encodeSignedDelegate(signed)).toString( - 'base64' - ); + if (parseFloat((await window.fastAuthController.getBalance()).available) > 0) { + // eslint-disable-next-line no-await-in-loop + const signed = await window.fastAuthController.signTransaction( + transactionDetails.transactions[i] + ); + base64 = Buffer.from(encodeTransaction(signed)).toString( + 'base64' + ); + } else { + // eslint-disable-next-line no-await-in-loop + const signed = await window.fastAuthController.signDelegateAction( + transactionDetails.transactions[i] + ); + base64 = Buffer.from(encodeSignedDelegate(signed)).toString( + 'base64' + ); + } + signedTransactions.push(base64); } catch (err) { if (inIframe()) { diff --git a/packages/near-fast-auth-signer/src/lib/controller.ts b/packages/near-fast-auth-signer/src/lib/controller.ts index 8e62f312..379112a9 100644 --- a/packages/near-fast-auth-signer/src/lib/controller.ts +++ b/packages/near-fast-auth-signer/src/lib/controller.ts @@ -1,17 +1,20 @@ import { Account, Connection } from '@near-js/accounts'; -import { createKey, getKeys } from '@near-js/biometric-ed25519'; +import { createKey, getKeys, isPassKeyAvailable } from '@near-js/biometric-ed25519'; import { KeyPair, KeyPairEd25519, KeyType, PublicKey } from '@near-js/crypto'; import { InMemoryKeyStore } from '@near-js/keystores'; import { - SCHEMA, actionCreators, encodeSignedDelegate, buildDelegateAction, Signature, SignedDelegate + SCHEMA, actionCreators, encodeSignedDelegate, buildDelegateAction, Signature, SignedDelegate, + signTransaction } from '@near-js/transactions'; +import { baseDecode } from '@near-js/utils'; import { captureException } from '@sentry/react'; import BN from 'bn.js'; import { baseEncode, serialize } from 'borsh'; import { sha256 } from 'js-sha256'; -import { keyStores } from 'near-api-js'; +import { InMemorySigner, keyStores } from 'near-api-js'; +import { TypedError } from 'near-api-js/lib/utils/errors'; import networkParams from './networkParams'; import { fetchAccountIds } from '../api'; @@ -187,7 +190,6 @@ class FastAuthController { }); } catch { // fallback, non webAuthN supported browser - // @ts-ignore const oidcToken = await firebaseAuth.currentUser.getIdToken(); const recoveryPK = await this.getUserCredential(oidcToken); // make sure to handle failure, (eg token expired) if fail, redirect to failure_url @@ -205,6 +207,60 @@ class FastAuthController { return signedDelegate; } + async getBalance() { + const account = new Account(this.connection, this.accountId); + return account.getAccountBalance(); + } + + async signTransaction({ receiverId, actions, signerId }) { + this.assertValidSigner(signerId); + let signedTransaction; + const account = new Account(this.connection, this.accountId); + + const accessKeyInfo = await account.findAccessKey(receiverId, actions); + if (!accessKeyInfo) { + throw new TypedError( + `Can not sign transactions for account ${this.accountId} on network ${this.connection.networkId}, no matching key pair exists for this account`, + 'KeyNotFound' + ); + } + const { accessKey } = accessKeyInfo; + + const block = await this.connection.provider.block({ + finality: 'final', + }); + const blockHash = block.header.hash; + + const nonce = accessKey.nonce.add(new BN(1)); + + if (isPassKeyAvailable) { + signedTransaction = await signTransaction( + receiverId, + nonce, + actions, + baseDecode(blockHash), + this.connection.signer, + this.accountId, + this.connection.networkId + ); + } else { + const oidcToken = await firebaseAuth.currentUser.getIdToken(); + const localKey = await this.getKey(`oidc_keypair_${oidcToken}`) || await this.getLocalStoreKey(`oidc_keypair_${oidcToken}`); + const inMemorySigner = await InMemorySigner.fromKeyPair(this.connection.networkId, this.accountId, localKey); + signedTransaction = await signTransaction( + receiverId, + nonce, + actions, + baseDecode(blockHash), + inMemorySigner, + this.accountId, + this.connection.networkId + ); + } + + return signedTransaction; + } + async signAndSendDelegateAction({ receiverId, actions }) { const signedDelegate = await this.signDelegateAction({ receiverId, actions, signerId: this.accountId }); return fetch(network.relayerUrl, { @@ -229,10 +285,6 @@ class FastAuthController { }); } - async signTransaction(params) { - return this.signDelegateAction(params); - } - async getAllAccessKeysExceptRecoveryKey(odicToken: string): Promise { const account = new Account(this.connection, this.accountId); const accessKeys = await account.getAccessKeys(); From f5e52e54b60dec9e546cc084e00fdf27557c7ddf Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Wed, 3 Apr 2024 03:21:24 +0400 Subject: [PATCH 02/29] Add typescript to methods --- .../src/components/Sign/Sign.tsx | 5 ++- .../src/lib/controller.ts | 42 +++++++++---------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx b/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx index 5291e1a8..98077665 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx +++ b/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx @@ -189,15 +189,16 @@ function Sign() { } const signedTransactions = []; const success_url = isUrlNotJavascriptProtocol(searchParams.get('success_url')) && searchParams.get('success_url'); + // This need to run sequentially due to nonce issues. for (let i = 0; i < transactionDetails.transactions.length; i += 1) { let base64 = ''; try { // eslint-disable-next-line no-await-in-loop if (parseFloat((await window.fastAuthController.getBalance()).available) > 0) { // eslint-disable-next-line no-await-in-loop - const signed = await window.fastAuthController.signTransaction( + const signed = (await window.fastAuthController.signTransaction( transactionDetails.transactions[i] - ); + ))[1]; base64 = Buffer.from(encodeTransaction(signed)).toString( 'base64' ); diff --git a/packages/near-fast-auth-signer/src/lib/controller.ts b/packages/near-fast-auth-signer/src/lib/controller.ts index 379112a9..4ea7dba8 100644 --- a/packages/near-fast-auth-signer/src/lib/controller.ts +++ b/packages/near-fast-auth-signer/src/lib/controller.ts @@ -1,4 +1,4 @@ -import { Account, Connection } from '@near-js/accounts'; +import { Account, AccountBalance, Connection } from '@near-js/accounts'; import { createKey, getKeys, isPassKeyAvailable } from '@near-js/biometric-ed25519'; import { KeyPair, KeyPairEd25519, KeyType, PublicKey @@ -6,7 +6,9 @@ import { import { InMemoryKeyStore } from '@near-js/keystores'; import { SCHEMA, actionCreators, encodeSignedDelegate, buildDelegateAction, Signature, SignedDelegate, - signTransaction + signTransaction, + SignedTransaction, + Action } from '@near-js/transactions'; import { baseDecode } from '@near-js/utils'; import { captureException } from '@sentry/react'; @@ -207,14 +209,15 @@ class FastAuthController { return signedDelegate; } - async getBalance() { + async getBalance(): Promise { const account = new Account(this.connection, this.accountId); return account.getAccountBalance(); } - async signTransaction({ receiverId, actions, signerId }) { + async signTransaction({ receiverId, actions, signerId }: + { receiverId: string; actions: Action[]; signerId: string }): + Promise<[Uint8Array, SignedTransaction]> { this.assertValidSigner(signerId); - let signedTransaction; const account = new Account(this.connection, this.accountId); const accessKeyInfo = await account.findAccessKey(receiverId, actions); @@ -234,7 +237,7 @@ class FastAuthController { const nonce = accessKey.nonce.add(new BN(1)); if (isPassKeyAvailable) { - signedTransaction = await signTransaction( + return signTransaction( receiverId, nonce, actions, @@ -243,22 +246,19 @@ class FastAuthController { this.accountId, this.connection.networkId ); - } else { - const oidcToken = await firebaseAuth.currentUser.getIdToken(); - const localKey = await this.getKey(`oidc_keypair_${oidcToken}`) || await this.getLocalStoreKey(`oidc_keypair_${oidcToken}`); - const inMemorySigner = await InMemorySigner.fromKeyPair(this.connection.networkId, this.accountId, localKey); - signedTransaction = await signTransaction( - receiverId, - nonce, - actions, - baseDecode(blockHash), - inMemorySigner, - this.accountId, - this.connection.networkId - ); } - - return signedTransaction; + const oidcToken = await firebaseAuth.currentUser.getIdToken(); + const localKey = await this.getKey(`oidc_keypair_${oidcToken}`) || await this.getLocalStoreKey(`oidc_keypair_${oidcToken}`); + const inMemorySigner = await InMemorySigner.fromKeyPair(this.connection.networkId, this.accountId, localKey); + return signTransaction( + receiverId, + nonce, + actions, + baseDecode(blockHash), + inMemorySigner, + this.accountId, + this.connection.networkId + ); } async signAndSendDelegateAction({ receiverId, actions }) { From 2b194f8bfa30f03d178d67c45613a8023a740770 Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Wed, 3 Apr 2024 03:37:37 +0400 Subject: [PATCH 03/29] split delegate and transaction return --- .../src/components/Sign/Sign.tsx | 19 ++++++++++--------- .../src/lib/controller.ts | 1 + 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx b/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx index 98077665..d57faea0 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx +++ b/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx @@ -183,15 +183,15 @@ function Sign() { if (isUserAuthenticated !== true) { const errorMessage = 'You are not authenticated or there has been an indexer failure'; setError(errorMessage); - window.parent.postMessage({ signedDelegates: '', error: errorMessage }, '*'); + window.parent.postMessage({ signedDelegates: '', signedTransactions: '', error: errorMessage }, '*'); setInFlight(false); return; } const signedTransactions = []; + const signedDelegates = []; const success_url = isUrlNotJavascriptProtocol(searchParams.get('success_url')) && searchParams.get('success_url'); // This need to run sequentially due to nonce issues. for (let i = 0; i < transactionDetails.transactions.length; i += 1) { - let base64 = ''; try { // eslint-disable-next-line no-await-in-loop if (parseFloat((await window.fastAuthController.getBalance()).available) > 0) { @@ -199,25 +199,25 @@ function Sign() { const signed = (await window.fastAuthController.signTransaction( transactionDetails.transactions[i] ))[1]; - base64 = Buffer.from(encodeTransaction(signed)).toString( + const base64 = Buffer.from(encodeTransaction(signed)).toString( 'base64' ); + signedTransactions.push(base64); } else { // eslint-disable-next-line no-await-in-loop const signed = await window.fastAuthController.signDelegateAction( transactionDetails.transactions[i] ); - base64 = Buffer.from(encodeSignedDelegate(signed)).toString( + const base64 = Buffer.from(encodeSignedDelegate(signed)).toString( 'base64' ); + signedDelegates.push(base64); } - - signedTransactions.push(base64); } catch (err) { if (inIframe()) { setError(`An error occurred: ${err.message}`); setInFlight(false); - window.parent.postMessage({ signedDelegates: '', error: err.message }, '*'); + window.parent.postMessage({ signedDelegates: '', signedTransactions: '', error: err.message }, '*'); } else { const failure_url = searchParams.get('failure_url'); redirectWithError({ success_url, failure_url, error: err }); @@ -226,10 +226,11 @@ function Sign() { } } if (inIframe()) { - window.parent.postMessage({ signedDelegates: signedTransactions.join(',') }, '*'); + window.parent.postMessage({ signedDelegates: signedDelegates.join(','), signedTransactions: signedTransactions.join(',') }, '*'); } else { const parsedUrl = new URL(success_url || window.location.origin + (basePath ? `/${basePath}` : '')); - parsedUrl.searchParams.set('transactions', signedTransactions.join(',')); + parsedUrl.searchParams.set('signedDelegates', signedDelegates.join(',')); + parsedUrl.searchParams.set('signedTransactions', signedTransactions.join(',')); window.location.replace(parsedUrl.href); } diff --git a/packages/near-fast-auth-signer/src/lib/controller.ts b/packages/near-fast-auth-signer/src/lib/controller.ts index 4ea7dba8..defa1d4c 100644 --- a/packages/near-fast-auth-signer/src/lib/controller.ts +++ b/packages/near-fast-auth-signer/src/lib/controller.ts @@ -247,6 +247,7 @@ class FastAuthController { this.connection.networkId ); } + const oidcToken = await firebaseAuth.currentUser.getIdToken(); const localKey = await this.getKey(`oidc_keypair_${oidcToken}`) || await this.getLocalStoreKey(`oidc_keypair_${oidcToken}`); const inMemorySigner = await InMemorySigner.fromKeyPair(this.connection.networkId, this.accountId, localKey); From 7d5cd3de5d07c770dc02e9e917aca301c36e1848 Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Wed, 3 Apr 2024 07:18:27 +0400 Subject: [PATCH 04/29] Update eslint config --- packages/near-fast-auth-signer/.eslintrc.js | 11 +- packages/near-fast-auth-signer/package.json | 16 +- yarn.lock | 854 +++++++++++++++----- 3 files changed, 661 insertions(+), 220 deletions(-) diff --git a/packages/near-fast-auth-signer/.eslintrc.js b/packages/near-fast-auth-signer/.eslintrc.js index 5329a087..51d46622 100644 --- a/packages/near-fast-auth-signer/.eslintrc.js +++ b/packages/near-fast-auth-signer/.eslintrc.js @@ -14,9 +14,12 @@ module.exports = { files: ['*.ts', '*.tsx'], }], ignorePatterns: ['dist'], + plugins: [ + '@typescript-eslint', + ], extends: ['airbnb', 'plugin:import/errors', 'plugin:import/typescript'], rules: { - 'no-unused-vars': ['error', { argsIgnorePattern: '^_' }], + 'linebreak-style': 0, 'react/require-default-props': 'off', 'react/prop-types': 'off', @@ -92,6 +95,10 @@ module.exports = { ], 'arrow-parens': ['error', 'always'], 'key-spacing': ['warn', { align: 'value', mode: 'minimum' }], - 'one-var-declaration-per-line': ['error', 'initializations'] + 'one-var-declaration-per-line': ['error', 'initializations'], + 'no-shadow': 'off', + '@typescript-eslint/no-shadow': 'error', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], }, }; diff --git a/packages/near-fast-auth-signer/package.json b/packages/near-fast-auth-signer/package.json index 8267aaf0..9a346522 100644 --- a/packages/near-fast-auth-signer/package.json +++ b/packages/near-fast-auth-signer/package.json @@ -83,7 +83,7 @@ }, "devDependencies": { "@babel/core": "^7.21.8", - "@babel/eslint-parser": "^7.21.8", + "@babel/eslint-parser": "^7.24.1", "@babel/preset-env": "^7.21.5", "@babel/preset-react": "^7.10.1", "@sentry/webpack-plugin": "^2.14.0", @@ -96,16 +96,16 @@ "@types/lodash.debounce": "^4.0.9", "@types/react": "^18.2.6", "@types/react-dom": "^18.2.4", - "@typescript-eslint/eslint-plugin": "^5.59.6", - "@typescript-eslint/parser": "^5.59.6", + "@typescript-eslint/eslint-plugin": "^7.5.0", + "@typescript-eslint/parser": "^7.5.0", "babel-loader": "^9.1.2", "css-loader": "^6.7.3", - "eslint": "^8.40.0", + "eslint": "^8.57.0", "eslint-config-airbnb": "^19.0.4", - "eslint-import-resolver-typescript": "^3.5.5", - "eslint-plugin-import": "^2.27.5", - "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-react": "^7.32.2", + "eslint-import-resolver-typescript": "^3.6.1", + "eslint-plugin-import": "^2.29.1", + "eslint-plugin-jsx-a11y": "^6.8.0", + "eslint-plugin-react": "^7.34.1", "eslint-plugin-react-hooks": "^4.6.0", "file-loader": "^6.2.0", "html-webpack-plugin": "^5.5.1", diff --git a/yarn.lock b/yarn.lock index 0033c37a..61976d23 100644 --- a/yarn.lock +++ b/yarn.lock @@ -121,10 +121,10 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/eslint-parser@^7.21.8": - version "7.23.3" - resolved "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.23.3.tgz" - integrity sha512-9bTuNlyx7oSstodm1cR1bECj4fkiknsDa1YniISkJemMY3DGhJNYBECbe6QD/q54mp2J8VO66jW3/7uP//iFCw== +"@babel/eslint-parser@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.24.1.tgz#e27eee93ed1d271637165ef3a86e2b9332395c32" + integrity sha512-d5guuzMlPeDfZIbpQ8+g1NaCNuAGBBGNECh0HVqz1sjOeVLh2CEaifuOysCH18URW6R7pqXINvf5PaR/dC6jLQ== dependencies: "@nicolo-ribaudo/eslint-scope-5-internals" "5.1.1-v1" eslint-visitor-keys "^2.1.0" @@ -1269,22 +1269,22 @@ resolved "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz" integrity sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ== -"@eslint-community/eslint-utils@^4.2.0": +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": +"@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": version "4.10.0" resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz" integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== -"@eslint/eslintrc@^2.1.3": - version "2.1.3" - resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz" - integrity sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA== +"@eslint/eslintrc@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" + integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -1296,10 +1296,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.53.0": - version "8.53.0" - resolved "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz" - integrity sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w== +"@eslint/js@8.57.0": + version "8.57.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" + integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== "@ethereumjs/common@^4.2.0": version "4.2.0" @@ -1736,13 +1736,13 @@ resolved "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-3.3.2.tgz" integrity sha512-Tw+GGPnBp+5DOsSg4ek3LCPgkBOuOgS5DsDV7qsWNH9LZc433kgsWICjlsh2J9p04H2K66hsXPPb9qn9ILdUtA== -"@humanwhocodes/config-array@^0.11.13": - version "0.11.13" - resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz" - integrity sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ== +"@humanwhocodes/config-array@^0.11.14": + version "0.11.14" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" + integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== dependencies: - "@humanwhocodes/object-schema" "^2.0.1" - debug "^4.1.1" + "@humanwhocodes/object-schema" "^2.0.2" + debug "^4.3.1" minimatch "^3.0.5" "@humanwhocodes/module-importer@^1.0.1": @@ -1750,10 +1750,10 @@ resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz" - integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== +"@humanwhocodes/object-schema@^2.0.2": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" + integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== "@hutson/parse-repository-url@^3.0.0": version "3.0.2" @@ -3238,7 +3238,7 @@ dependencies: "@types/node" "*" -"@types/json-schema@*", "@types/json-schema@^7.0.11", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": +"@types/json-schema@*", "@types/json-schema@^7.0.11", "@types/json-schema@^7.0.12", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.15" resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -3378,10 +3378,10 @@ resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.6.tgz" integrity sha512-Vlktnchmkylvc9SnwwwozTv04L/e1NykF5vgoQ0XTmI8DD+wxfjQuHuvHS3p0r2jz2x2ghPs2h1FVeDirIteWA== -"@types/semver@^7.3.12": - version "7.5.5" - resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.5.tgz" - integrity sha512-+d+WYC1BxJ6yVOgUgzK8gWvp5qF8ssV5r4nsDcZWKRWcDQLQ619tvWAxJQYGgBrO1MnLJC7a5GtiYsAoQ47dJg== +"@types/semver@^7.5.0": + version "7.5.8" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" + integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== "@types/send@*": version "0.17.4" @@ -3436,89 +3436,91 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^5.59.6": - version "5.62.0" - resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz" - integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== +"@typescript-eslint/eslint-plugin@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.5.0.tgz#1dc52fe48454d5b54be2d5f089680452f1628a5a" + integrity sha512-HpqNTH8Du34nLxbKgVMGljZMG0rJd2O9ecvr2QLYp+7512ty1j42KnsFwspPXg1Vh8an9YImf6CokUBltisZFQ== dependencies: - "@eslint-community/regexpp" "^4.4.0" - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/type-utils" "5.62.0" - "@typescript-eslint/utils" "5.62.0" + "@eslint-community/regexpp" "^4.5.1" + "@typescript-eslint/scope-manager" "7.5.0" + "@typescript-eslint/type-utils" "7.5.0" + "@typescript-eslint/utils" "7.5.0" + "@typescript-eslint/visitor-keys" "7.5.0" debug "^4.3.4" graphemer "^1.4.0" - ignore "^5.2.0" - natural-compare-lite "^1.4.0" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/parser@^5.59.6": - version "5.62.0" - resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz" - integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== - dependencies: - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/typescript-estree" "5.62.0" + ignore "^5.2.4" + natural-compare "^1.4.0" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/parser@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.5.0.tgz#1eeff36309ac2253c905dd4a88b4b71b72a358ed" + integrity sha512-cj+XGhNujfD2/wzR1tabNsidnYRaFfEkcULdcIyVBYcXjBvBKOes+mpMBP7hMpOyk+gBcfXsrg4NBGAStQyxjQ== + dependencies: + "@typescript-eslint/scope-manager" "7.5.0" + "@typescript-eslint/types" "7.5.0" + "@typescript-eslint/typescript-estree" "7.5.0" + "@typescript-eslint/visitor-keys" "7.5.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.62.0": - version "5.62.0" - resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz" - integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== +"@typescript-eslint/scope-manager@7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.5.0.tgz#70f0a7361430ab1043a5f97386da2a0d8b2f4d56" + integrity sha512-Z1r7uJY0MDeUlql9XJ6kRVgk/sP11sr3HKXn268HZyqL7i4cEfrdFuSSY/0tUqT37l5zT0tJOsuDP16kio85iA== dependencies: - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/visitor-keys" "5.62.0" + "@typescript-eslint/types" "7.5.0" + "@typescript-eslint/visitor-keys" "7.5.0" -"@typescript-eslint/type-utils@5.62.0": - version "5.62.0" - resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz" - integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== +"@typescript-eslint/type-utils@7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.5.0.tgz#a8faa403232da3a3901655387c7082111f692cf9" + integrity sha512-A021Rj33+G8mx2Dqh0nMO9GyjjIBK3MqgVgZ2qlKf6CJy51wY/lkkFqq3TqqnH34XyAHUkq27IjlUkWlQRpLHw== dependencies: - "@typescript-eslint/typescript-estree" "5.62.0" - "@typescript-eslint/utils" "5.62.0" + "@typescript-eslint/typescript-estree" "7.5.0" + "@typescript-eslint/utils" "7.5.0" debug "^4.3.4" - tsutils "^3.21.0" + ts-api-utils "^1.0.1" -"@typescript-eslint/types@5.62.0": - version "5.62.0" - resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz" - integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== +"@typescript-eslint/types@7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.5.0.tgz#0a284bcdef3cb850ec9fd57992df9f29d6bde1bc" + integrity sha512-tv5B4IHeAdhR7uS4+bf8Ov3k793VEVHd45viRRkehIUZxm0WF82VPiLgHzA/Xl4TGPg1ZD49vfxBKFPecD5/mg== -"@typescript-eslint/typescript-estree@5.62.0": - version "5.62.0" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz" - integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== +"@typescript-eslint/typescript-estree@7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.5.0.tgz#aa5031c511874420f6b5edd90f8e4021525ee776" + integrity sha512-YklQQfe0Rv2PZEueLTUffiQGKQneiIEKKnfIqPIOxgM9lKSZFCjT5Ad4VqRKj/U4+kQE3fa8YQpskViL7WjdPQ== dependencies: - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/visitor-keys" "5.62.0" + "@typescript-eslint/types" "7.5.0" + "@typescript-eslint/visitor-keys" "7.5.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/utils@5.62.0": - version "5.62.0" - resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz" - integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@types/json-schema" "^7.0.9" - "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/typescript-estree" "5.62.0" - eslint-scope "^5.1.1" - semver "^7.3.7" - -"@typescript-eslint/visitor-keys@5.62.0": - version "5.62.0" - resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz" - integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== - dependencies: - "@typescript-eslint/types" "5.62.0" - eslint-visitor-keys "^3.3.0" + minimatch "9.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/utils@7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.5.0.tgz#bbd963647fbbe9ffea033f42c0fb7e89bb19c858" + integrity sha512-3vZl9u0R+/FLQcpy2EHyRGNqAS/ofJ3Ji8aebilfJe+fobK8+LbIFmrHciLVDxjDoONmufDcnVSF38KwMEOjzw== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "7.5.0" + "@typescript-eslint/types" "7.5.0" + "@typescript-eslint/typescript-estree" "7.5.0" + semver "^7.5.4" + +"@typescript-eslint/visitor-keys@7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.5.0.tgz#8abcac66f93ef20b093e87a400c2d21e3a6d55ee" + integrity sha512-mcuHM/QircmA6O7fy6nn2w/3ditQkj+SgtOc8DW3uQ10Yfj42amm2i+6F2K4YAOPNNTmE6iM1ynM6lrSwdendA== + dependencies: + "@typescript-eslint/types" "7.5.0" + eslint-visitor-keys "^3.4.1" "@ungap/structured-clone@^1.2.0": version "1.2.0" @@ -3902,6 +3904,14 @@ array-buffer-byte-length@^1.0.0: call-bind "^1.0.2" is-array-buffer "^3.0.1" +array-buffer-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f" + integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg== + dependencies: + call-bind "^1.0.5" + is-array-buffer "^3.0.4" + array-differ@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz" @@ -3938,6 +3948,18 @@ array-union@^2.1.0: resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== +array.prototype.findlast@^1.2.4: + version "1.2.5" + resolved "https://registry.yarnpkg.com/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz#3e4fbcb30a15a7f5bf64cf2faae22d139c2e4904" + integrity sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-shim-unscopables "^1.0.2" + array.prototype.findlastindex@^1.2.3: version "1.2.3" resolved "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz" @@ -3959,7 +3981,7 @@ array.prototype.flat@^1.3.1, array.prototype.flat@^1.3.2: es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" -array.prototype.flatmap@^1.3.1, array.prototype.flatmap@^1.3.2: +array.prototype.flatmap@^1.3.2: version "1.3.2" resolved "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz" integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== @@ -3969,16 +3991,26 @@ array.prototype.flatmap@^1.3.1, array.prototype.flatmap@^1.3.2: es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" -array.prototype.tosorted@^1.1.1: +array.prototype.toreversed@^1.1.2: version "1.1.2" - resolved "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.2.tgz" - integrity sha512-HuQCHOlk1Weat5jzStICBCd83NxiIMwqDg/dHEsoefabn/hJRj5pVdWcPUSpRrwhwxZOsQassMpgN/xRYFBMIg== + resolved "https://registry.yarnpkg.com/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz#b989a6bf35c4c5051e1dc0325151bf8088954eba" + integrity sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA== dependencies: call-bind "^1.0.2" define-properties "^1.2.0" es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" - get-intrinsic "^1.2.1" + +array.prototype.tosorted@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.3.tgz#c8c89348337e51b8a3c48a9227f9ce93ceedcba8" + integrity sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg== + dependencies: + call-bind "^1.0.5" + define-properties "^1.2.1" + es-abstract "^1.22.3" + es-errors "^1.1.0" + es-shim-unscopables "^1.0.2" arraybuffer.prototype.slice@^1.0.2: version "1.0.2" @@ -3993,6 +4025,20 @@ arraybuffer.prototype.slice@^1.0.2: is-array-buffer "^3.0.2" is-shared-array-buffer "^1.0.2" +arraybuffer.prototype.slice@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6" + integrity sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A== + dependencies: + array-buffer-byte-length "^1.0.1" + call-bind "^1.0.5" + define-properties "^1.2.1" + es-abstract "^1.22.3" + es-errors "^1.2.1" + get-intrinsic "^1.2.3" + is-array-buffer "^3.0.4" + is-shared-array-buffer "^1.0.2" + arrify@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" @@ -4054,6 +4100,13 @@ available-typed-arrays@^1.0.5: resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" + axe-core@=4.7.0: version "4.7.0" resolved "https://registry.npmjs.org/axe-core/-/axe-core-4.7.0.tgz" @@ -4488,6 +4541,17 @@ call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.4, call-bind@^1.0.5: get-intrinsic "^1.2.1" set-function-length "^1.1.1" +call-bind@^1.0.6, call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" @@ -5152,6 +5216,33 @@ data-loader@^3.8.4: "@types/lodash-es" "4.17.3" lodash-es "^4.17.11" +data-view-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz#8ea6326efec17a2e42620696e671d7d5a8bc66b2" + integrity sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz#90721ca95ff280677eb793749fce1011347669e2" + integrity sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz#5e0bbfb4828ed2d1b9b400cd8a7d119bca0ff18a" + integrity sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" + dateformat@^3.0.3: version "3.0.3" resolved "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz" @@ -5239,6 +5330,15 @@ define-data-property@^1.0.1, define-data-property@^1.1.1: gopd "^1.0.1" has-property-descriptors "^1.0.0" +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + define-lazy-prop@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz" @@ -5630,7 +5730,71 @@ es-abstract@^1.22.1: unbox-primitive "^1.0.2" which-typed-array "^1.1.13" -es-iterator-helpers@^1.0.12, es-iterator-helpers@^1.0.15: +es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.2: + version "1.23.3" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0" + integrity sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A== + dependencies: + array-buffer-byte-length "^1.0.1" + arraybuffer.prototype.slice "^1.0.3" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + data-view-buffer "^1.0.1" + data-view-byte-length "^1.0.1" + data-view-byte-offset "^1.0.0" + es-define-property "^1.0.0" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-set-tostringtag "^2.0.3" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.6" + get-intrinsic "^1.2.4" + get-symbol-description "^1.0.2" + globalthis "^1.0.3" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + has-proto "^1.0.3" + has-symbols "^1.0.3" + hasown "^2.0.2" + internal-slot "^1.0.7" + is-array-buffer "^3.0.4" + is-callable "^1.2.7" + is-data-view "^1.0.1" + is-negative-zero "^2.0.3" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.3" + is-string "^1.0.7" + is-typed-array "^1.1.13" + is-weakref "^1.0.2" + object-inspect "^1.13.1" + object-keys "^1.1.1" + object.assign "^4.1.5" + regexp.prototype.flags "^1.5.2" + safe-array-concat "^1.1.2" + safe-regex-test "^1.0.3" + string.prototype.trim "^1.2.9" + string.prototype.trimend "^1.0.8" + string.prototype.trimstart "^1.0.8" + typed-array-buffer "^1.0.2" + typed-array-byte-length "^1.0.1" + typed-array-byte-offset "^1.0.2" + typed-array-length "^1.0.6" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.15" + +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.1.0, es-errors@^1.2.1, es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-iterator-helpers@^1.0.15: version "1.0.15" resolved "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.15.tgz" integrity sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g== @@ -5650,11 +5814,38 @@ es-iterator-helpers@^1.0.12, es-iterator-helpers@^1.0.15: iterator.prototype "^1.1.2" safe-array-concat "^1.0.1" +es-iterator-helpers@^1.0.17: + version "1.0.18" + resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.0.18.tgz#4d3424f46b24df38d064af6fbbc89274e29ea69d" + integrity sha512-scxAJaewsahbqTYrGKJihhViaM6DDZDDoucfvzNbK0pOren1g/daDQ3IAhzn+1G14rBG7w+i5N+qul60++zlKA== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.0" + es-errors "^1.3.0" + es-set-tostringtag "^2.0.3" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + globalthis "^1.0.3" + has-property-descriptors "^1.0.2" + has-proto "^1.0.3" + has-symbols "^1.0.3" + internal-slot "^1.0.7" + iterator.prototype "^1.1.2" + safe-array-concat "^1.1.2" + es-module-lexer@^1.2.1: version "1.3.1" resolved "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz" integrity sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q== +es-object-atoms@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" + integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== + dependencies: + es-errors "^1.3.0" + es-set-tostringtag@^2.0.1: version "2.0.2" resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz" @@ -5664,7 +5855,16 @@ es-set-tostringtag@^2.0.1: has-tostringtag "^1.0.0" hasown "^2.0.0" -es-shim-unscopables@^1.0.0: +es-set-tostringtag@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" + integrity sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ== + dependencies: + get-intrinsic "^1.2.4" + has-tostringtag "^1.0.2" + hasown "^2.0.1" + +es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz" integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== @@ -5728,9 +5928,9 @@ eslint-import-resolver-node@^0.3.9: is-core-module "^2.13.0" resolve "^1.22.4" -eslint-import-resolver-typescript@^3.5.5: +eslint-import-resolver-typescript@^3.6.1: version "3.6.1" - resolved "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz#7b983680edd3f1c5bce1a5829ae0bc2d57fe9efa" integrity sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg== dependencies: debug "^4.3.4" @@ -5748,10 +5948,10 @@ eslint-module-utils@^2.7.4, eslint-module-utils@^2.8.0: dependencies: debug "^3.2.7" -eslint-plugin-import@^2.27.5: - version "2.29.0" - resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.0.tgz" - integrity sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg== +eslint-plugin-import@^2.29.1: + version "2.29.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz#d45b37b5ef5901d639c15270d74d46d161150643" + integrity sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw== dependencies: array-includes "^3.1.7" array.prototype.findlastindex "^1.2.3" @@ -5769,11 +5969,11 @@ eslint-plugin-import@^2.27.5: object.groupby "^1.0.1" object.values "^1.1.7" semver "^6.3.1" - tsconfig-paths "^3.14.2" + tsconfig-paths "^3.15.0" -eslint-plugin-jsx-a11y@^6.7.1: +eslint-plugin-jsx-a11y@^6.8.0: version "6.8.0" - resolved "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.8.0.tgz" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.8.0.tgz#2fa9c701d44fcd722b7c771ec322432857fcbad2" integrity sha512-Hdh937BS3KdwwbBaKd5+PLCOmYY6U4f2h9Z2ktwtNKvIdIEu137rjYbcb9ApSbVJfWxANNuiKTD/9tOKjK9qOA== dependencies: "@babel/runtime" "^7.23.2" @@ -5798,29 +5998,31 @@ eslint-plugin-react-hooks@^4.6.0: resolved "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz" integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== -eslint-plugin-react@^7.32.2: - version "7.33.2" - resolved "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz" - integrity sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw== +eslint-plugin-react@^7.34.1: + version "7.34.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.34.1.tgz#6806b70c97796f5bbfb235a5d3379ece5f4da997" + integrity sha512-N97CxlouPT1AHt8Jn0mhhN2RrADlUAsk1/atcT2KyA/l9Q/E6ll7OIGwNumFmWfZ9skV3XXccYS19h80rHtgkw== dependencies: - array-includes "^3.1.6" - array.prototype.flatmap "^1.3.1" - array.prototype.tosorted "^1.1.1" + array-includes "^3.1.7" + array.prototype.findlast "^1.2.4" + array.prototype.flatmap "^1.3.2" + array.prototype.toreversed "^1.1.2" + array.prototype.tosorted "^1.1.3" doctrine "^2.1.0" - es-iterator-helpers "^1.0.12" + es-iterator-helpers "^1.0.17" estraverse "^5.3.0" jsx-ast-utils "^2.4.1 || ^3.0.0" minimatch "^3.1.2" - object.entries "^1.1.6" - object.fromentries "^2.0.6" - object.hasown "^1.1.2" - object.values "^1.1.6" + object.entries "^1.1.7" + object.fromentries "^2.0.7" + object.hasown "^1.1.3" + object.values "^1.1.7" prop-types "^15.8.1" - resolve "^2.0.0-next.4" + resolve "^2.0.0-next.5" semver "^6.3.1" - string.prototype.matchall "^4.0.8" + string.prototype.matchall "^4.0.10" -eslint-scope@5.1.1, eslint-scope@^5.1.1: +eslint-scope@5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -5846,16 +6048,16 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.40.0: - version "8.53.0" - resolved "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz" - integrity sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag== +eslint@^8.57.0: + version "8.57.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" + integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.3" - "@eslint/js" "8.53.0" - "@humanwhocodes/config-array" "^0.11.13" + "@eslint/eslintrc" "^2.1.4" + "@eslint/js" "8.57.0" + "@humanwhocodes/config-array" "^0.11.14" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" "@ungap/structured-clone" "^1.2.0" @@ -6403,6 +6605,17 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@ has-symbols "^1.0.3" hasown "^2.0.0" +get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + get-pkg-repo@^4.2.1: version "4.2.1" resolved "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-4.2.1.tgz" @@ -6436,6 +6649,15 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" +get-symbol-description@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.2.tgz#533744d5aa20aca4e079c8e5daf7fd44202821f5" + integrity sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg== + dependencies: + call-bind "^1.0.5" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + get-tsconfig@^4.5.0: version "4.7.2" resolved "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz" @@ -6679,11 +6901,23 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.2.2" +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + has-proto@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz" integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== +has-proto@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== + has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" @@ -6696,6 +6930,13 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" +has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + has-unicode@2.0.1, has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz" @@ -6725,6 +6966,13 @@ hasown@^2.0.0: dependencies: function-bind "^1.1.2" +hasown@^2.0.1, hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + he@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" @@ -6994,6 +7242,11 @@ ignore@^5.0.4, ignore@^5.2.0: resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== +ignore@^5.2.4: + version "5.3.1" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" + integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== + import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" @@ -7091,6 +7344,15 @@ internal-slot@^1.0.5: hasown "^2.0.0" side-channel "^1.0.4" +internal-slot@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" + integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== + dependencies: + es-errors "^1.3.0" + hasown "^2.0.0" + side-channel "^1.0.4" + interpret@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz" @@ -7120,6 +7382,14 @@ is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: get-intrinsic "^1.2.0" is-typed-array "^1.1.10" +is-array-buffer@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" + integrity sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" @@ -7173,6 +7443,13 @@ is-core-module@^2.11.0, is-core-module@^2.13.0, is-core-module@^2.13.1, is-core- dependencies: hasown "^2.0.0" +is-data-view@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.1.tgz#4b4d3a511b70f3dc26d42c03ca9ca515d847759f" + integrity sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w== + dependencies: + is-typed-array "^1.1.13" + is-date-object@^1.0.1, is-date-object@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz" @@ -7236,6 +7513,11 @@ is-negative-zero@^2.0.2: resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz" integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== +is-negative-zero@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" + integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== + is-node-process@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/is-node-process/-/is-node-process-1.2.0.tgz#ea02a1b90ddb3934a19aea414e88edef7e11d134" @@ -7305,6 +7587,13 @@ is-shared-array-buffer@^1.0.2: dependencies: call-bind "^1.0.2" +is-shared-array-buffer@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz#1237f1cba059cdb62431d378dcc37d9680181688" + integrity sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg== + dependencies: + call-bind "^1.0.7" + is-ssh@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/is-ssh/-/is-ssh-1.4.0.tgz" @@ -7350,6 +7639,13 @@ is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.9: dependencies: which-typed-array "^1.1.11" +is-typed-array@^1.1.13: + version "1.1.13" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" + integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== + dependencies: + which-typed-array "^1.1.14" + is-unicode-supported@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz" @@ -8096,6 +8392,13 @@ minimatch@3.0.5: dependencies: brace-expansion "^1.1.7" +minimatch@9.0.3, minimatch@^9.0.0, minimatch@^9.0.1: + version "9.0.3" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz" + integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== + dependencies: + brace-expansion "^2.0.1" + minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" @@ -8124,13 +8427,6 @@ minimatch@^8.0.2: dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.0, minimatch@^9.0.1: - version "9.0.3" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz" - integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== - dependencies: - brace-expansion "^2.0.1" - minimist-options@4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz" @@ -8330,11 +8626,6 @@ nanoid@^5.0.6: resolved "https://registry.npmjs.org/nanoid/-/nanoid-5.0.6.tgz#7f99a033aa843e4dcf9778bdaec5eb02f4dc44d5" integrity sha512-rRq0eMHoGZxlvaFOUdK1Ev83Bd1IgzzR+WJ3IbDJ7QOSdAxYjlurSPqFs9s4lJg29RT6nPwizFtJhQS6V5xgiA== -natural-compare-lite@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz" - integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== - natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" @@ -8720,7 +9011,17 @@ object.assign@^4.1.2, object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" -object.entries@^1.1.5, object.entries@^1.1.6, object.entries@^1.1.7: +object.assign@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" + integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== + dependencies: + call-bind "^1.0.5" + define-properties "^1.2.1" + has-symbols "^1.0.3" + object-keys "^1.1.1" + +object.entries@^1.1.5, object.entries@^1.1.7: version "1.1.7" resolved "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz" integrity sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA== @@ -8729,7 +9030,7 @@ object.entries@^1.1.5, object.entries@^1.1.6, object.entries@^1.1.7: define-properties "^1.2.0" es-abstract "^1.22.1" -object.fromentries@^2.0.6, object.fromentries@^2.0.7: +object.fromentries@^2.0.7: version "2.0.7" resolved "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz" integrity sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA== @@ -8748,13 +9049,14 @@ object.groupby@^1.0.1: es-abstract "^1.22.1" get-intrinsic "^1.2.1" -object.hasown@^1.1.2: - version "1.1.3" - resolved "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.3.tgz" - integrity sha512-fFI4VcYpRHvSLXxP7yiZOMAd331cPfd2p7PFDVbgUsYOfCT3tICVqXWngbjr4m49OvsBwUBQ6O2uQoJvy3RexA== +object.hasown@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.4.tgz#e270ae377e4c120cdcb7656ce66884a6218283dc" + integrity sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg== dependencies: - define-properties "^1.2.0" - es-abstract "^1.22.1" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" object.values@^1.1.6, object.values@^1.1.7: version "1.1.7" @@ -9200,6 +9502,11 @@ playwright@1.39.0, playwright@^1.39.0: optionalDependencies: fsevents "2.3.2" +possible-typed-array-names@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" + integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== + postcss-modules-extract-imports@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz" @@ -9664,7 +9971,7 @@ regenerator-transform@^0.15.2: dependencies: "@babel/runtime" "^7.8.4" -regexp.prototype.flags@^1.5.0, regexp.prototype.flags@^1.5.1: +regexp.prototype.flags@^1.5.1: version "1.5.1" resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz" integrity sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg== @@ -9673,6 +9980,16 @@ regexp.prototype.flags@^1.5.0, regexp.prototype.flags@^1.5.1: define-properties "^1.2.0" set-function-name "^2.0.0" +regexp.prototype.flags@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" + integrity sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw== + dependencies: + call-bind "^1.0.6" + define-properties "^1.2.1" + es-errors "^1.3.0" + set-function-name "^2.0.1" + regexpu-core@^5.3.1: version "5.3.2" resolved "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz" @@ -9754,9 +10071,9 @@ resolve@^1.10.0, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.4: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^2.0.0-next.4: +resolve@^2.0.0-next.5: version "2.0.0-next.5" - resolved "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.5.tgz#6b0ec3107e671e52b68cd068ef327173b90dc03c" integrity sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA== dependencies: is-core-module "^2.13.0" @@ -9854,6 +10171,16 @@ safe-array-concat@^1.0.1: has-symbols "^1.0.3" isarray "^2.0.5" +safe-array-concat@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb" + integrity sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q== + dependencies: + call-bind "^1.0.7" + get-intrinsic "^1.2.4" + has-symbols "^1.0.3" + isarray "^2.0.5" + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" @@ -9873,6 +10200,15 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.1.3" is-regex "^1.1.4" +safe-regex-test@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" + integrity sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-regex "^1.1.4" + "safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.1.0: version "2.1.2" resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" @@ -9941,6 +10277,13 @@ semver@^7.0.0, semver@^7.1.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semve dependencies: lru-cache "^6.0.0" +semver@^7.5.4: + version "7.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== + dependencies: + lru-cache "^6.0.0" + send@0.18.0: version "0.18.0" resolved "https://registry.npmjs.org/send/-/send-0.18.0.tgz" @@ -10005,6 +10348,18 @@ set-function-length@^1.1.1: gopd "^1.0.1" has-property-descriptors "^1.0.0" +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + set-function-name@^2.0.0, set-function-name@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz" @@ -10014,6 +10369,16 @@ set-function-name@^2.0.0, set-function-name@^2.0.1: functions-have-names "^1.2.3" has-property-descriptors "^1.0.0" +set-function-name@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" + integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.2" + setprototypeof@1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz" @@ -10070,6 +10435,16 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" +side-channel@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + signal-exit@3.0.7, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" @@ -10290,16 +10665,7 @@ strict-uri-encode@^2.0.0: resolved "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz" integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -10317,20 +10683,23 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" -string.prototype.matchall@^4.0.8: - version "4.0.10" - resolved "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz" - integrity sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ== +string.prototype.matchall@^4.0.10: + version "4.0.11" + resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz#1092a72c59268d2abaad76582dccc687c0297e0a" + integrity sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - get-intrinsic "^1.2.1" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.4" + gopd "^1.0.1" has-symbols "^1.0.3" - internal-slot "^1.0.5" - regexp.prototype.flags "^1.5.0" - set-function-name "^2.0.0" - side-channel "^1.0.4" + internal-slot "^1.0.7" + regexp.prototype.flags "^1.5.2" + set-function-name "^2.0.2" + side-channel "^1.0.6" string.prototype.trim@^1.2.8: version "1.2.8" @@ -10341,6 +10710,16 @@ string.prototype.trim@^1.2.8: define-properties "^1.2.0" es-abstract "^1.22.1" +string.prototype.trim@^1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4" + integrity sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.0" + es-object-atoms "^1.0.0" + string.prototype.trimend@^1.0.7: version "1.0.7" resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz" @@ -10350,6 +10729,15 @@ string.prototype.trimend@^1.0.7: define-properties "^1.2.0" es-abstract "^1.22.1" +string.prototype.trimend@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz#3651b8513719e8a9f48de7f2f77640b26652b229" + integrity sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + string.prototype.trimstart@^1.0.7: version "1.0.7" resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz" @@ -10359,6 +10747,15 @@ string.prototype.trimstart@^1.0.7: define-properties "^1.2.0" es-abstract "^1.22.1" +string.prototype.trimstart@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" + integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" @@ -10373,14 +10770,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": - version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -10660,6 +11050,11 @@ trim-newlines@^3.0.0: resolved "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz" integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== +ts-api-utils@^1.0.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" + integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== + ts-loader@^9.5.1: version "9.5.1" resolved "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.1.tgz" @@ -10671,10 +11066,10 @@ ts-loader@^9.5.1: semver "^7.3.4" source-map "^0.7.4" -tsconfig-paths@^3.14.2: - version "3.14.2" - resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz" - integrity sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g== +tsconfig-paths@^3.15.0: + version "3.15.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" + integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== dependencies: "@types/json5" "^0.0.29" json5 "^1.0.2" @@ -10695,7 +11090,7 @@ tslib@2.4.0: resolved "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== -tslib@^1.11.1, tslib@^1.8.1: +tslib@^1.11.1: version "1.14.1" resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -10705,13 +11100,6 @@ tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1, tslib@^2.4 resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - tuf-js@^1.1.7: version "1.1.7" resolved "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.7.tgz" @@ -10790,6 +11178,15 @@ typed-array-buffer@^1.0.0: get-intrinsic "^1.2.1" is-typed-array "^1.1.10" +typed-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" + integrity sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + is-typed-array "^1.1.13" + typed-array-byte-length@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz" @@ -10800,6 +11197,17 @@ typed-array-byte-length@^1.0.0: has-proto "^1.0.1" is-typed-array "^1.1.10" +typed-array-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz#d92972d3cff99a3fa2e765a28fcdc0f1d89dec67" + integrity sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + typed-array-byte-offset@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz" @@ -10811,6 +11219,18 @@ typed-array-byte-offset@^1.0.0: has-proto "^1.0.1" is-typed-array "^1.1.10" +typed-array-byte-offset@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz#f9ec1acb9259f395093e4567eb3c28a580d02063" + integrity sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + typed-array-length@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz" @@ -10820,6 +11240,18 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" +typed-array-length@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.6.tgz#57155207c76e64a3457482dfdc1c9d1d3c4c73a3" + integrity sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + possible-typed-array-names "^1.0.0" + typedarray@^0.0.6: version "0.0.6" resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" @@ -11273,6 +11705,17 @@ which-typed-array@^1.1.11, which-typed-array@^1.1.13, which-typed-array@^1.1.9: gopd "^1.0.1" has-tostringtag "^1.0.0" +which-typed-array@^1.1.14, which-typed-array@^1.1.15: + version "1.1.15" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" + integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.2" + which@^2.0.1, which@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" @@ -11304,7 +11747,7 @@ wordwrap@^1.0.0: resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -11322,15 +11765,6 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz" From 272cd4d0c686445ad1c293ffde32fc83dfecfe56 Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Wed, 3 Apr 2024 07:18:38 +0400 Subject: [PATCH 05/29] Revert breaking changes on postMessage interface --- .../src/components/Sign/Sign.tsx | 30 +++++++++++++------ .../src/lib/controller.ts | 7 +---- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx b/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx index d57faea0..298eec96 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx +++ b/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx @@ -66,6 +66,11 @@ interface TransactionDetails { actions: transaction.Action[]; } +enum SignMethod { + SIGN_DELEGATE = 'SIGN_DELEGATE', + SIGN_TRANSACTION = 'SIGN_TRANSACTION', +} + export const calculateGasLimit = (actions) => actions .filter((a) => Object.keys(a)[0] === 'functionCall') .map((a) => a.functionCall.gas) @@ -77,7 +82,7 @@ function Sign() { // Send form height to modal if in iframe useIframeDialogConfig({ element: signTransactionRef.current, - onClose: () => window.parent.postMessage({ signedDelegates: '', error: 'User cancelled action' }, '*') + onClose: () => window.parent.postMessage({ signedTransactions: '', signedDelegates: '', error: 'User cancelled action' }, '*') }); const { loading: firebaseUserLoading, user: firebaseUser } = useFirebaseUser(); const [inFlight, setInFlight] = useState(false); @@ -88,6 +93,12 @@ function Sign() { const url = new URL(searchParams.get('success_url') || searchParams.get('failure_url')); return url.origin; }, [searchParams]); + + const signMethodParam = searchParams.get('sign_method'); + const signMethod = signMethodParam in SignMethod + ? SignMethod[signMethodParam as keyof typeof SignMethod] + : SignMethod.SIGN_DELEGATE; + const [transactionDetails, setTransactionDetails] = useState({ signerId: '', receiverId: '', @@ -132,7 +143,9 @@ function Sign() { }); } catch (err) { if (inIframe()) { - window.parent.postMessage({ signedDelegates: '', error: err.message, code: err.code }, '*'); + window.parent.postMessage({ + signedTransactions: '', signedDelegates: '', error: err.message, code: err.code + }, '*'); setError(err.message); } else { const failure_url = isUrlNotJavascriptProtocol(searchParams.get('failure_url')) && searchParams.get('failure_url'); @@ -183,7 +196,7 @@ function Sign() { if (isUserAuthenticated !== true) { const errorMessage = 'You are not authenticated or there has been an indexer failure'; setError(errorMessage); - window.parent.postMessage({ signedDelegates: '', signedTransactions: '', error: errorMessage }, '*'); + window.parent.postMessage({ signedTransactions: '', signedDelegates: '', error: errorMessage }, '*'); setInFlight(false); return; } @@ -193,8 +206,7 @@ function Sign() { // This need to run sequentially due to nonce issues. for (let i = 0; i < transactionDetails.transactions.length; i += 1) { try { - // eslint-disable-next-line no-await-in-loop - if (parseFloat((await window.fastAuthController.getBalance()).available) > 0) { + if (signMethod === SignMethod.SIGN_TRANSACTION) { // eslint-disable-next-line no-await-in-loop const signed = (await window.fastAuthController.signTransaction( transactionDetails.transactions[i] @@ -203,13 +215,14 @@ function Sign() { 'base64' ); signedTransactions.push(base64); - } else { + } else if (signMethod === SignMethod.SIGN_DELEGATE) { // eslint-disable-next-line no-await-in-loop const signed = await window.fastAuthController.signDelegateAction( transactionDetails.transactions[i] ); const base64 = Buffer.from(encodeSignedDelegate(signed)).toString( 'base64' + ); signedDelegates.push(base64); } @@ -217,7 +230,7 @@ function Sign() { if (inIframe()) { setError(`An error occurred: ${err.message}`); setInFlight(false); - window.parent.postMessage({ signedDelegates: '', signedTransactions: '', error: err.message }, '*'); + window.parent.postMessage({ signedTransactions: '', signedDelegates: '', error: err.message }, '*'); } else { const failure_url = searchParams.get('failure_url'); redirectWithError({ success_url, failure_url, error: err }); @@ -226,10 +239,9 @@ function Sign() { } } if (inIframe()) { - window.parent.postMessage({ signedDelegates: signedDelegates.join(','), signedTransactions: signedTransactions.join(',') }, '*'); + window.parent.postMessage({ signedTransactions: signedTransactions.join(','), signedDelegates: signedDelegates.join(',') }, '*'); } else { const parsedUrl = new URL(success_url || window.location.origin + (basePath ? `/${basePath}` : '')); - parsedUrl.searchParams.set('signedDelegates', signedDelegates.join(',')); parsedUrl.searchParams.set('signedTransactions', signedTransactions.join(',')); window.location.replace(parsedUrl.href); } diff --git a/packages/near-fast-auth-signer/src/lib/controller.ts b/packages/near-fast-auth-signer/src/lib/controller.ts index defa1d4c..6a982894 100644 --- a/packages/near-fast-auth-signer/src/lib/controller.ts +++ b/packages/near-fast-auth-signer/src/lib/controller.ts @@ -1,4 +1,4 @@ -import { Account, AccountBalance, Connection } from '@near-js/accounts'; +import { Account, Connection } from '@near-js/accounts'; import { createKey, getKeys, isPassKeyAvailable } from '@near-js/biometric-ed25519'; import { KeyPair, KeyPairEd25519, KeyType, PublicKey @@ -209,11 +209,6 @@ class FastAuthController { return signedDelegate; } - async getBalance(): Promise { - const account = new Account(this.connection, this.accountId); - return account.getAccountBalance(); - } - async signTransaction({ receiverId, actions, signerId }: { receiverId: string; actions: Action[]; signerId: string }): Promise<[Uint8Array, SignedTransaction]> { From de52fa25f25255aafcb0cc8caaa50aca5299a491 Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Thu, 4 Apr 2024 06:59:42 +0400 Subject: [PATCH 06/29] Make Sign more flexible --- .../src/components/Sign/Sign.tsx | 24 ++++++++++++------- .../src/lib/controller.ts | 5 ++++ .../src/utils/constants.ts | 3 +++ 3 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 packages/near-fast-auth-signer/src/utils/constants.ts diff --git a/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx b/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx index 298eec96..c0d767e2 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx +++ b/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx @@ -2,7 +2,8 @@ import { encodeSignedDelegate, encodeTransaction } from '@near-js/transactions'; import BN from 'bn.js'; import { utils, transactions as transaction } from 'near-api-js'; import React, { - useEffect, useRef, useMemo, useState + useEffect, useRef, useMemo, useState, + useCallback } from 'react'; import { useSearchParams } from 'react-router-dom'; @@ -22,6 +23,7 @@ import { Button } from '../../lib/Button'; import { inIframe, isUrlNotJavascriptProtocol, redirectWithError } from '../../utils'; import { basePath, network } from '../../utils/config'; import TableContent from '../TableContent/TableContent'; +import { NEAR_MAX_GAS } from '../../utils/constants'; const formatActionType = (action: string) => { switch (action) { @@ -93,11 +95,18 @@ function Sign() { const url = new URL(searchParams.get('success_url') || searchParams.get('failure_url')); return url.origin; }, [searchParams]); + const signMethodParams = searchParams.get('sign_method') - const signMethodParam = searchParams.get('sign_method'); - const signMethod = signMethodParam in SignMethod - ? SignMethod[signMethodParam as keyof typeof SignMethod] - : SignMethod.SIGN_DELEGATE; + const getSignMethod = useCallback( async (signMethodParam: string | null) => { + if (signMethodParam && signMethodParam in SignMethod) { + return SignMethod[signMethodParam as keyof typeof SignMethod]; + } else { + const balance = await window.fastAuthController.getAccountBalance(); + return new BN(balance.available) >= NEAR_MAX_GAS + ? SignMethod.SIGN_TRANSACTION + : SignMethod.SIGN_DELEGATE; + } + }, []); const [transactionDetails, setTransactionDetails] = useState({ signerId: '', @@ -206,7 +215,7 @@ function Sign() { // This need to run sequentially due to nonce issues. for (let i = 0; i < transactionDetails.transactions.length; i += 1) { try { - if (signMethod === SignMethod.SIGN_TRANSACTION) { + if (await getSignMethod(signMethodParams) === SignMethod.SIGN_TRANSACTION) { // eslint-disable-next-line no-await-in-loop const signed = (await window.fastAuthController.signTransaction( transactionDetails.transactions[i] @@ -215,14 +224,13 @@ function Sign() { 'base64' ); signedTransactions.push(base64); - } else if (signMethod === SignMethod.SIGN_DELEGATE) { + } else if (await getSignMethod(signMethodParams) === SignMethod.SIGN_DELEGATE) { // eslint-disable-next-line no-await-in-loop const signed = await window.fastAuthController.signDelegateAction( transactionDetails.transactions[i] ); const base64 = Buffer.from(encodeSignedDelegate(signed)).toString( 'base64' - ); signedDelegates.push(base64); } diff --git a/packages/near-fast-auth-signer/src/lib/controller.ts b/packages/near-fast-auth-signer/src/lib/controller.ts index 6a982894..7ffb629b 100644 --- a/packages/near-fast-auth-signer/src/lib/controller.ts +++ b/packages/near-fast-auth-signer/src/lib/controller.ts @@ -209,6 +209,11 @@ class FastAuthController { return signedDelegate; } + async getAccountBalance() { + const account = new Account(this.connection, this.accountId); + return account.getAccountBalance(); + } + async signTransaction({ receiverId, actions, signerId }: { receiverId: string; actions: Action[]; signerId: string }): Promise<[Uint8Array, SignedTransaction]> { diff --git a/packages/near-fast-auth-signer/src/utils/constants.ts b/packages/near-fast-auth-signer/src/utils/constants.ts new file mode 100644 index 00000000..a2c43074 --- /dev/null +++ b/packages/near-fast-auth-signer/src/utils/constants.ts @@ -0,0 +1,3 @@ +import BN from 'bn.js'; + +export const NEAR_MAX_GAS = new BN('300000000000000'); From d46772eef550a6a978efc0b8e34c770021fa76a4 Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Fri, 5 Apr 2024 04:27:16 +0400 Subject: [PATCH 07/29] Update FunctionCall Key allowance --- .../src/components/AddDevice/AddDevice.tsx | 3 ++- .../src/components/AuthCallback/AuthCallback.tsx | 7 ++++--- packages/near-fast-auth-signer/src/utils/constants.ts | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/near-fast-auth-signer/src/components/AddDevice/AddDevice.tsx b/packages/near-fast-auth-signer/src/components/AddDevice/AddDevice.tsx index 89698f7d..87c2bc0f 100644 --- a/packages/near-fast-auth-signer/src/components/AddDevice/AddDevice.tsx +++ b/packages/near-fast-auth-signer/src/components/AddDevice/AddDevice.tsx @@ -25,6 +25,7 @@ import { } from '../../utils'; import { recordEvent } from '../../utils/analytics'; import { basePath } from '../../utils/config'; +import { NEAR_MAX_ALLOWANCE } from '../../utils/constants'; import { checkFirestoreReady, firebaseAuth } from '../../utils/firebase'; import ErrorSvg from '../CreateAccount/icons/ErrorSvg'; import { FormContainer, StyledContainer } from '../Layout'; @@ -226,7 +227,7 @@ function AddDevicePage() { window.fastAuthController.signAndSendAddKey({ contractId: contract_id, methodNames, - allowance: new BN('250000000000000'), + allowance: new BN(NEAR_MAX_ALLOWANCE), publicKey: public_key, }).then((res) => res && res.json()).then((res) => { const failure = res['Receipts Outcome'].find(({ outcome: { status } }) => Object.keys(status).some((k) => k === 'Failure'))?.outcome?.status?.Failure; diff --git a/packages/near-fast-auth-signer/src/components/AuthCallback/AuthCallback.tsx b/packages/near-fast-auth-signer/src/components/AuthCallback/AuthCallback.tsx index ee053849..8adf4f85 100644 --- a/packages/near-fast-auth-signer/src/components/AuthCallback/AuthCallback.tsx +++ b/packages/near-fast-auth-signer/src/components/AuthCallback/AuthCallback.tsx @@ -13,6 +13,7 @@ import { decodeIfTruthy, inIframe, isUrlNotJavascriptProtocol, redirectWithError } from '../../utils'; import { basePath, networkId } from '../../utils/config'; +import { NEAR_MAX_ALLOWANCE } from '../../utils/constants'; import { checkFirestoreReady, firebaseAuth } from '../../utils/firebase'; import { getAddKeyAction, getAddLAKAction @@ -45,7 +46,7 @@ const onCreateAccount = async ({ limitedAccessKeys: public_key_lak ? [{ public_key: public_key_lak, receiver_id: contract_id, - allowance: '250000000000000', + allowance: NEAR_MAX_ALLOWANCE, method_names: methodNames ?? '', }] : [], accessToken, @@ -109,13 +110,13 @@ export const onSignIn = async ({ publicKeyLak: public_key_lak, contractId: contract_id, methodNames, - allowance: new BN('250000000000000'), + allowance: new BN(NEAR_MAX_ALLOWANCE), }) : getAddKeyAction({ publicKeyLak: public_key_lak, webAuthNPublicKey: publicKeyFak, contractId: contract_id, methodNames, - allowance: new BN('250000000000000'), + allowance: new BN(NEAR_MAX_ALLOWANCE), }); return (window as any).fastAuthController.signAndSendActionsWithRecoveryKey({ diff --git a/packages/near-fast-auth-signer/src/utils/constants.ts b/packages/near-fast-auth-signer/src/utils/constants.ts index a2c43074..60874578 100644 --- a/packages/near-fast-auth-signer/src/utils/constants.ts +++ b/packages/near-fast-auth-signer/src/utils/constants.ts @@ -1,3 +1,4 @@ import BN from 'bn.js'; export const NEAR_MAX_GAS = new BN('300000000000000'); +export const NEAR_MAX_ALLOWANCE = '250000000000000000000000'; From e09b860cee9461b8fc4212bd845728cc9c3df443 Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Fri, 19 Apr 2024 22:06:19 +0400 Subject: [PATCH 08/29] Fix lint --- .../src/components/Sign/Sign.tsx | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx b/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx index c0d767e2..53938943 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx +++ b/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx @@ -22,8 +22,8 @@ import InternetSvg from '../../Images/Internet'; import { Button } from '../../lib/Button'; import { inIframe, isUrlNotJavascriptProtocol, redirectWithError } from '../../utils'; import { basePath, network } from '../../utils/config'; -import TableContent from '../TableContent/TableContent'; import { NEAR_MAX_GAS } from '../../utils/constants'; +import TableContent from '../TableContent/TableContent'; const formatActionType = (action: string) => { switch (action) { @@ -95,18 +95,17 @@ function Sign() { const url = new URL(searchParams.get('success_url') || searchParams.get('failure_url')); return url.origin; }, [searchParams]); - const signMethodParams = searchParams.get('sign_method') + const signMethodParams = searchParams.get('sign_method'); - const getSignMethod = useCallback( async (signMethodParam: string | null) => { - if (signMethodParam && signMethodParam in SignMethod) { - return SignMethod[signMethodParam as keyof typeof SignMethod]; - } else { - const balance = await window.fastAuthController.getAccountBalance(); - return new BN(balance.available) >= NEAR_MAX_GAS - ? SignMethod.SIGN_TRANSACTION - : SignMethod.SIGN_DELEGATE; - } - }, []); + const getSignMethod = useCallback(async (signMethodParam: string | null) => { + if (signMethodParam && signMethodParam in SignMethod) { + return SignMethod[signMethodParam as keyof typeof SignMethod]; + } + const balance = await window.fastAuthController.getAccountBalance(); + return new BN(balance.available) >= NEAR_MAX_GAS + ? SignMethod.SIGN_TRANSACTION + : SignMethod.SIGN_DELEGATE; + }, []); const [transactionDetails, setTransactionDetails] = useState({ signerId: '', From 822b1ffecc159ef9e2cc18712b2257c8d6e177f6 Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Mon, 29 Apr 2024 16:37:18 +0700 Subject: [PATCH 09/29] Retry failed relayed transaction --- .../src/components/Sign/Sign.tsx | 50 +++++-------------- .../src/lib/controller.ts | 5 -- 2 files changed, 13 insertions(+), 42 deletions(-) diff --git a/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx b/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx index 53938943..8c446134 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx +++ b/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx @@ -3,7 +3,6 @@ import BN from 'bn.js'; import { utils, transactions as transaction } from 'near-api-js'; import React, { useEffect, useRef, useMemo, useState, - useCallback } from 'react'; import { useSearchParams } from 'react-router-dom'; @@ -22,7 +21,6 @@ import InternetSvg from '../../Images/Internet'; import { Button } from '../../lib/Button'; import { inIframe, isUrlNotJavascriptProtocol, redirectWithError } from '../../utils'; import { basePath, network } from '../../utils/config'; -import { NEAR_MAX_GAS } from '../../utils/constants'; import TableContent from '../TableContent/TableContent'; const formatActionType = (action: string) => { @@ -68,11 +66,6 @@ interface TransactionDetails { actions: transaction.Action[]; } -enum SignMethod { - SIGN_DELEGATE = 'SIGN_DELEGATE', - SIGN_TRANSACTION = 'SIGN_TRANSACTION', -} - export const calculateGasLimit = (actions) => actions .filter((a) => Object.keys(a)[0] === 'functionCall') .map((a) => a.functionCall.gas) @@ -95,17 +88,6 @@ function Sign() { const url = new URL(searchParams.get('success_url') || searchParams.get('failure_url')); return url.origin; }, [searchParams]); - const signMethodParams = searchParams.get('sign_method'); - - const getSignMethod = useCallback(async (signMethodParam: string | null) => { - if (signMethodParam && signMethodParam in SignMethod) { - return SignMethod[signMethodParam as keyof typeof SignMethod]; - } - const balance = await window.fastAuthController.getAccountBalance(); - return new BN(balance.available) >= NEAR_MAX_GAS - ? SignMethod.SIGN_TRANSACTION - : SignMethod.SIGN_DELEGATE; - }, []); const [transactionDetails, setTransactionDetails] = useState({ signerId: '', @@ -214,25 +196,19 @@ function Sign() { // This need to run sequentially due to nonce issues. for (let i = 0; i < transactionDetails.transactions.length; i += 1) { try { - if (await getSignMethod(signMethodParams) === SignMethod.SIGN_TRANSACTION) { - // eslint-disable-next-line no-await-in-loop - const signed = (await window.fastAuthController.signTransaction( - transactionDetails.transactions[i] - ))[1]; - const base64 = Buffer.from(encodeTransaction(signed)).toString( - 'base64' - ); - signedTransactions.push(base64); - } else if (await getSignMethod(signMethodParams) === SignMethod.SIGN_DELEGATE) { - // eslint-disable-next-line no-await-in-loop - const signed = await window.fastAuthController.signDelegateAction( - transactionDetails.transactions[i] - ); - const base64 = Buffer.from(encodeSignedDelegate(signed)).toString( - 'base64' - ); - signedDelegates.push(base64); - } + const t = transactionDetails.transactions[i]; + + // eslint-disable-next-line no-await-in-loop + const signedTransaction = await window.fastAuthController.signTransaction(t); + const encodedTransaction = encodeTransaction(signedTransaction[1]); + const base64Transaction = Buffer.from(encodedTransaction).toString('base64'); + signedTransactions.push(base64Transaction); + + // eslint-disable-next-line no-await-in-loop + const signedDelegate = await window.fastAuthController.signDelegateAction(t); + const encodedDelegate = encodeSignedDelegate(signedDelegate); + const base64Delegate = Buffer.from(encodedDelegate).toString('base64'); + signedDelegates.push(base64Delegate); } catch (err) { if (inIframe()) { setError(`An error occurred: ${err.message}`); diff --git a/packages/near-fast-auth-signer/src/lib/controller.ts b/packages/near-fast-auth-signer/src/lib/controller.ts index 7ffb629b..6a982894 100644 --- a/packages/near-fast-auth-signer/src/lib/controller.ts +++ b/packages/near-fast-auth-signer/src/lib/controller.ts @@ -209,11 +209,6 @@ class FastAuthController { return signedDelegate; } - async getAccountBalance() { - const account = new Account(this.connection, this.accountId); - return account.getAccountBalance(); - } - async signTransaction({ receiverId, actions, signerId }: { receiverId: string; actions: Action[]; signerId: string }): Promise<[Uint8Array, SignedTransaction]> { From 794bdf131b95fe0453ab4c17d742df382da77143 Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Tue, 30 Apr 2024 18:16:57 +0700 Subject: [PATCH 10/29] Run signature in parallel --- .../src/components/Sign/Sign.tsx | 24 +++++++++++-------- .../src/utils/constants.ts | 3 --- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx b/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx index 8c446134..51d04b71 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx +++ b/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx @@ -196,19 +196,23 @@ function Sign() { // This need to run sequentially due to nonce issues. for (let i = 0; i < transactionDetails.transactions.length; i += 1) { try { - const t = transactionDetails.transactions[i]; + const signPromises = transactionDetails.transactions.map(async (t) => { + const [signedTransaction, signedDelegate] = await Promise.all([ + window.fastAuthController.signTransaction(t), + window.fastAuthController.signDelegateAction(t) + ]); - // eslint-disable-next-line no-await-in-loop - const signedTransaction = await window.fastAuthController.signTransaction(t); - const encodedTransaction = encodeTransaction(signedTransaction[1]); - const base64Transaction = Buffer.from(encodedTransaction).toString('base64'); - signedTransactions.push(base64Transaction); + const encodedTransaction = encodeTransaction(signedTransaction[1]); + const base64Transaction = Buffer.from(encodedTransaction).toString('base64'); + signedTransactions.push(base64Transaction); + + const encodedDelegate = encodeSignedDelegate(signedDelegate); + const base64Delegate = Buffer.from(encodedDelegate).toString('base64'); + signedDelegates.push(base64Delegate); + }); // eslint-disable-next-line no-await-in-loop - const signedDelegate = await window.fastAuthController.signDelegateAction(t); - const encodedDelegate = encodeSignedDelegate(signedDelegate); - const base64Delegate = Buffer.from(encodedDelegate).toString('base64'); - signedDelegates.push(base64Delegate); + await Promise.all(signPromises); } catch (err) { if (inIframe()) { setError(`An error occurred: ${err.message}`); diff --git a/packages/near-fast-auth-signer/src/utils/constants.ts b/packages/near-fast-auth-signer/src/utils/constants.ts index 60874578..cd924355 100644 --- a/packages/near-fast-auth-signer/src/utils/constants.ts +++ b/packages/near-fast-auth-signer/src/utils/constants.ts @@ -1,4 +1 @@ -import BN from 'bn.js'; - -export const NEAR_MAX_GAS = new BN('300000000000000'); export const NEAR_MAX_ALLOWANCE = '250000000000000000000000'; From 3505d38a997c4c62ee1cba048177b8270239c1fe Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Thu, 2 May 2024 14:55:35 +0700 Subject: [PATCH 11/29] Fix conflicts on .lock file --- yarn.lock | 5 ----- 1 file changed, 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index d1b322ed..9ffa770e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11294,11 +11294,6 @@ tslib@2.4.0: resolved "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== -tslib@^1.8.1: - version "1.14.1" - resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0, tslib@^2.5.0, tslib@^2.6.1, tslib@^2.6.2: version "2.6.2" resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz" From a250e07a30c185a9994d4882bb25fdf1dcbc59c2 Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Fri, 17 May 2024 21:22:40 +0700 Subject: [PATCH 12/29] Split signDelegate and signTransaction paths --- packages/near-fast-auth-signer/src/App.tsx | 6 +- .../Sign/{Sign.tsx => SignTemplate.tsx} | 57 ++++++++++++------- 2 files changed, 40 insertions(+), 23 deletions(-) rename packages/near-fast-auth-signer/src/components/Sign/{Sign.tsx => SignTemplate.tsx} (85%) diff --git a/packages/near-fast-auth-signer/src/App.tsx b/packages/near-fast-auth-signer/src/App.tsx index de139da5..d57885db 100644 --- a/packages/near-fast-auth-signer/src/App.tsx +++ b/packages/near-fast-auth-signer/src/App.tsx @@ -12,7 +12,7 @@ import Devices from './components/Devices/Devices'; import Login from './components/Login/Login'; import RemoveTrailingSlash from './components/RemoveTrailingSlash/RemoveTrailingSlash'; import RpcRoute from './components/RpcRoute/RpcRoute'; -import Sign from './components/Sign/Sign'; +import SignTemplate from './components/Sign/SignTemplate'; import SignMultichain from './components/SignMultichain/SignMultichain'; import VerifyEmailPage from './components/VerifyEmail/verify-email'; import FastAuthController from './lib/controller'; @@ -67,7 +67,9 @@ export default function App() { } /> } /> } /> - } /> + {/* TODO: change the path for the delegates it's a breaking change that need to be done in sync with integrators */} + } /> + } /> {/* TODO: This isn't available on mainnet, and isn't production ready, clean the code for production release */} {environment.NETWORK_ID === 'testnet' && } />} } /> diff --git a/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx b/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx similarity index 85% rename from packages/near-fast-auth-signer/src/components/Sign/Sign.tsx rename to packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx index 51d04b71..b49b2644 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/Sign.tsx +++ b/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx @@ -66,13 +66,17 @@ interface TransactionDetails { actions: transaction.Action[]; } -export const calculateGasLimit = (actions) => actions +export const calculateGasLimit = (actions: Array<{ functionCall?: { gas: BN } }>): string => actions .filter((a) => Object.keys(a)[0] === 'functionCall') - .map((a) => a.functionCall.gas) + .map((a) => a.functionCall!.gas) .reduce((totalGas, gas) => totalGas.add(gas), new BN(0)).div(new BN('1000000000000')) .toString(); -function Sign() { +type SignTemplateProps = { + signMethod: 'transaction' | 'delegate' +} + +function SignTemplate({ signMethod }: SignTemplateProps) { const signTransactionRef = useRef(null); // Send form height to modal if in iframe useIframeDialogConfig({ @@ -190,25 +194,26 @@ function Sign() { setInFlight(false); return; } + const signedTransactions = []; const signedDelegates = []; const success_url = isUrlNotJavascriptProtocol(searchParams.get('success_url')) && searchParams.get('success_url'); + // This need to run sequentially due to nonce issues. for (let i = 0; i < transactionDetails.transactions.length; i += 1) { try { const signPromises = transactionDetails.transactions.map(async (t) => { - const [signedTransaction, signedDelegate] = await Promise.all([ - window.fastAuthController.signTransaction(t), - window.fastAuthController.signDelegateAction(t) - ]); - - const encodedTransaction = encodeTransaction(signedTransaction[1]); - const base64Transaction = Buffer.from(encodedTransaction).toString('base64'); - signedTransactions.push(base64Transaction); - - const encodedDelegate = encodeSignedDelegate(signedDelegate); - const base64Delegate = Buffer.from(encodedDelegate).toString('base64'); - signedDelegates.push(base64Delegate); + if (signMethod === 'transaction') { + const signedTransaction = await window.fastAuthController.signTransaction(t); + const encodedTransaction = encodeTransaction(signedTransaction[1]); + const base64Transaction = Buffer.from(encodedTransaction).toString('base64'); + signedTransactions.push(base64Transaction); + } else if (signMethod === 'delegate') { + const signedDelegate = await window.fastAuthController.signDelegateAction(t); + const encodedDelegate = encodeSignedDelegate(signedDelegate); + const base64Delegate = Buffer.from(encodedDelegate).toString('base64'); + signedDelegates.push(base64Delegate); + } }); // eslint-disable-next-line no-await-in-loop @@ -225,11 +230,20 @@ function Sign() { return; } } + if (inIframe()) { - window.parent.postMessage({ signedTransactions: signedTransactions.join(','), signedDelegates: signedDelegates.join(',') }, '*'); + if (signMethod === 'transaction') { + window.parent.postMessage({ signedTransactions: signedTransactions.join(','), signedDelegates: '' }, '*'); + } else if (signMethod === 'delegate') { + window.parent.postMessage({ signedTransactions: '', signedDelegates: signedDelegates.join(',') }, '*'); + } } else { const parsedUrl = new URL(success_url || window.location.origin + (basePath ? `/${basePath}` : '')); - parsedUrl.searchParams.set('signedTransactions', signedTransactions.join(',')); + if (signMethod === 'transaction') { + parsedUrl.searchParams.set('signedTransactions', signedTransactions.join(',')); + } else if (signMethod === 'delegate') { + parsedUrl.searchParams.set('signedDelegates', signedDelegates.join(',')); + } window.location.replace(parsedUrl.href); } @@ -243,12 +257,15 @@ function Sign() {
{callbackUrl}

Confirm transaction

-
{callbackUrl || 'Unknown App'}
+
+ {signMethod === 'transaction' &&

You will be responsible for paying the gas fees.

} + {signMethod === 'delegate' &&

The relayer will cover the gas fees for you.

} +
Actions {transactionDetails.actions.map((action, i) => ( Date: Fri, 17 May 2024 21:24:12 +0700 Subject: [PATCH 13/29] Update yarn file --- yarn.lock | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/yarn.lock b/yarn.lock index d92346f5..764cc1bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -143,6 +143,27 @@ json5 "^2.2.3" semver "^6.3.1" +"@babel/core@^7.23.5": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.5.tgz#15ab5b98e101972d171aeef92ac70d8d6718f06a" + integrity sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.24.2" + "@babel/generator" "^7.24.5" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-module-transforms" "^7.24.5" + "@babel/helpers" "^7.24.5" + "@babel/parser" "^7.24.5" + "@babel/template" "^7.24.0" + "@babel/traverse" "^7.24.5" + "@babel/types" "^7.24.5" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + "@babel/eslint-parser@^7.24.1": version "7.24.1" resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.24.1.tgz#e27eee93ed1d271637165ef3a86e2b9332395c32" From f7852ae899874eeb1e6882bf3a38021ca1e3830e Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Fri, 17 May 2024 21:35:07 +0700 Subject: [PATCH 14/29] Change eslint-plugin-jsx-a11y version --- packages/near-fast-auth-signer/package.json | 3 +- yarn.lock | 129 ++++++++++---------- 2 files changed, 65 insertions(+), 67 deletions(-) diff --git a/packages/near-fast-auth-signer/package.json b/packages/near-fast-auth-signer/package.json index 015a2140..a93b8ede 100644 --- a/packages/near-fast-auth-signer/package.json +++ b/packages/near-fast-auth-signer/package.json @@ -52,6 +52,7 @@ "crypto-browserify": "^3.12.0", "data-loader": "^3.8.4", "debug": "^4.3.4", + "eslint-plugin-jsx-a11y": "6.7.1", "ethers": "^6.11.1", "firebase": "^10.1.0", "https-browserify": "^1.0.0", @@ -106,7 +107,7 @@ "eslint-config-airbnb": "^19.0.4", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", - "eslint-plugin-jsx-a11y": "^6.8.0", + "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-react": "^7.34.1", "eslint-plugin-react-hooks": "^4.6.0", "file-loader": "^6.2.0", diff --git a/yarn.lock b/yarn.lock index 764cc1bf..3c8eca6d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4421,9 +4421,9 @@ argparse@^2.0.1: resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -aria-query@^5.3.0: +aria-query@^5.1.3: version "5.3.0" - resolved "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.0.tgz#650c569e41ad90b51b3d7df5e5eed1c7549c103e" integrity sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A== dependencies: dequal "^2.0.3" @@ -4518,7 +4518,7 @@ array.prototype.flat@^1.3.1, array.prototype.flat@^1.3.2: es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" -array.prototype.flatmap@^1.3.2: +array.prototype.flatmap@^1.3.1, array.prototype.flatmap@^1.3.2: version "1.3.2" resolved "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz" integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== @@ -4610,23 +4610,16 @@ asn1js@^3.0.1, asn1js@^3.0.5, asn1js@~3.0.2: pvutils "^1.1.3" tslib "^2.4.0" -ast-types-flow@^0.0.8: - version "0.0.8" - resolved "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz" - integrity sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ== +ast-types-flow@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" + integrity sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag== async@^3.2.3: version "3.2.5" resolved "https://registry.npmjs.org/async/-/async-3.2.5.tgz" integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== -asynciterator.prototype@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz" - integrity sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg== - dependencies: - has-symbols "^1.0.3" - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" @@ -4644,10 +4637,10 @@ available-typed-arrays@^1.0.7: dependencies: possible-typed-array-names "^1.0.0" -axe-core@=4.7.0: - version "4.7.0" - resolved "https://registry.npmjs.org/axe-core/-/axe-core-4.7.0.tgz" - integrity sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ== +axe-core@^4.6.2: + version "4.9.1" + resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.9.1.tgz#fcd0f4496dad09e0c899b44f6c4bb7848da912ae" + integrity sha512-QbUdXJVTpvUTHU7871ppZkdOLBeGUKBQWHkHrvN2V9IQWGMt61zf3B45BtzjxEJzYuj0JBjBZP/hmYS/R9pmAw== axios@^1.0.0: version "1.6.1" @@ -4667,9 +4660,9 @@ axios@^1.6.8: form-data "^4.0.0" proxy-from-env "^1.1.0" -axobject-query@^3.2.1: +axobject-query@^3.1.1: version "3.2.1" - resolved "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz" + resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.2.1.tgz#39c378a6e3b06ca679f29138151e45b2b32da62a" integrity sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg== dependencies: dequal "^2.0.3" @@ -6402,26 +6395,6 @@ es-errors@^1.1.0, es-errors@^1.2.1, es-errors@^1.3.0: resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== -es-iterator-helpers@^1.0.15: - version "1.0.15" - resolved "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.15.tgz" - integrity sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g== - dependencies: - asynciterator.prototype "^1.0.0" - call-bind "^1.0.2" - define-properties "^1.2.1" - es-abstract "^1.22.1" - es-set-tostringtag "^2.0.1" - function-bind "^1.1.1" - get-intrinsic "^1.2.1" - globalthis "^1.0.3" - has-property-descriptors "^1.0.0" - has-proto "^1.0.1" - has-symbols "^1.0.3" - internal-slot "^1.0.5" - iterator.prototype "^1.1.2" - safe-array-concat "^1.0.1" - es-iterator-helpers@^1.0.17: version "1.0.18" resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.0.18.tgz#4d3424f46b24df38d064af6fbbc89274e29ea69d" @@ -6579,27 +6552,27 @@ eslint-plugin-import@^2.29.1: semver "^6.3.1" tsconfig-paths "^3.15.0" -eslint-plugin-jsx-a11y@^6.8.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.8.0.tgz#2fa9c701d44fcd722b7c771ec322432857fcbad2" - integrity sha512-Hdh937BS3KdwwbBaKd5+PLCOmYY6U4f2h9Z2ktwtNKvIdIEu137rjYbcb9ApSbVJfWxANNuiKTD/9tOKjK9qOA== +eslint-plugin-jsx-a11y@6.7.1: + version "6.7.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.7.1.tgz#fca5e02d115f48c9a597a6894d5bcec2f7a76976" + integrity sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA== dependencies: - "@babel/runtime" "^7.23.2" - aria-query "^5.3.0" - array-includes "^3.1.7" - array.prototype.flatmap "^1.3.2" - ast-types-flow "^0.0.8" - axe-core "=4.7.0" - axobject-query "^3.2.1" + "@babel/runtime" "^7.20.7" + aria-query "^5.1.3" + array-includes "^3.1.6" + array.prototype.flatmap "^1.3.1" + ast-types-flow "^0.0.7" + axe-core "^4.6.2" + axobject-query "^3.1.1" damerau-levenshtein "^1.0.8" emoji-regex "^9.2.2" - es-iterator-helpers "^1.0.15" - hasown "^2.0.0" - jsx-ast-utils "^3.3.5" - language-tags "^1.0.9" + has "^1.0.3" + jsx-ast-utils "^3.3.3" + language-tags "=1.0.5" minimatch "^3.1.2" - object.entries "^1.1.7" - object.fromentries "^2.0.7" + object.entries "^1.1.6" + object.fromentries "^2.0.6" + semver "^6.3.0" eslint-plugin-react-hooks@^4.6.0: version "4.6.0" @@ -7164,7 +7137,7 @@ fsevents@~2.3.2: resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== -function-bind@^1.1.1, function-bind@^1.1.2: +function-bind@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== @@ -7555,6 +7528,11 @@ has-unicode@2.0.1, has-unicode@^2.0.1: resolved "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz" integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== +has@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.4.tgz#2eb2860e000011dae4f1406a86fe80e530fb2ec6" + integrity sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ== + hash-base@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz" @@ -8499,7 +8477,7 @@ jsonparse@^1.2.0, jsonparse@^1.3.1: resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -"jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.5: +"jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.3: version "3.3.5" resolved "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz" integrity sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ== @@ -8530,17 +8508,17 @@ kind-of@^6.0.2, kind-of@^6.0.3: resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== -language-subtag-registry@^0.3.20: +language-subtag-registry@~0.3.2: version "0.3.22" - resolved "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz" + resolved "https://registry.yarnpkg.com/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz#2e1500861b2e457eba7e7ae86877cbd08fa1fd1d" integrity sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w== -language-tags@^1.0.9: - version "1.0.9" - resolved "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz" - integrity sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA== +language-tags@=1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/language-tags/-/language-tags-1.0.5.tgz#d321dbc4da30ba8bf3024e040fa5c14661f9193a" + integrity sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ== dependencies: - language-subtag-registry "^0.3.20" + language-subtag-registry "~0.3.2" launch-editor@^2.6.0: version "2.6.1" @@ -9719,6 +9697,25 @@ object.entries@^1.1.5, object.entries@^1.1.7: define-properties "^1.2.0" es-abstract "^1.22.1" +object.entries@^1.1.6: + version "1.1.8" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.8.tgz#bffe6f282e01f4d17807204a24f8edd823599c41" + integrity sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + +object.fromentries@^2.0.6: + version "2.0.8" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" + integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + object.fromentries@^2.0.7: version "2.0.7" resolved "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz" From 734b613d8294b77110b0c1c332033d4cbdbb2fe8 Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Fri, 31 May 2024 21:37:46 +0700 Subject: [PATCH 15/29] Update lock file --- yarn.lock | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4c78e097..8c3d1097 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4057,16 +4057,16 @@ resolved "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.3.tgz" integrity sha512-86XLCVEmWagiUEbr2AjSbeY4qHN9jMm3pgM3PuBYfLIbT0MpDSnA3GA/4W7KoH/C/eeK77kNaeIxZzjhKYIBgw== -"@types/uuid@^9.0.8": - version "9.0.8" - resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.8.tgz#7545ba4fc3c003d6c756f651f3bf163d8f0f29ba" - integrity sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA== - "@types/tough-cookie@*": version "4.0.5" resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304" integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== +"@types/uuid@^9.0.8": + version "9.0.8" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.8.tgz#7545ba4fc3c003d6c756f651f3bf163d8f0f29ba" + integrity sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA== + "@types/wrap-ansi@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz#18b97a972f94f60a679fd5c796d96421b9abb9fd" @@ -8899,7 +8899,7 @@ jsonwebtoken@^9.0.0: ms "^2.1.1" semver "^7.5.4" -"jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.5: +"jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.3: version "3.3.5" resolved "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz" integrity sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ== @@ -9807,11 +9807,6 @@ napi-build-utils@^1.0.1: resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== -natural-compare-lite@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz" - integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== - natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" From 787ec5d962d8af44d1cce83d9377c10b78b9bf55 Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Mon, 3 Jun 2024 15:33:40 +0700 Subject: [PATCH 16/29] Fix calling functionCall args on undefined --- .../src/components/Sign/SignTemplate.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx b/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx index 040fa63a..b4e37324 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx +++ b/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx @@ -307,10 +307,10 @@ function SignTemplate({ signMethod }: SignTemplateProps) { {transactionDetails.actions.map((action, i) => ( ))} From d2202fb050b566c517145fd860b1e8fd3997650d Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Mon, 3 Jun 2024 17:08:03 +0700 Subject: [PATCH 17/29] New UI --- .../src/components/Sign/Sign.styles.ts | 53 +++++------ .../src/components/Sign/SignTemplate.tsx | 91 +++++++++++-------- .../TableContent/TableContent.styles.ts | 13 ++- .../components/TableContent/TableContent.tsx | 1 - yarn.lock | 84 +++++++++++++++-- 5 files changed, 164 insertions(+), 78 deletions(-) diff --git a/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts b/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts index 80f0a615..db999caa 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts +++ b/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts @@ -14,8 +14,9 @@ export const ModalSignWrapper = styled.div` display: flex; flex-direction: column; position: relative; - row-gap: 8px; - .info-text { + overflow: hidden; + + .info-text { font-size: 12px; font-weight: 500; color: #1b1b1b; @@ -28,7 +29,7 @@ export const ModalSignWrapper = styled.div` .modal-top { display: flex; flex-direction: column; - gap: 12px; + gap: 16px; align-items: center; line-height: 17px; text-align: center; @@ -36,6 +37,7 @@ export const ModalSignWrapper = styled.div` height: 48px; width:48px; } + .transaction-details { display: inline-flex; gap: 6px; @@ -65,15 +67,26 @@ export const ModalSignWrapper = styled.div` } } + .modal-middle { + display: flex; + flex-direction: column; + gap: 16px; + } + .table-wrapper { + overflow: hidden; background-color: #fdfdfc; border: 1px solid #eeeeec; - border-radius: 4px; + border-radius: 6px; &.margin-top { margin-top: 20px; } + > *:not(:last-child) { + border-bottom: 1px solid var(--Sand-Light-4, #EEEEEC); + } + h4 { font-size: 12px; font-weight: 600; @@ -95,7 +108,6 @@ export const ModalSignWrapper = styled.div` display: flex; align-items: center; justify-content: space-between; - padding: 16px 8px 16px 0px; svg path { fill: #1b1b1b;; } @@ -104,30 +116,15 @@ export const ModalSignWrapper = styled.div` } } - .more-details-opened { - .table-wrapper { - &:first-child { - border-bottom-left-radius: 0px; - border-bottom-right-radius: 0px; - } - - &:last-child { - border-top-left-radius: 0px; - border-top-right-radius: 0px; - - border-top: 0px; - } - } + .more-details { + margin: 16px 0; } - .modal-footer { - display: flex; - flex-direction: column; - gap: 12px; - padding: 16px; - - > button { - min-width: 100%; - } + .more-details-opened { + overflow: scroll; + } + + & > button{ + margin-top: 24px } `; diff --git a/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx b/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx index b4e37324..4822ee0b 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx +++ b/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx @@ -22,6 +22,32 @@ import { inIframe, isUrlNotJavascriptProtocol, redirectWithError } from '../../u import { basePath, network } from '../../utils/config'; import TableContent from '../TableContent/TableContent'; +type SignTemplateProps = { + signMethod: 'transaction' | 'delegate' +} + +interface PageCopy { + title: string; + description: string; + estimatedFeesHint: string; + totalFeeHint: string; +} + +const pageCopy: Record = { + delegate: { + title: 'Approve Transaction?', + description: 'You are about to authorize an action. Review the contract details before approving.', + estimatedFeesHint: 'Fees for this transaction are covered', + totalFeeHint: 'The total amount you’ll pay', + }, + transaction: { + title: 'Sign Transaction?', + description: 'Please note this transaction requires you to pay for the fees. Review the costs before continuing.', + estimatedFeesHint: 'You are required to pay the fees for this transaction', + totalFeeHint: 'The maximum amount you’ll pay', + }, +}; + const formatActionType = (action: string) => { switch (action) { case 'createAccount': @@ -71,10 +97,6 @@ export const calculateGasLimit = (actions: Array<{ functionCall?: { gas: BN } }> .reduce((totalGas, gas) => totalGas.add(gas), new BN(0)).div(new BN('1000000000000')) .toString(); -type SignTemplateProps = { - signMethod: 'transaction' | 'delegate' -} - function SignTemplate({ signMethod }: SignTemplateProps) { const signTransactionRef = useRef(null); // Send form height to modal if in iframe @@ -254,31 +276,42 @@ function SignTemplate({ signMethod }: SignTemplateProps) { <>
{callbackUrl} -

Confirm transaction

+

{pageCopy[signMethod].title}

+
+ {pageCopy[signMethod].description} +
{callbackUrl || 'Unknown App'}
-
- {signMethod === 'transaction' &&

You will be responsible for paying the gas fees.

} - {signMethod === 'delegate' &&

The relayer will cover the gas fees for you.

} -
+
+ +
+
+
- {/* eslint-disable-next-line */} + {/* eslint-disable-next-line */}
{showDetails && (
-
-

Network fees

- - -

Actions

{transactionDetails.actions.map((action, i) => ( @@ -317,17 +337,14 @@ function SignTemplate({ signMethod }: SignTemplateProps) {
)} - -
-
+
) : ( -
- {rightSide} - {currencyValue ? {currencyValue} : null} +
+ {rightSide} + {currencyValue ? {currencyValue} : null}
)}
From b41314564946cea3d851c3a3c55d3103560c52cb Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Mon, 3 Jun 2024 17:44:25 +0700 Subject: [PATCH 19/29] Fix More Details formatting --- .../src/components/Sign/SignTemplate.tsx | 9 +++++---- packages/near-fast-auth-signer/webpack.common.config.js | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx b/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx index c33ca228..b606fdc9 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx +++ b/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx @@ -136,6 +136,7 @@ function SignTemplate({ signMethod }: SignTemplateProps) { try { const deserializedTransactions = deserializeTransactionsFromString(transactionHashes); const allActions = deserializedTransactions.flatMap((t) => t.actions); + setTransactionDetails({ signerId: deserializedTransactions[0].signerId, receiverId: deserializedTransactions[0].receiverId, @@ -325,16 +326,16 @@ function SignTemplate({ signMethod }: SignTemplateProps) {

Actions

- {transactionDetails.actions.map((action, i) => ( + {transactionDetails.transactions.map((t) => t.actions.map((action) => ( - ))} + )))}
)} diff --git a/packages/near-fast-auth-signer/webpack.common.config.js b/packages/near-fast-auth-signer/webpack.common.config.js index 73185be3..93f5856c 100644 --- a/packages/near-fast-auth-signer/webpack.common.config.js +++ b/packages/near-fast-auth-signer/webpack.common.config.js @@ -35,7 +35,7 @@ module.exports = { FIREBASE_MESSAGING_SENDER_ID: '829449955812', FIREBASE_APP_ID: '1:829449955812:web:532436aa35572be60abff1', FIREBASE_MEASUREMENT_ID: 'G-T2PPJ8QRYY', - RELAYER_URL_TESTNET: 'https://near-relayer-testnet.api.pagoda.co/relay', + RELAYER_URL_TESTNET: 'http://localhost:3030/relay', FIREBASE_API_KEY_TESTNET: 'AIzaSyDAh6lSSkEbpRekkGYdDM5jazV6IQnIZFU', FIREBASE_AUTH_DOMAIN_TESTNET: 'pagoda-oboarding-dev.firebaseapp.com', FIREBASE_PROJECT_ID_TESTNET: 'pagoda-oboarding-dev', From a68ae72579caf8ed836231ed5092e717b415b140 Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Mon, 3 Jun 2024 18:30:01 +0700 Subject: [PATCH 20/29] Adjust tooltip and borders --- .../src/components/Sign/Sign.styles.ts | 10 +++++++++- .../src/lib/Tooltip/Tooltip.tsx | 12 ++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts b/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts index db999caa..cdb1afeb 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts +++ b/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts @@ -74,11 +74,19 @@ export const ModalSignWrapper = styled.div` } .table-wrapper { - overflow: hidden; background-color: #fdfdfc; border: 1px solid #eeeeec; border-radius: 6px; + & > *:first-child { + border-top-left-radius: 6px; + border-top-right-radius: 6px; + } + + & > *:last-child { + border-bottom-left-radius: 6px; + border-bottom-right-radius: 6px; + } &.margin-top { margin-top: 20px; } diff --git a/packages/near-fast-auth-signer/src/lib/Tooltip/Tooltip.tsx b/packages/near-fast-auth-signer/src/lib/Tooltip/Tooltip.tsx index 51055405..862c51bf 100644 --- a/packages/near-fast-auth-signer/src/lib/Tooltip/Tooltip.tsx +++ b/packages/near-fast-auth-signer/src/lib/Tooltip/Tooltip.tsx @@ -12,18 +12,18 @@ const Wrapper = styled.div` .info-text { visibility: hidden; width: 120px; - background-color: black; - font-size: 10px; - color: #fff; + background-color: white; + font-size: 12px; text-align: center; - border-radius: 6px; - padding: 4px 5px; + border-radius: 8px; + padding: 12px 16px; position: absolute; z-index: 1; bottom: 150%; left: 50%; margin-left: -60px; line-height: 1.3; + border: 1px solid var(--Sand-Light-6, #E3E3E0); &:after { content: ""; @@ -33,7 +33,7 @@ const Wrapper = styled.div` margin-left: -5px; border-width: 5px; border-style: solid; - border-color: #252523 transparent transparent transparent; + border-color: var(--Sand-Light-6, #E3E3E0) transparent transparent transparent; } } From ae2ca0f0cea1a64b54f259de4b5db4f2b544756d Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Mon, 3 Jun 2024 18:46:17 +0700 Subject: [PATCH 21/29] Fix scrolling --- .../src/components/Sign/Sign.styles.ts | 201 +++++++++--------- .../src/components/Sign/SignTemplate.tsx | 4 +- 2 files changed, 107 insertions(+), 98 deletions(-) diff --git a/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts b/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts index cdb1afeb..22c77fa4 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts +++ b/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts @@ -7,6 +7,7 @@ interface ModalSignWrapperProps { export const ModalSignWrapper = styled.div` ${(props) => props.hide && 'opacity: 0;'} + height: 632px; width: 550px; margin: 0 auto; border-radius: 8px; @@ -16,123 +17,131 @@ export const ModalSignWrapper = styled.div` position: relative; overflow: hidden; - .info-text { - font-size: 12px; - font-weight: 500; - color: #1b1b1b; - text-align: center; - &.error { - color: #A81500; - } - } + .modal-body { + height: 100%; + width: 100%; + overflow: scroll; - .modal-top { - display: flex; - flex-direction: column; - gap: 16px; - align-items: center; - line-height: 17px; - text-align: center; - svg { - height: 48px; - width:48px; + .info-text { + font-size: 12px; + font-weight: 500; + color: #1b1b1b; + text-align: center; + &.error { + color: #A81500; + } } - .transaction-details { - display: inline-flex; - gap: 6px; - padding: 8px 12px; - border-radius: 50px; - border: 1px solid #e3e3e0; + .modal-top { + display: flex; + flex-direction: column; + gap: 16px; align-items: center; - font-family: Mona Sans; - font-size: 12px; - font-weight: 450; line-height: 17px; - letter-spacing: 0.02em; - text-align: left; - color: #1b1b1b; - margin-bottom: 24px; - ${({ warning }) => warning && ` - border: 1px solid var(--Red-Light-6, #FF988A); - background: var(--Red-Light-1, #FFF6F5); - color: var(--Red-Light-12, var(--Red-Light-12, #4B0B02)); - `} + text-align: center; + svg { - height: 13.5px; - width: 13.5px; - vertical-align: middle; - color: #868682; + height: 48px; + width:48px; + } + + .transaction-details { + display: inline-flex; + gap: 6px; + padding: 8px 12px; + border-radius: 50px; + border: 1px solid #e3e3e0; + align-items: center; + font-family: Mona Sans; + font-size: 12px; + font-weight: 450; + line-height: 17px; + letter-spacing: 0.02em; + text-align: left; + color: #1b1b1b; + margin-bottom: 24px; + ${({ warning }) => warning && ` + border: 1px solid var(--Red-Light-6, #FF988A); + background: var(--Red-Light-1, #FFF6F5); + color: var(--Red-Light-12, var(--Red-Light-12, #4B0B02)); + `} + svg { + height: 13.5px; + width: 13.5px; + vertical-align: middle; + color: #868682; + } } } - } - .modal-middle { - display: flex; - flex-direction: column; - gap: 16px; - } + .modal-middle { + display: flex; + flex-direction: column; + gap: 16px; + } - .table-wrapper { - background-color: #fdfdfc; - border: 1px solid #eeeeec; - border-radius: 6px; + .table-wrapper { + background-color: #fdfdfc; + border: 1px solid #eeeeec; + border-radius: 6px; - & > *:first-child { - border-top-left-radius: 6px; - border-top-right-radius: 6px; - } - - & > *:last-child { - border-bottom-left-radius: 6px; - border-bottom-right-radius: 6px; - } - &.margin-top { - margin-top: 20px; - } + & > *:first-child { + border-top-left-radius: 6px; + border-top-right-radius: 6px; + } + + & > *:last-child { + border-bottom-left-radius: 6px; + border-bottom-right-radius: 6px; + } + &.margin-top { + margin-top: 20px; + } + + > *:not(:last-child) { + border-bottom: 1px solid var(--Sand-Light-4, #EEEEEC); + } - > *:not(:last-child) { - border-bottom: 1px solid var(--Sand-Light-4, #EEEEEC); + h4 { + font-size: 12px; + font-weight: 600; + line-height: 17px; + letter-spacing: 0.02em; + text-align: left; + color: #1b1b1b; + padding: 12px; + } } - h4 { - font-size: 12px; + .more-details { + font-size: 14px; + color: #1b1b1b; font-weight: 600; - line-height: 17px; + line-height: 21px; letter-spacing: 0.02em; text-align: left; - color: #1b1b1b; - padding: 12px; + display: flex; + align-items: center; + justify-content: space-between; + svg path { + fill: #1b1b1b;; + } + &:hover { + cursor: pointer; + } } - } - .more-details { - font-size: 14px; - color: #1b1b1b; - font-weight: 600; - line-height: 21px; - letter-spacing: 0.02em; - text-align: left; - display: flex; - align-items: center; - justify-content: space-between; - svg path { - fill: #1b1b1b;; - } - &:hover { - cursor: pointer; + .more-details { + margin: 16px 0; } - } - .more-details { - margin: 16px 0; - } + .more-details-opened { + overflow: scroll; + } - .more-details-opened { - overflow: scroll; - } - - & > button{ - margin-top: 24px + & > button{ + margin-top: 24px; + width: 100%; + } } `; diff --git a/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx b/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx index b606fdc9..df8fb939 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx +++ b/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx @@ -274,7 +274,7 @@ function SignTemplate({ signMethod }: SignTemplateProps) { return ( {( - <> +
{callbackUrl}

{pageCopy[signMethod].title}

@@ -347,7 +347,7 @@ function SignTemplate({ signMethod }: SignTemplateProps) { data-test-id="confirm-transaction-button" onClick={onConfirm} /> - +
)} {error &&

{error}

} From 9785f9aa7379b4634c3fb9d1b766051d505f5416 Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Mon, 3 Jun 2024 18:46:40 +0700 Subject: [PATCH 22/29] Revert webpack changes --- packages/near-fast-auth-signer/webpack.common.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/near-fast-auth-signer/webpack.common.config.js b/packages/near-fast-auth-signer/webpack.common.config.js index 93f5856c..73185be3 100644 --- a/packages/near-fast-auth-signer/webpack.common.config.js +++ b/packages/near-fast-auth-signer/webpack.common.config.js @@ -35,7 +35,7 @@ module.exports = { FIREBASE_MESSAGING_SENDER_ID: '829449955812', FIREBASE_APP_ID: '1:829449955812:web:532436aa35572be60abff1', FIREBASE_MEASUREMENT_ID: 'G-T2PPJ8QRYY', - RELAYER_URL_TESTNET: 'http://localhost:3030/relay', + RELAYER_URL_TESTNET: 'https://near-relayer-testnet.api.pagoda.co/relay', FIREBASE_API_KEY_TESTNET: 'AIzaSyDAh6lSSkEbpRekkGYdDM5jazV6IQnIZFU', FIREBASE_AUTH_DOMAIN_TESTNET: 'pagoda-oboarding-dev.firebaseapp.com', FIREBASE_PROJECT_ID_TESTNET: 'pagoda-oboarding-dev', From c653bcdf6d99e019bae79d314cc5ac3ccdccd1b7 Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Mon, 3 Jun 2024 18:50:07 +0700 Subject: [PATCH 23/29] Update modal height --- .../near-fast-auth-signer/src/components/Sign/Sign.styles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts b/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts index 22c77fa4..04c22e7a 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts +++ b/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts @@ -7,7 +7,7 @@ interface ModalSignWrapperProps { export const ModalSignWrapper = styled.div` ${(props) => props.hide && 'opacity: 0;'} - height: 632px; + height: 660px; width: 550px; margin: 0 auto; border-radius: 8px; From 534d72766078d2acc146111944ba81fca0a53493 Mon Sep 17 00:00:00 2001 From: Felipe Pessina Date: Tue, 4 Jun 2024 15:46:41 +0700 Subject: [PATCH 24/29] Fix styles --- .../src/components/Sign/Sign.styles.ts | 10 +- .../src/components/Sign/SignTemplate.tsx | 2 +- .../SignMultichain/SignMultichain.tsx | 184 +++++++++--------- 3 files changed, 101 insertions(+), 95 deletions(-) diff --git a/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts b/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts index 04c22e7a..061663e6 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts +++ b/packages/near-fast-auth-signer/src/components/Sign/Sign.styles.ts @@ -7,7 +7,7 @@ interface ModalSignWrapperProps { export const ModalSignWrapper = styled.div` ${(props) => props.hide && 'opacity: 0;'} - height: 660px; + max-height: 660px; width: 550px; margin: 0 auto; border-radius: 8px; @@ -40,6 +40,11 @@ export const ModalSignWrapper = styled.div` line-height: 17px; text-align: center; + h4 { + font-size: 24px; + font-weight: 700; + } + svg { height: 48px; width:48px; @@ -94,9 +99,6 @@ export const ModalSignWrapper = styled.div` border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; } - &.margin-top { - margin-top: 20px; - } > *:not(:last-child) { border-bottom: 1px solid var(--Sand-Light-4, #EEEEEC); diff --git a/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx b/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx index df8fb939..b4eeb23c 100644 --- a/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx +++ b/packages/near-fast-auth-signer/src/components/Sign/SignTemplate.tsx @@ -340,7 +340,7 @@ function SignTemplate({ signMethod }: SignTemplateProps) {
)}
- -
+ + {error &&

{error}

} - { - isUnsafe && ( - <> - - setCheck(!check)} checked={check} /> -

- I’ve carefully reviewed the request and trust - {' '} - {message?.domain} -

-
- - - - We don’t recognize this app, proceed with caution - - - - ) - } - -