From e098464761bc7849b8bda6f708ba2180fc33a3e7 Mon Sep 17 00:00:00 2001 From: cipriandraghici Date: Wed, 4 Sep 2024 15:14:06 +0300 Subject: [PATCH 01/21] add todos --- src/core/methods/login/login.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/methods/login/login.ts b/src/core/methods/login/login.ts index b8586b3..e716549 100644 --- a/src/core/methods/login/login.ts +++ b/src/core/methods/login/login.ts @@ -22,9 +22,11 @@ import { getCallbackUrl } from './helpers/getCallbackUrl'; async function loginWithoutNativeToken(provider: IProvider) { await provider.login?.({ + // TODO remove callbackUrl when the provider will be standardized callbackUrl: getCallbackUrl() }); + // TODO update this when the provider will be standardized const address = await provider.getAddress?.(); if (!address) { @@ -49,6 +51,7 @@ async function loginWithNativeToken( }); const loginResult = await provider.login?.({ + // TODO remove callbackUrl when the provider will be standardized callbackUrl: getCallbackUrl(), token: loginToken }); From 5cb04b66457309c580159c7b45d4efddaf0ec0ab Mon Sep 17 00:00:00 2001 From: cipriandraghici Date: Fri, 6 Sep 2024 17:27:46 +0300 Subject: [PATCH 02/21] update packages and add TODO --- .yarnrc | 1 + package.json | 6 +-- .../login/helpers/extractAccountFromToken.ts | 1 + yarn.lock | 37 +++++++++++++------ 4 files changed, 31 insertions(+), 14 deletions(-) create mode 100644 .yarnrc diff --git a/.yarnrc b/.yarnrc new file mode 100644 index 0000000..6963428 --- /dev/null +++ b/.yarnrc @@ -0,0 +1 @@ +registry "http://localhost:4873" \ No newline at end of file diff --git a/package.json b/package.json index a15d07c..78c810f 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "dependencies": { "@lifeomic/axios-fetch": "3.0.1", - "@multiversx/sdk-extension-provider": "3.0.0", + "@multiversx/sdk-extension-provider": "4.0.0-alpha.0", "@multiversx/sdk-hw-provider": "6.4.0", "@multiversx/sdk-metamask-provider": "0.0.5", "@multiversx/sdk-native-auth-client": "^1.0.8", @@ -47,7 +47,7 @@ "peerDependencies": { "@multiversx/sdk-core": ">= 13.0.0", "@multiversx/sdk-dapp-utils": ">= 0.1.0", - "@multiversx/sdk-web-wallet-cross-window-provider": ">= 1.0.0", + "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.0-alpha.0", "axios": ">=1.6.5", "bignumber.js": "9.x" }, @@ -57,7 +57,7 @@ "devDependencies": { "@multiversx/sdk-core": ">= 13.0.0", "@multiversx/sdk-dapp-utils": ">= 0.1.0", - "@multiversx/sdk-web-wallet-cross-window-provider": ">= 1.0.0", + "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.0-alpha.0", "@swc/core": "^1.4.17", "@swc/jest": "^0.2.36", "@types/node": "20.12.8", diff --git a/src/core/methods/login/helpers/extractAccountFromToken.ts b/src/core/methods/login/helpers/extractAccountFromToken.ts index 4407f84..5b00a23 100644 --- a/src/core/methods/login/helpers/extractAccountFromToken.ts +++ b/src/core/methods/login/helpers/extractAccountFromToken.ts @@ -31,6 +31,7 @@ export async function extractAccountFromToken({ } if (accountDetails.account) { + // TODO remove this as is already done before this function is called loginAction({ address: accountDetails.address, providerType: provider.getType() diff --git a/yarn.lock b/yarn.lock index 1f51752..eecba63 100644 --- a/yarn.lock +++ b/yarn.lock @@ -996,10 +996,10 @@ resolved "https://registry.yarnpkg.com/@multiversx/sdk-dapp-utils/-/sdk-dapp-utils-0.1.0.tgz#3103c2ffc648703e75f96acd229af299cb0840ab" integrity sha512-EFvktZ/S1WQ1ie02nnKZHARC4r23JZWwoTFd5py1qi/Z/UoLHIzJ394HLjXFb6gBTsp4wnvNwIXBA/DNrd2Yeg== -"@multiversx/sdk-extension-provider@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-extension-provider/-/sdk-extension-provider-3.0.0.tgz#e0e178ee5555f9440457547759621f5c3152c5fa" - integrity sha512-xNHLShzimYbMXqEJoiNyB4fNOXQUwSJCzt9FiOA4GdxucJnCgIM25mXtSj2I93cz+KD39QgRjEYep+li/lykOw== +"@multiversx/sdk-extension-provider@4.0.0-alpha.0": + version "4.0.0-alpha.0" + resolved "http://localhost:4873/@multiversx/sdk-extension-provider/-/sdk-extension-provider-4.0.0-alpha.0.tgz#d1705ffdeb9278682bdf6bf374987be8a0f8d40a" + integrity sha512-WGW/86sbbepgJb6x2+kqhLnXwzcxA0kLxRDCNdIyKQe+MWiT7f6ss4WVPt0WSvOLfEGu5cJDwQ4Zebj+hHWefA== "@multiversx/sdk-hw-provider@6.4.0": version "6.4.0" @@ -1069,10 +1069,10 @@ tweetnacl "1.0.3" uuid "8.3.2" -"@multiversx/sdk-web-wallet-cross-window-provider@>= 1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-web-wallet-cross-window-provider/-/sdk-web-wallet-cross-window-provider-1.0.0.tgz#14ea0eb110de78a7e5dfbb1cb237cc8f86006b40" - integrity sha512-xqdKCFpBCxNcp4aSwC2FLbks2Ii2uy5YpHnqR8qnqCnjH6TqdGZ1xKzQauZsiYqseVueVTmynK28w9pTOZ0Oqg== +"@multiversx/sdk-web-wallet-cross-window-provider@>= 2.0.0-alpha.0": + version "2.0.0-alpha.0" + resolved "http://localhost:4873/@multiversx/sdk-web-wallet-cross-window-provider/-/sdk-web-wallet-cross-window-provider-2.0.0-alpha.0.tgz#076f658fdd4a07e18004a77d53b83163d8c59783" + integrity sha512-m9RYm+v5oly3jE7U2Ajv4npl81K7FYbssllOzD+PtfWzNlLxGPaXVVRY+NDJjWcodIV+IUXHDQqigluFya55ng== dependencies: "@types/jest" "^29.5.11" "@types/qs" "6.9.10" @@ -6496,7 +6496,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -6510,6 +6510,13 @@ strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -7083,8 +7090,7 @@ word-wrap@^1.2.5: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: - name wrap-ansi-cjs +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -7102,6 +7108,15 @@ wrap-ansi@^6.0.1: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + 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.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From de787dec0fe85094510d2fad497931051efc03d4 Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Mon, 16 Sep 2024 18:55:26 +0300 Subject: [PATCH 03/21] Work on ledger provider --- src/core/methods/login/login.ts | 17 +-- src/core/providers/ProviderFactory.ts | 111 ++++++++++++++++-- .../helpers/getLedgerConfiguration.ts | 2 - .../providers/helpers/useSetLedgerProvider.ts | 69 +++++++++++ .../providers/types/providerFactory.types.ts | 2 +- src/store/selectors/loginInfoSelectors.ts | 3 + 6 files changed, 186 insertions(+), 18 deletions(-) create mode 100644 src/core/providers/helpers/useSetLedgerProvider.ts diff --git a/src/core/methods/login/login.ts b/src/core/methods/login/login.ts index 12a3adf..c881cd4 100644 --- a/src/core/methods/login/login.ts +++ b/src/core/methods/login/login.ts @@ -54,13 +54,16 @@ async function loginWithNativeToken( token: loginToken }); - const address = provider.getAddress - ? // TODO check why on the second login the address is fetched asynchronously (looks like the crosswindow provider has getAddress as an async function) - await provider.getAddress() - : loginResult?.address; - const signature = provider.getTokenLoginSignature - ? provider.getTokenLoginSignature() - : loginResult?.signature; + const address = + loginResult?.address ?? provider.getAddress + ? // TODO check why on the second login the address is fetched asynchronously (looks like the crosswindow provider has getAddress as an async function) + await provider.getAddress() + : loginResult?.address; + + const signature = + loginResult?.signature ?? provider.getTokenLoginSignature + ? provider.getTokenLoginSignature() + : loginResult?.signature; if (!address) { console.warn('Login cancelled.'); diff --git a/src/core/providers/ProviderFactory.ts b/src/core/providers/ProviderFactory.ts index 37cc079..5cbb568 100644 --- a/src/core/providers/ProviderFactory.ts +++ b/src/core/providers/ProviderFactory.ts @@ -7,6 +7,11 @@ import { ProviderTypeEnum } from './types/providerFactory.types'; import { isBrowserWithPopupConfirmation } from '../../constants'; +import { HWProvider } from '@multiversx/sdk-hw-provider/out'; +import { fetchAccount } from 'utils'; +import { setLedgerLogin } from 'store/actions/loginInfo/loginInfoActions'; +import { getLedgerConfiguration } from './helpers/getLedgerConfiguration'; +import { setLedgerAccount } from 'store/actions/account/accountActions'; export class ProviderFactory { public async create({ @@ -17,14 +22,6 @@ export class ProviderFactory { let createdProvider: IProvider | undefined; switch (type) { - // case ProviderTypeEnum.iframe: { - // const provider = await ProviderFactory.getIframeProvider({ - // walletAddress, - // }); - // createdProvider = provider as unknown as IProvider; - // break; - // } - case ProviderTypeEnum.extension: { const provider = await this.getExtensionProvider(); createdProvider = provider as unknown as IProvider; @@ -60,6 +57,98 @@ export class ProviderFactory { break; } + case ProviderTypeEnum.ledger: { + const provider = await this.getLedgerProvider(); + + createdProvider = provider as unknown as IProvider; + + const hwProviderLogin = provider.login; + + createdProvider.getType = () => { + return ProviderTypeEnum.ledger; + }; + + createdProvider.login = async (options?: { + callbackUrl?: string | undefined; + token?: string | undefined; + }) => { + await provider.isConnected(); + + // TODO: perform additional UI logic here + // maybe extract to file + const startIndex = 0; + const addressesPerPage = 10; + + const accounts = await provider.getAccounts( + startIndex, + addressesPerPage + ); + + const accountsWithBalance: { + address: string; + balance: string; + index: number; + }[] = []; + + const balancePromises = accounts.map((address) => + fetchAccount(address) + ); + + await Promise.all(balancePromises).then((balances) => { + balances.forEach((account, index) => { + if (!account) { + return; + } + accountsWithBalance.push({ + address: account.address, + balance: account.balance, + index + }); + }); + }); + + // Suppose user selects the first account + const selectedIndex = 0; + + setLedgerLogin({ + index: selectedIndex, + loginType: ProviderTypeEnum.ledger + }); + + const { version, dataEnabled } = + await getLedgerConfiguration(provider); + + setLedgerAccount({ + address: accountsWithBalance[selectedIndex].address, + index: selectedIndex, + version, + hasContractDataEnabled: dataEnabled + }); + + if (options?.token) { + const loginInfo = await provider.tokenLogin({ + token: Buffer.from(`${options?.token}{}`), + addressIndex: accountsWithBalance[selectedIndex].index + }); + + return { + address: loginInfo.address, + signature: loginInfo.signature.toString('hex') + }; + } else { + const address = await hwProviderLogin({ + addressIndex: accountsWithBalance[selectedIndex].index + }); + return { + address, + signature: '' + }; + } + }; + + break; + } + case ProviderTypeEnum.custom: { createdProvider = customProvider; break; @@ -96,4 +185,10 @@ export class ProviderFactory { await provider.init(); return provider; } + + private async getLedgerProvider() { + const provider = new HWProvider(); + await provider.init(); + return provider; + } } diff --git a/src/core/providers/helpers/getLedgerConfiguration.ts b/src/core/providers/helpers/getLedgerConfiguration.ts index 0658cb3..403f32a 100644 --- a/src/core/providers/helpers/getLedgerConfiguration.ts +++ b/src/core/providers/helpers/getLedgerConfiguration.ts @@ -3,8 +3,6 @@ import { IHWWalletApp } from '@multiversx/sdk-hw-provider/out/interface'; import { LEDGER_CONTRACT_DATA_ENABLED_VALUE } from 'constants/index'; -export const DAPP_INIT_ROUTE = '/dapp/init'; - export const getLedgerConfiguration = async ( initializedHwWalletP: HWProvider ) => { diff --git a/src/core/providers/helpers/useSetLedgerProvider.ts b/src/core/providers/helpers/useSetLedgerProvider.ts new file mode 100644 index 0000000..c22fb90 --- /dev/null +++ b/src/core/providers/helpers/useSetLedgerProvider.ts @@ -0,0 +1,69 @@ +import { HWProvider } from '@multiversx/sdk-hw-provider'; +import { getIsLoggedIn } from 'core/methods/account/getIsLoggedIn'; +import { ledgerLoginSelector } from 'store/selectors/loginInfoSelectors'; +import { getState } from 'store/store'; +import { getAccountProvider } from '../accountProvider'; +import { logout } from 'core/methods/logout/logout'; +import { getLedgerConfiguration } from './getLedgerConfiguration'; + +export const setLedgerProvider = async () => { + const isLoggedIn = getIsLoggedIn(); + const ledgerLogin = ledgerLoginSelector(getState()); + const provider = getAccountProvider(); + + const initHWProvider = async () => { + const hasAddressIndex = ledgerLogin?.index != null; + + try { + if (provider instanceof HWProvider && provider.isInitialized()) { + if (hasAddressIndex) { + await provider.setAddressIndex(ledgerLogin.index); + } + + return provider; + } + + const hwWalletP = new HWProvider(); + const isInitialized = await hwWalletP.init(); + + if (!isInitialized) { + return null; + } + + if (hasAddressIndex) { + await hwWalletP.setAddressIndex(ledgerLogin.index); + } + + return hwWalletP; + } catch (e) { + console.error('Failed to initialise Ledger Provider'); + + return null; + } + }; + + let hwWalletP: HWProvider | null; + + try { + hwWalletP = await initHWProvider(); + + if (!hwWalletP) { + console.warn('Could not initialise ledger app'); + + if (isLoggedIn) { + logout(); + } + + return; + } + + const ledgerConfig = await getLedgerConfiguration(hwWalletP); + return { hwWalletP, ledgerConfig }; + } catch (err) { + console.error('Could not initialise ledger app', err); + + if (isLoggedIn) { + logout(); + } + } +}; diff --git a/src/core/providers/types/providerFactory.types.ts b/src/core/providers/types/providerFactory.types.ts index f50f1d3..e1edbbb 100644 --- a/src/core/providers/types/providerFactory.types.ts +++ b/src/core/providers/types/providerFactory.types.ts @@ -33,7 +33,7 @@ export enum ProviderTypeEnum { crossWindow = 'crossWindow', extension = 'extension', walletConnect = 'walletConnect', - hardware = 'hardware', + ledger = 'ledger', opera = 'opera', metamask = 'metamask', webhook = 'webhook', diff --git a/src/store/selectors/loginInfoSelectors.ts b/src/store/selectors/loginInfoSelectors.ts index 5527945..bec96fa 100644 --- a/src/store/selectors/loginInfoSelectors.ts +++ b/src/store/selectors/loginInfoSelectors.ts @@ -10,3 +10,6 @@ export const walletConnectLoginSelector = ({ loginInfo }: StoreType) => export const providerTypeSelector = ({ loginInfo }: StoreType) => loginInfo.providerType; + +export const ledgerLoginSelector = ({ loginInfo }: StoreType) => + loginInfo.ledgerLogin; From d2103064baa45b07862f49b08acc4f43a313ee22 Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Tue, 17 Sep 2024 11:08:36 +0300 Subject: [PATCH 04/21] Project building --- src/core/providers/ProviderFactory.ts | 18 +++++------ ...LedgerProvider.ts => getLedgerProvider.ts} | 31 +++++++++---------- src/core/providers/helpers/utils.ts | 2 +- 3 files changed, 25 insertions(+), 26 deletions(-) rename src/core/providers/helpers/{useSetLedgerProvider.ts => getLedgerProvider.ts} (64%) diff --git a/src/core/providers/ProviderFactory.ts b/src/core/providers/ProviderFactory.ts index 5cbb568..604bf17 100644 --- a/src/core/providers/ProviderFactory.ts +++ b/src/core/providers/ProviderFactory.ts @@ -12,6 +12,7 @@ import { fetchAccount } from 'utils'; import { setLedgerLogin } from 'store/actions/loginInfo/loginInfoActions'; import { getLedgerConfiguration } from './helpers/getLedgerConfiguration'; import { setLedgerAccount } from 'store/actions/account/accountActions'; +import { getLedgerProvider } from './helpers/getLedgerProvider'; export class ProviderFactory { public async create({ @@ -58,7 +59,13 @@ export class ProviderFactory { } case ProviderTypeEnum.ledger: { - const provider = await this.getLedgerProvider(); + const data = await getLedgerProvider(); + + if (!data) { + return; + } + + const { ledgerProvider: provider, ledgerConfig } = data; createdProvider = provider as unknown as IProvider; @@ -115,8 +122,7 @@ export class ProviderFactory { loginType: ProviderTypeEnum.ledger }); - const { version, dataEnabled } = - await getLedgerConfiguration(provider); + const { version, dataEnabled } = ledgerConfig; setLedgerAccount({ address: accountsWithBalance[selectedIndex].address, @@ -185,10 +191,4 @@ export class ProviderFactory { await provider.init(); return provider; } - - private async getLedgerProvider() { - const provider = new HWProvider(); - await provider.init(); - return provider; - } } diff --git a/src/core/providers/helpers/useSetLedgerProvider.ts b/src/core/providers/helpers/getLedgerProvider.ts similarity index 64% rename from src/core/providers/helpers/useSetLedgerProvider.ts rename to src/core/providers/helpers/getLedgerProvider.ts index c22fb90..8a1cb3c 100644 --- a/src/core/providers/helpers/useSetLedgerProvider.ts +++ b/src/core/providers/helpers/getLedgerProvider.ts @@ -6,7 +6,7 @@ import { getAccountProvider } from '../accountProvider'; import { logout } from 'core/methods/logout/logout'; import { getLedgerConfiguration } from './getLedgerConfiguration'; -export const setLedgerProvider = async () => { +export const getLedgerProvider = async () => { const isLoggedIn = getIsLoggedIn(); const ledgerLogin = ledgerLoginSelector(getState()); const provider = getAccountProvider(); @@ -23,47 +23,46 @@ export const setLedgerProvider = async () => { return provider; } - const hwWalletP = new HWProvider(); - const isInitialized = await hwWalletP.init(); + const ledgerProvider = new HWProvider(); + const isInitialized = await ledgerProvider.init(); if (!isInitialized) { return null; } if (hasAddressIndex) { - await hwWalletP.setAddressIndex(ledgerLogin.index); + await ledgerProvider.setAddressIndex(ledgerLogin.index); } - return hwWalletP; + return ledgerProvider; } catch (e) { - console.error('Failed to initialise Ledger Provider'); - + console.error('Failed to initialize Ledger Provider'); return null; } }; - let hwWalletP: HWProvider | null; - try { - hwWalletP = await initHWProvider(); + const ledgerProvider = await initHWProvider(); - if (!hwWalletP) { - console.warn('Could not initialise ledger app'); + if (!ledgerProvider) { + console.warn('Could not initialize ledger app'); if (isLoggedIn) { logout(); } - return; + return null; } - const ledgerConfig = await getLedgerConfiguration(hwWalletP); - return { hwWalletP, ledgerConfig }; + const ledgerConfig = await getLedgerConfiguration(ledgerProvider); + return { ledgerProvider, ledgerConfig }; } catch (err) { - console.error('Could not initialise ledger app', err); + console.error('Could not initialize ledger app', err); if (isLoggedIn) { logout(); } + + return null; } }; diff --git a/src/core/providers/helpers/utils.ts b/src/core/providers/helpers/utils.ts index 4b0341a..15d06f3 100644 --- a/src/core/providers/helpers/utils.ts +++ b/src/core/providers/helpers/utils.ts @@ -17,7 +17,7 @@ export const getProviderType = ( case WalletConnectV2Provider: return ProviderTypeEnum.walletConnect; case HWProvider: - return ProviderTypeEnum.hardware; + return ProviderTypeEnum.ledger; case ExtensionProvider: return ProviderTypeEnum.extension; case MetamaskProvider: From 12362425ee041ae87b149305c66a7f0f2a414e78 Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Tue, 17 Sep 2024 14:46:34 +0300 Subject: [PATCH 05/21] Signing with leder working --- src/core/methods/login/login.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/core/methods/login/login.ts b/src/core/methods/login/login.ts index c881cd4..7b9b695 100644 --- a/src/core/methods/login/login.ts +++ b/src/core/methods/login/login.ts @@ -49,22 +49,11 @@ async function loginWithNativeToken( noCache: true }); - const loginResult = await provider.login?.({ + const { address, signature, ...loginResult } = await provider.login?.({ callbackUrl: getCallbackUrl(), token: loginToken }); - const address = - loginResult?.address ?? provider.getAddress - ? // TODO check why on the second login the address is fetched asynchronously (looks like the crosswindow provider has getAddress as an async function) - await provider.getAddress() - : loginResult?.address; - - const signature = - loginResult?.signature ?? provider.getTokenLoginSignature - ? provider.getTokenLoginSignature() - : loginResult?.signature; - if (!address) { console.warn('Login cancelled.'); return null; From 4b6d84bfa1951c0c7753df5521a0cd23831b62a6 Mon Sep 17 00:00:00 2001 From: cipriandraghici Date: Tue, 17 Sep 2024 16:51:08 +0300 Subject: [PATCH 06/21] update packages --- .gitignore | 2 +- .yarnrc | 1 - package.json | 4 +- yarn.lock | 304 +++++++++++++++++++++++++-------------------------- 4 files changed, 155 insertions(+), 156 deletions(-) delete mode 100644 .yarnrc diff --git a/.gitignore b/.gitignore index 244d380..5a2a768 100644 --- a/.gitignore +++ b/.gitignore @@ -29,5 +29,5 @@ out npm-debug.log* yarn-debug.log* yarn-error.log* - +.yarnrc coverage diff --git a/.yarnrc b/.yarnrc deleted file mode 100644 index 6963428..0000000 --- a/.yarnrc +++ /dev/null @@ -1 +0,0 @@ -registry "http://localhost:4873" \ No newline at end of file diff --git a/package.json b/package.json index 78c810f..231cd3b 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "peerDependencies": { "@multiversx/sdk-core": ">= 13.0.0", "@multiversx/sdk-dapp-utils": ">= 0.1.0", - "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.0-alpha.0", + "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.0-alpha.1", "axios": ">=1.6.5", "bignumber.js": "9.x" }, @@ -57,7 +57,7 @@ "devDependencies": { "@multiversx/sdk-core": ">= 13.0.0", "@multiversx/sdk-dapp-utils": ">= 0.1.0", - "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.0-alpha.0", + "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.0-alpha.1", "@swc/core": "^1.4.17", "@swc/jest": "^0.2.36", "@types/node": "20.12.8", diff --git a/yarn.lock b/yarn.lock index eecba63..11d507a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -414,9 +414,9 @@ eslint-visitor-keys "^3.3.0" "@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" - integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== + version "4.11.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.1.tgz#a547badfc719eb3e5f4b556325e542fbe9d7a18f" + integrity sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q== "@eslint/eslintrc@^3.0.2": version "3.1.0" @@ -924,9 +924,9 @@ uuid "^9.0.1" "@metamask/utils@^9.0.0": - version "9.2.0" - resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-9.2.0.tgz#62c59a180fd7c3a08752009429ef2bdda8619a04" - integrity sha512-01riKC6oc6YJVJBL6g6TgCBwcmzwuVSIIMhnwvWanPWs3ZpUabJzy3GR9PlsBPa2pHd1p0Q6WMVRExWWEHzsQA== + version "9.2.1" + resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-9.2.1.tgz#d9f84706ff97e0c8d1bde5778549365b14269e81" + integrity sha512-/u663aUaB6+Xe75i3Mt/1cCljm41HDYIsna5oBrwGvgkY2zH7/9k9Zjd706cxoAbxN7QgLSVAReUiGnuxCuXrQ== dependencies: "@ethereumjs/tx" "^4.2.0" "@metamask/superstruct" "^3.1.0" @@ -980,9 +980,9 @@ protobufjs "7.2.4" "@multiversx/sdk-core@>= 13.0.0": - version "13.4.2" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-core/-/sdk-core-13.4.2.tgz#bfe524b9b18b631bef96acead7713d2d1ccab15c" - integrity sha512-+XdBSaX+iUMm9BRv86Tmzy16H3XS7TQ2/+HN12hCgP9TF003K8KABTCJnlyIrQ1oM5iI3ffbY+fEQpAwo+wQEQ== + version "13.6.1" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-core/-/sdk-core-13.6.1.tgz#5e36351701675e50ee93a1dc9725658c40a441ad" + integrity sha512-I3o+WcSkcX88ls8X15ZiHQHtl1cdB8oq1wVmqAdYfyNaKjnmQae94lb2qHbh89HCsuiTsMMEP4rrXiITQbRTOg== dependencies: "@multiversx/sdk-transaction-decoder" "1.0.2" bech32 "1.1.4" @@ -998,8 +998,8 @@ "@multiversx/sdk-extension-provider@4.0.0-alpha.0": version "4.0.0-alpha.0" - resolved "http://localhost:4873/@multiversx/sdk-extension-provider/-/sdk-extension-provider-4.0.0-alpha.0.tgz#d1705ffdeb9278682bdf6bf374987be8a0f8d40a" - integrity sha512-WGW/86sbbepgJb6x2+kqhLnXwzcxA0kLxRDCNdIyKQe+MWiT7f6ss4WVPt0WSvOLfEGu5cJDwQ4Zebj+hHWefA== + resolved "https://registry.yarnpkg.com/@multiversx/sdk-extension-provider/-/sdk-extension-provider-4.0.0-alpha.0.tgz#e00ba0df0d1ef8ac0330ff3f6f0c5ced8163c5b3" + integrity sha512-LPRy2sgWG1Ti3KMxembP0/13GHntenFK1kbXAfHUJiOH29s4nbGDqBlTI0p42en4c1BGlEbVJEfpUq1LtO5ZYA== "@multiversx/sdk-hw-provider@6.4.0": version "6.4.0" @@ -1069,10 +1069,10 @@ tweetnacl "1.0.3" uuid "8.3.2" -"@multiversx/sdk-web-wallet-cross-window-provider@>= 2.0.0-alpha.0": - version "2.0.0-alpha.0" - resolved "http://localhost:4873/@multiversx/sdk-web-wallet-cross-window-provider/-/sdk-web-wallet-cross-window-provider-2.0.0-alpha.0.tgz#076f658fdd4a07e18004a77d53b83163d8c59783" - integrity sha512-m9RYm+v5oly3jE7U2Ajv4npl81K7FYbssllOzD+PtfWzNlLxGPaXVVRY+NDJjWcodIV+IUXHDQqigluFya55ng== +"@multiversx/sdk-web-wallet-cross-window-provider@>= 2.0.0-alpha.1": + version "2.0.0-alpha.1" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-web-wallet-cross-window-provider/-/sdk-web-wallet-cross-window-provider-2.0.0-alpha.1.tgz#22c81ddbfd18bd741155c715a4cfebe78714b988" + integrity sha512-4QFPrZzArQ8BXLATj9h/xlZxK8fV0JfQTTuPQLkJGWnMEVOmX+203HLKQHgHdmg2r6suIqB2F3zVL2HqDsivDg== dependencies: "@types/jest" "^29.5.11" "@types/qs" "6.9.10" @@ -1102,11 +1102,16 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.0.tgz#085fd70f6d7d9d109671090ccae1d3bec62554a1" integrity sha512-ilHEACi9DwqJB0pw7kv+Apvh50jiiSyR/cQ3y4W7lOR5mhvn/50FLUfsnfJz0BDZtl/RR16kXvptiv6q1msYZg== -"@noble/hashes@1.4.0", "@noble/hashes@^1.3.1", "@noble/hashes@~1.4.0": +"@noble/hashes@1.4.0", "@noble/hashes@~1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== +"@noble/hashes@^1.3.1": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.5.0.tgz#abadc5ca20332db2b1b2aa3e496e9af1213570b0" + integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -1289,9 +1294,9 @@ integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== "@scure/base@^1.1.3", "@scure/base@~1.1.6": - version "1.1.7" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.7.tgz#fe973311a5c6267846aa131bc72e96c5d40d2b30" - integrity sha512-PPNYBslrLNNUQ/Yad37MHYsNQtK67EhWb6WtSvNLLPo7SdVZgkUjD6Dg+5On7zNwmskf8OX7I7Nx5oN+MIWE0g== + version "1.1.8" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.8.tgz#8f23646c352f020c83bca750a82789e246d42b50" + integrity sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg== "@scure/bip32@1.4.0": version "1.4.0" @@ -1463,74 +1468,74 @@ "@stablelib/random" "^1.0.2" "@stablelib/wipe" "^1.0.1" -"@swc/core-darwin-arm64@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.22.tgz#2ce216c4bb61627ff9689213e690ffc64ed02114" - integrity sha512-B2Bh2W+C7ALdGwDxRWAJ+UtNExfozvwyayGiNkbR3wmDKXXeQfhGM5MK+QYUWKu7UQ6ATq69OyZrxofDobKUug== - -"@swc/core-darwin-x64@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.7.22.tgz#78d028d72756193a1bedf3cc0766aede1b290878" - integrity sha512-s34UQntnQ6tL9hS9aX3xG7OfGhpmy05FEEndbHaooGO8O+L5k8uWxhE5KhYCOC0N803sGdZg6YZmKtYrWN/YxA== - -"@swc/core-linux-arm-gnueabihf@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.22.tgz#f95e45179e362dd5cfc3c9b8083af33e430195d9" - integrity sha512-SE69+oos1jLOXx5YdMH//Qc5zQc2xYukajB+0BWmkcFd/S/cCanGWYtdSzYausm8af2Fw1hPJMNIfndJLnBDFw== - -"@swc/core-linux-arm64-gnu@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.22.tgz#8058a7c18385cadf56ca7d2db4d6fa41e52f4bd3" - integrity sha512-59FzDW/ojgiTj4dlnv3Z3ESuVlzhSAq9X12CNYh4/WTCNA8BoJqOnWMRQKspWtoNlnVviFLMvpek0pGXHndEBA== - -"@swc/core-linux-arm64-musl@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.22.tgz#8d29b9574ad3ff615fcba85b6e661d510f48186e" - integrity sha512-cMQMI8YRO/XR3OrYuiUlWksNsJOZSkA6gSLNyH6eHTw+FOAzv05oJ4SFYe6s1WesrOqRwhpez6y5H6OIP/EKzg== - -"@swc/core-linux-x64-gnu@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.22.tgz#ad863612d32c00ec28b3dc3fc1a8418ca9c94f2b" - integrity sha512-639kA7MXrWqWYfwuSJ+XTg21VYb/5o99R1zJrndoEjEX6m7Wza/sXssQKU5jbbkPoSEKVKNP3n/gazLWiUKgiQ== - -"@swc/core-linux-x64-musl@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.22.tgz#421740384a738631b1bbc6202eeb5489ed5e356b" - integrity sha512-f3zfGgY8EJQUOk3ve25ZTkNkhB/kHo9QlN2r+0exaE1g9W7X8IS6J8pWzF3hJrV2P9dBi6ofMOt+opVA89JKHA== - -"@swc/core-win32-arm64-msvc@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.22.tgz#ba62979f394faabe8a4c964e5590169269d8170c" - integrity sha512-p/Fav5U+LtTJD/tbbS0dKK8SVVAhXo5Jdm1TDeBPJ4BEIVguYBZEXgD3CW9wY4K34g1hscpiz2Q2rktfhFj1+A== - -"@swc/core-win32-ia32-msvc@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.22.tgz#7fe30501e853298a552c2bd89306cc41d15f95c8" - integrity sha512-HbmfasaCNTqeCTvDjleYj+jJZQ6MlraiVOdhW55KtbA9mAVQdPBq6DDAvR7VOero3wUNYUM/e36otFKgEJI5Rg== - -"@swc/core-win32-x64-msvc@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.22.tgz#8be5c1f89c61c0d6412093398274b3cbc1b4b52f" - integrity sha512-lppIveE+hpe7WXny/9cUT+T6sBM/ND0E+dviKWJ5jFBISj2KWomlSJGUjYEsRGJVPnTEc8uOlKK7etmXBhQx9A== +"@swc/core-darwin-arm64@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.26.tgz#5f4096c00e71771ca1b18c824f0c92a052c70760" + integrity sha512-FF3CRYTg6a7ZVW4yT9mesxoVVZTrcSWtmZhxKCYJX9brH4CS/7PRPjAKNk6kzWgWuRoglP7hkjQcd6EpMcZEAw== + +"@swc/core-darwin-x64@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.7.26.tgz#867b7a4f094e6b64201090ca5fcbf3da7d0f3e22" + integrity sha512-az3cibZdsay2HNKmc4bjf62QVukuiMRh5sfM5kHR/JMTrLyS6vSw7Ihs3UTkZjUxkLTT8ro54LI6sV6sUQUbLQ== + +"@swc/core-linux-arm-gnueabihf@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.26.tgz#35bb43894def296d92aaa2cc9372d48042f37777" + integrity sha512-VYPFVJDO5zT5U3RpCdHE5v1gz4mmR8BfHecUZTmD2v1JeFY6fv9KArJUpjrHEEsjK/ucXkQFmJ0jaiWXmpOV9Q== + +"@swc/core-linux-arm64-gnu@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.26.tgz#8e2321cc4ec84cbfed8f8e16ff1ed7b854450443" + integrity sha512-YKevOV7abpjcAzXrhsl+W48Z9mZvgoVs2eP5nY+uoMAdP2b3GxC0Df1Co0I90o2lkzO4jYBpTMcZlmUXLdXn+Q== + +"@swc/core-linux-arm64-musl@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.26.tgz#b1c16e4b23ffa9ff19973eda6ffee35d2a7de7b0" + integrity sha512-3w8iZICMkQQON0uIcvz7+Q1MPOW6hJ4O5ETjA0LSP/tuKqx30hIniCGOgPDnv3UTMruLUnQbtBwVCZTBKR3Rkg== + +"@swc/core-linux-x64-gnu@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.26.tgz#388e2cc13a010cd28787aead2cecf31eb491836d" + integrity sha512-c+pp9Zkk2lqb06bNGkR2Looxrs7FtGDMA4/aHjZcCqATgp348hOKH5WPvNLBl+yPrISuWjbKDVn3NgAvfvpH4w== + +"@swc/core-linux-x64-musl@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.26.tgz#51e0ff30981f26d7a5b97a7a7b5b291bad050d1a" + integrity sha512-PgtyfHBF6xG87dUSSdTJHwZ3/8vWZfNIXQV2GlwEpslrOkGqy+WaiiyE7Of7z9AvDILfBBBcJvJ/r8u980wAfQ== + +"@swc/core-win32-arm64-msvc@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.26.tgz#a7fdcc4074c34ee6a026506b594d00323383c11f" + integrity sha512-9TNXPIJqFynlAOrRD6tUQjMq7KApSklK3R/tXgIxc7Qx+lWu8hlDQ/kVPLpU7PWvMMwC/3hKBW+p5f+Tms1hmA== + +"@swc/core-win32-ia32-msvc@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.26.tgz#ae7be6dde798eebee2000b8fd84e01a439b5bd6a" + integrity sha512-9YngxNcG3177GYdsTum4V98Re+TlCeJEP4kEwEg9EagT5s3YejYdKwVAkAsJszzkXuyRDdnHUpYbTrPG6FiXrQ== + +"@swc/core-win32-x64-msvc@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.26.tgz#310d607004d7319085a4dec20c0c38c3405cc05b" + integrity sha512-VR+hzg9XqucgLjXxA13MtV5O3C0bK0ywtLIBw/+a+O+Oc6mxFWHtdUeXDbIi5AiPbn0fjgVJMqYnyjGyyX8u0w== "@swc/core@^1.4.17": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.7.22.tgz#fe7d515bba08fdd29937eae6dc40077459634087" - integrity sha512-Asn79WKqyjEuO2VEeSnVjn2YiRMToRhFJwOsQeqftBvwWMn1FGUuzVcXtkQFBk37si8Gh2Vkk/+p0u4K5NxDig== + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.7.26.tgz#beda9b82063fcec7b56c958804a4d175aecf9a9d" + integrity sha512-f5uYFf+TmMQyYIoxkn/evWhNGuUzC730dFwAKGwBVHHVoPyak1/GvJUm6i1SKl+2Hrj9oN0i3WSoWWZ4pgI8lw== dependencies: "@swc/counter" "^0.1.3" "@swc/types" "^0.1.12" optionalDependencies: - "@swc/core-darwin-arm64" "1.7.22" - "@swc/core-darwin-x64" "1.7.22" - "@swc/core-linux-arm-gnueabihf" "1.7.22" - "@swc/core-linux-arm64-gnu" "1.7.22" - "@swc/core-linux-arm64-musl" "1.7.22" - "@swc/core-linux-x64-gnu" "1.7.22" - "@swc/core-linux-x64-musl" "1.7.22" - "@swc/core-win32-arm64-msvc" "1.7.22" - "@swc/core-win32-ia32-msvc" "1.7.22" - "@swc/core-win32-x64-msvc" "1.7.22" + "@swc/core-darwin-arm64" "1.7.26" + "@swc/core-darwin-x64" "1.7.26" + "@swc/core-linux-arm-gnueabihf" "1.7.26" + "@swc/core-linux-arm64-gnu" "1.7.26" + "@swc/core-linux-arm64-musl" "1.7.26" + "@swc/core-linux-x64-gnu" "1.7.26" + "@swc/core-linux-x64-musl" "1.7.26" + "@swc/core-win32-arm64-msvc" "1.7.26" + "@swc/core-win32-ia32-msvc" "1.7.26" + "@swc/core-win32-x64-msvc" "1.7.26" "@swc/counter@^0.1.3": version "0.1.3" @@ -1630,9 +1635,9 @@ "@types/istanbul-lib-report" "*" "@types/jest@^29.5.11": - version "29.5.12" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.12.tgz#7f7dc6eb4cf246d2474ed78744b05d06ce025544" - integrity sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw== + version "29.5.13" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.13.tgz#8bc571659f401e6a719a7bf0dbcb8b78c71a8adc" + integrity sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg== dependencies: expect "^29.0.0" pretty-format "^29.0.0" @@ -1680,9 +1685,9 @@ form-data "^4.0.0" "@types/node@*", "@types/node@>=13.7.0": - version "22.5.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.1.tgz#de01dce265f6b99ed32b295962045d10b5b99560" - integrity sha512-KkHsxej0j9IW1KKOOAA/XBA0z08UFSrRQHErzEfA3Vgq57eXIMYboIlHJuYIfd+lwCQjtKqUu3UnmKbtUc9yRw== + version "22.5.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.5.tgz#52f939dd0f65fc552a4ad0b392f3c466cc5d7a44" + integrity sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA== dependencies: undici-types "~6.19.2" @@ -2062,9 +2067,9 @@ acorn-jsx@^5.3.2: integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-walk@^8.0.2: - version "8.3.3" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" - integrity sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw== + version "8.3.4" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" + integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== dependencies: acorn "^8.11.0" @@ -2108,9 +2113,9 @@ ansi-regex@^5.0.1: integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-regex@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" - integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== + version "6.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.1.0.tgz#95ec409c69619d6cb1b8b34f14b660ef28ebd654" + integrity sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA== ansi-styles@^3.2.1: version "3.2.1" @@ -2273,9 +2278,9 @@ axios-mock-adapter@^1.22.0: is-buffer "^2.0.5" axios@>=1.6.5, axios@^1.7.4: - version "1.7.5" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.5.tgz#21eed340eb5daf47d29b6e002424b3e88c8c54b1" - integrity sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw== + version "1.7.7" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f" + integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q== dependencies: follow-redirects "^1.15.6" form-data "^4.0.0" @@ -2606,9 +2611,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001646: - version "1.0.30001655" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001655.tgz#0ce881f5a19a2dcfda2ecd927df4d5c1684b982f" - integrity sha512-jRGVy3iSGO5Uutn2owlb5gR6qsGngTw9ZTb4ali9f3glshcNmJ2noam4Mo9zia5P9Dk3jNNydy7vQjuE5dQmfg== + version "1.0.30001660" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001660.tgz#31218de3463fabb44d0b7607b652e56edf2e2355" + integrity sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg== chalk@^2.4.2: version "2.4.2" @@ -2673,9 +2678,9 @@ citty@^0.1.5, citty@^0.1.6: consola "^3.2.3" cjs-module-lexer@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.0.tgz#677de7ed7efff67cc40c9bf1897fea79d41b5215" - integrity sha512-N1NGmowPlGBLsOZLPvm48StN04V4YvQRL0i6b7ctrVY3epjP/ct7hFLOItz6pDIvRjwpfPxi52a2UWV2ziir8g== + version "1.4.1" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz#707413784dbb3a72aa11c2f2b042a0bef4004170" + integrity sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA== cli-cursor@^3.1.0: version "3.1.0" @@ -2947,11 +2952,11 @@ data-view-byte-offset@^1.0.0: is-data-view "^1.0.1" debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: - version "4.3.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" - integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== + version "4.3.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== dependencies: - ms "2.1.2" + ms "^2.1.3" debug@^3.2.7: version "3.2.7" @@ -3115,9 +3120,9 @@ ed2curve@0.3.0: tweetnacl "1.x.x" electron-to-chromium@^1.5.4: - version "1.5.13" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz#1abf0410c5344b2b829b7247e031f02810d442e6" - integrity sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q== + version "1.5.24" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.24.tgz#b3cd2f71b7a84bac340d862e3b7b0aadf48478de" + integrity sha512-0x0wLCmpdKFCi9ulhvYZebgcPmHTkFVUfU2wzDykadkslKwT4oAmDTHEKLnlrDsMGZe4B+ksn8quZfZjYsBetA== elliptic@^6.5.3, elliptic@^6.5.5: version "6.5.7" @@ -3366,9 +3371,9 @@ eslint-import-resolver-typescript@3.6.1: is-glob "^4.0.3" eslint-module-utils@^2.7.4, eslint-module-utils@^2.8.0: - version "2.8.2" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.2.tgz#2ecad69d71e1fa81f17f7f24d5d3e46b168de663" - integrity sha512-3XnC5fDyc8M4J2E8pt8pmSVRX2M+5yWMCfI/kDZwauQeFgzQOuhcRBFKjTeJagqgk4sFKxe1mvNVnaWwImx/Tg== + version "2.11.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.11.0.tgz#b99b211ca4318243f09661fae088f373ad5243c4" + integrity sha512-gbBE5Hitek/oG6MUVj6sFuzEjA/ClzNflVrLovHi/JgLdC7fiN5gLAY1WIPW1a0V5I999MnsrvVrCOGmmVqDBQ== dependencies: debug "^3.2.7" @@ -3738,9 +3743,9 @@ flatted@^3.2.9: integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== follow-redirects@^1.15.6: - version "1.15.6" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" - integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== + version "1.15.9" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1" + integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== for-each@^0.3.3: version "0.3.3" @@ -3847,9 +3852,9 @@ get-symbol-description@^1.0.2: get-intrinsic "^1.2.4" get-tsconfig@^4.5.0: - version "4.8.0" - resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.8.0.tgz#125dc13a316f61650a12b20c97c11b8fd996fedd" - integrity sha512-Pgba6TExTZ0FJAn1qkJAjIeKoDJ3CsI2ChuLohJnZl/tTU8MVrq3b+2t5UOPfRa4RMsorClBjJALkJUMjG1PAw== + version "4.8.1" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.8.1.tgz#8995eb391ae6e1638d251118c7b56de7eb425471" + integrity sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg== dependencies: resolve-pkg-maps "^1.0.0" @@ -3943,7 +3948,7 @@ graphemer@^1.4.0: resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.9.0.tgz#1c310e63f16a49ce1fbb230bd0a000e99f6f115f" integrity sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw== -h3@^1.10.2, h3@^1.11.1: +h3@^1.10.2, h3@^1.12.0: version "1.12.0" resolved "https://registry.yarnpkg.com/h3/-/h3-1.12.0.tgz#9d7f05f08a997d263e484b02436cb027df3026d8" integrity sha512-Zi/CcNeWBXDrFNlV0hUBJQR9F7a96RjMeAZweW/ZWkR9fuXrMcvKnSA63f/zZ9l0GgQOZDVHGvXivNN9PWOwhA== @@ -5146,7 +5151,7 @@ loose-envify@^1.1.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" -lru-cache@^10.2.0: +lru-cache@^10.2.0, lru-cache@^10.4.3: version "10.4.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== @@ -5293,12 +5298,7 @@ mri@^1.2.0: resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@^2.1.1: +ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -5349,9 +5349,9 @@ nanoassert@^1.0.0: integrity sha512-C40jQ3NzfkP53NsO8kEOFd79p4b9kDXQMwgiY1z8ZwrDZgUyom0AHwGegF4Dm99L+YoYhuaB0ceerUcXmqr1rQ== napi-wasm@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/napi-wasm/-/napi-wasm-1.1.0.tgz#bbe617823765ae9c1bc12ff5942370eae7b2ba4e" - integrity sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg== + version "1.1.3" + resolved "https://registry.yarnpkg.com/napi-wasm/-/napi-wasm-1.1.3.tgz#7bb95c88e6561f84880bb67195437b1cfbe99224" + integrity sha512-h/4nMGsHjZDCYmQVNODIrYACVJ+I9KItbG+0si6W/jSjdA9JbWDoU4LLeMXVcEQGHjttI2tuXqDrbGF7qkUHHg== natural-compare@^1.4.0: version "1.4.0" @@ -5368,7 +5368,7 @@ node-addon-api@^7.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-7.1.1.tgz#1aba6693b0f255258a049d621329329322aad558" integrity sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ== -node-fetch-native@^1.6.2, node-fetch-native@^1.6.3, node-fetch-native@^1.6.4: +node-fetch-native@^1.6.3, node-fetch-native@^1.6.4: version "1.6.4" resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.6.4.tgz#679fc8fd8111266d47d7e72c379f1bed9acff06e" integrity sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ== @@ -5513,7 +5513,7 @@ object.values@^1.1.7: define-properties "^1.2.1" es-object-atoms "^1.0.0" -ofetch@^1.3.3: +ofetch@^1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/ofetch/-/ofetch-1.3.4.tgz#7ea65ced3c592ec2b9906975ae3fe1d26a56f635" integrity sha512-KLIET85ik3vhEfS+3fDlc/BAZiAp+43QEC/yCo5zkNoY2YaKvNkOaFr/6wCFgFH1kuYQM5pMNi0Tg8koiIemtw== @@ -5523,9 +5523,9 @@ ofetch@^1.3.3: ufo "^1.5.3" ohash@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/ohash/-/ohash-1.1.3.tgz#f12c3c50bfe7271ce3fd1097d42568122ccdcf07" - integrity sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw== + version "1.1.4" + resolved "https://registry.yarnpkg.com/ohash/-/ohash-1.1.4.tgz#ae8d83014ab81157d2c285abf7792e2995fadd72" + integrity sha512-FlDryZAahJmEF3VR3w1KogSEdWX3WhA5GPakFx4J81kEAiHyLMpdLLElS8n8dfNadMgAne/MywcvmogzscVt4g== on-exit-leak-free@^0.2.0: version "0.2.0" @@ -5713,9 +5713,9 @@ path-scurry@^1.11.1: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-to-regexp@^6.2.0: - version "6.2.2" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.2.tgz#324377a83e5049cbecadc5554d6a63a9a4866b36" - integrity sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw== + version "6.3.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.3.0.tgz#2b6a26a337737a8e1416f9272ed0766b1c0389f4" + integrity sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ== path-type@^4.0.0: version "4.0.0" @@ -5739,9 +5739,9 @@ pbkdf2@^3.0.3, pbkdf2@^3.0.9, pbkdf2@^3.1.2: sha.js "^2.4.8" picocolors@^1.0.0, picocolors@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" - integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== + version "1.1.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" + integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" @@ -6805,11 +6805,11 @@ typed-array-length@^1.0.6: possible-typed-array-names "^1.0.0" typescript@^5.4.5: - version "5.5.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" - integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== + version "5.6.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0" + integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw== -ufo@^1.4.0, ufo@^1.5.3: +ufo@^1.4.0, ufo@^1.5.3, ufo@^1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.4.tgz#16d6949674ca0c9e0fbbae1fa20a71d7b1ded754" integrity sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ== @@ -6868,20 +6868,20 @@ universalify@^0.2.0: integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== unstorage@^1.9.0: - version "1.10.2" - resolved "https://registry.yarnpkg.com/unstorage/-/unstorage-1.10.2.tgz#fb7590ada8b30e83be9318f85100158b02a76dae" - integrity sha512-cULBcwDqrS8UhlIysUJs2Dk0Mmt8h7B0E6mtR+relW9nZvsf/u4SkAYyNliPiPW7XtFNb5u3IUMkxGxFTTRTgQ== + version "1.12.0" + resolved "https://registry.yarnpkg.com/unstorage/-/unstorage-1.12.0.tgz#a215895dfdef01ffb8ff529bb3869dbf947d8498" + integrity sha512-ARZYTXiC+e8z3lRM7/qY9oyaOkaozCeNd2xoz7sYK9fv7OLGhVsf+BZbmASqiK/HTZ7T6eAlnVq9JynZppyk3w== dependencies: anymatch "^3.1.3" chokidar "^3.6.0" destr "^2.0.3" - h3 "^1.11.1" + h3 "^1.12.0" listhen "^1.7.2" - lru-cache "^10.2.0" + lru-cache "^10.4.3" mri "^1.2.0" - node-fetch-native "^1.6.2" - ofetch "^1.3.3" - ufo "^1.4.0" + node-fetch-native "^1.6.4" + ofetch "^1.3.4" + ufo "^1.5.4" untun@^0.1.3: version "0.1.3" From 49bcab1aff1bba94ff2b4482567ceee126557291 Mon Sep 17 00:00:00 2001 From: cipriandraghici Date: Tue, 17 Sep 2024 16:55:25 +0300 Subject: [PATCH 07/21] fix build --- src/core/providers/ProviderFactory.ts | 8 -- yarn.lock | 139 +++++++++++++------------- 2 files changed, 69 insertions(+), 78 deletions(-) diff --git a/src/core/providers/ProviderFactory.ts b/src/core/providers/ProviderFactory.ts index 37cc079..8f18545 100644 --- a/src/core/providers/ProviderFactory.ts +++ b/src/core/providers/ProviderFactory.ts @@ -29,14 +29,6 @@ export class ProviderFactory { const provider = await this.getExtensionProvider(); createdProvider = provider as unknown as IProvider; - createdProvider.getAddress = () => { - return Promise.resolve(provider.account.address); - }; - - createdProvider.getTokenLoginSignature = () => { - return provider.account.signature; - }; - createdProvider.getType = () => { return ProviderTypeEnum.extension; }; diff --git a/yarn.lock b/yarn.lock index 11d507a..d12667f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -965,20 +965,6 @@ resolved "https://registry.yarnpkg.com/@multiversx/sdk-bls-wasm/-/sdk-bls-wasm-0.3.5.tgz#2e83308fdc7a0928c6d5a7f910d796fd8eb2d90b" integrity sha512-c0tIdQUnbBLSt6NYU+OpeGPYdL0+GV547HeHT8Xc0BKQ7Cj0v82QUoA2QRtWrR1G4MNZmLsIacZSsf6DrIS2Bw== -"@multiversx/sdk-core@12.18.0": - version "12.18.0" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-core/-/sdk-core-12.18.0.tgz#ae99665f9afb2bd4f1e325cb7daabb1dbcc55ca6" - integrity sha512-F+xGslPMkkZ0S/Q8UJZsMYl0mgHIuK/GdVsNFPiMKxQsKkxA2LTjNdPxVxjwgvRmN7WfdsTtQvmlsA5O1NYhBg== - dependencies: - "@multiversx/sdk-transaction-decoder" "1.0.2" - bech32 "1.1.4" - bignumber.js "9.0.1" - blake2b "2.1.3" - buffer "6.0.3" - json-duplicate-key-handle "1.0.0" - keccak "3.0.2" - protobufjs "7.2.4" - "@multiversx/sdk-core@>= 13.0.0": version "13.6.1" resolved "https://registry.yarnpkg.com/@multiversx/sdk-core/-/sdk-core-13.6.1.tgz#5e36351701675e50ee93a1dc9725658c40a441ad" @@ -1015,13 +1001,12 @@ buffer "6.0.3" platform "1.3.6" -"@multiversx/sdk-metamask-provider@0.0.5": - version "0.0.5" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-metamask-provider/-/sdk-metamask-provider-0.0.5.tgz#9f07ec8b9d1d2b2d88e8a9bccc149f01f144be37" - integrity sha512-IicSD/0G6/ZyU5j1Q6YXcXqILZu54ZjvoN1iunffYCDYeBSt1RZrUUdvBAfzjx47ubvX8Ic0iVbfgykjBCLfCQ== +"@multiversx/sdk-metamask-provider@0.0.7": + version "0.0.7" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-metamask-provider/-/sdk-metamask-provider-0.0.7.tgz#d53e15493a94d44490c47ea8e9a3eafa9b63591b" + integrity sha512-eqA1z/QIflauv5lqetKw2J5E7UooSTcHbZsxwkquWFnO6j1hj35/odS4P8AcbCOVssenZ+THkLOR7kxx5l7e5g== dependencies: "@metamask/providers" "16.0.0" - "@multiversx/sdk-core" "12.18.0" "@multiversx/sdk-native-auth-client@^1.0.8": version "1.0.9" @@ -1334,6 +1319,11 @@ dependencies: "@sinonjs/commons" "^3.0.0" +"@socket.io/component-emitter@~3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz#821f8442f4175d8f0467b9daf26e3a18e2d02af2" + integrity sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA== + "@stablelib/aead@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@stablelib/aead/-/aead-1.0.1.tgz#c4b1106df9c23d1b867eb9b276d8f42d5fc4c0c3" @@ -1666,10 +1656,10 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/lodash@^4.17.4": - version "4.17.7" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.7.tgz#2f776bcb53adc9e13b2c0dfd493dfcbd7de43612" - integrity sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA== +"@types/lodash@4.17.4": + version "4.17.4" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.4.tgz#0303b64958ee070059e3a7184048a55159fe20b7" + integrity sha512-wYCP26ZLxaT3R39kiN2+HcJ4kTd3U1waI/cY7ivWYqFP6pW3ZNpvi6Wd6PHZx7T/t8z0vlkXMg3QYLa7DZ/IJQ== "@types/ms@*": version "0.7.34" @@ -2349,11 +2339,6 @@ babel-preset-jest@^29.6.3: babel-plugin-jest-hoist "^29.6.3" babel-preset-current-node-syntax "^1.0.0" -backslash@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/backslash/-/backslash-0.2.0.tgz#6c3c1fce7e7e714ccfc10fd74f0f73410677375f" - integrity sha512-Avs+8FUZ1HF/VFP4YWwHQZSGzRPm37ukU1JQYQWijuHhtXdOuAzcZ8PcAzfIw898a8PyBzdn+RtnKA6MzW0X2A== - balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -2374,11 +2359,6 @@ bech32@^2.0.0: resolved "https://registry.yarnpkg.com/bech32/-/bech32-2.0.0.tgz#078d3686535075c8c79709f054b1b226a133b355" integrity sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg== -bignumber.js@9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.1.tgz#8d7ba124c882bfd8e43260c67475518d0689e4e5" - integrity sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA== - bignumber.js@9.x, bignumber.js@^9.0.0: version "9.1.2" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" @@ -2951,7 +2931,7 @@ data-view-byte-offset@^1.0.0: es-errors "^1.3.0" is-data-view "^1.0.1" -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: version "4.3.7" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== @@ -3154,6 +3134,22 @@ end-of-stream@^1.4.1: dependencies: once "^1.4.0" +engine.io-client@~6.5.2: + version "6.5.4" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-6.5.4.tgz#b8bc71ed3f25d0d51d587729262486b4b33bd0d0" + integrity sha512-GeZeeRjpD2qf49cZQ0Wvh/8NJNfeXkXXcoGh+F77oEAgo9gUHwT1fCRxSNU+YEEaysOJTnsFHmM5oAcPy4ntvQ== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + engine.io-parser "~5.2.1" + ws "~8.17.1" + xmlhttprequest-ssl "~2.0.0" + +engine.io-parser@~5.2.1: + version "5.2.3" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.2.3.tgz#00dc5b97b1f233a23c9398d0209504cf5f94d92f" + integrity sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q== + enhanced-resolve@^5.12.0: version "5.17.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" @@ -4448,7 +4444,7 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -isomorphic-fetch@^3.0.0: +isomorphic-fetch@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz#0267b005049046d2421207215d45d6a262b8b8b4" integrity sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA== @@ -4982,13 +4978,6 @@ json-buffer@3.0.1: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== -json-duplicate-key-handle@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-duplicate-key-handle/-/json-duplicate-key-handle-1.0.0.tgz#0678bd17822d23d8c0d0958b43011875fa37f363" - integrity sha512-OLIxL+UpfwUsqcLX3i6Z51ChTou/Vje+6bSeGUSubj96dF/SfjObDprLy++ZXYH07KITuEzsXS7PX7e/BGf4jw== - dependencies: - backslash "^0.2.0" - json-parse-even-better-errors@^2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" @@ -5126,7 +5115,7 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash@^4.17.21: +lodash@4.17.21, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -5877,24 +5866,6 @@ prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.5" -protobufjs@7.2.4: - version "7.2.4" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.4.tgz#3fc1ec0cdc89dd91aef9ba6037ba07408485c3ae" - integrity sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ== - dependencies: - "@protobufjs/aspromise" "^1.1.2" - "@protobufjs/base64" "^1.1.2" - "@protobufjs/codegen" "^2.0.4" - "@protobufjs/eventemitter" "^1.1.0" - "@protobufjs/fetch" "^1.1.0" - "@protobufjs/float" "^1.0.2" - "@protobufjs/inquire" "^1.1.0" - "@protobufjs/path" "^1.1.2" - "@protobufjs/pool" "^1.1.0" - "@protobufjs/utf8" "^1.1.0" - "@types/node" ">=13.7.0" - long "^5.0.0" - protobufjs@^7.3.0: version "7.4.0" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.4.0.tgz#7efe324ce9b3b61c82aae5de810d287bc08a248a" @@ -6341,6 +6312,24 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +socket.io-client@4.7.5: + version "4.7.5" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-4.7.5.tgz#919be76916989758bdc20eec63f7ee0ae45c05b7" + integrity sha512-sJ/tqHOCe7Z50JCBCXrsY3I2k03iOiUe+tj1OmKeD2lXPiGH/RUCdTZFoqVyN7l1MnpIzPrGtLcijffmeouNlQ== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.2" + engine.io-client "~6.5.2" + socket.io-parser "~4.2.4" + +socket.io-parser@~4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83" + integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + sonic-boom@^2.2.1: version "2.8.0" resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-2.8.0.tgz#c1def62a77425090e6ad7516aad8eb402e047611" @@ -6928,10 +6917,10 @@ url@^0.11.0: punycode "^1.4.1" qs "^6.12.3" -use-sync-external-store@1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz#c3b6390f3a30eba13200d2302dcdf1e7b57b2ef9" - integrity sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw== +use-sync-external-store@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" + integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" @@ -7149,6 +7138,11 @@ ws@^8.11.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== +ws@~8.17.1: + version "8.17.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" + integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== + xml-name-validator@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" @@ -7159,6 +7153,11 @@ xmlchars@^2.2.0: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== +xmlhttprequest-ssl@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67" + integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== + xtend@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" @@ -7197,9 +7196,9 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== -zustand@^4.4.7: - version "4.5.5" - resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.5.5.tgz#f8c713041543715ec81a2adda0610e1dc82d4ad1" - integrity sha512-+0PALYNJNgK6hldkgDq2vLrw5f6g/jCInz52n9RTpropGgeAf/ioFUCdtsjCqu4gNhW9D01rUQBROoRjdzyn2Q== +zustand@4.4.7: + version "4.4.7" + resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.4.7.tgz#355406be6b11ab335f59a66d2cf9815e8f24038c" + integrity sha512-QFJWJMdlETcI69paJwhSMJz7PPWjVP8Sjhclxmxmxv/RYI7ZOvR5BHX+ktH0we9gTWQMxcne8q1OY8xxz604gw== dependencies: - use-sync-external-store "1.2.2" + use-sync-external-store "1.2.0" From c2c1fa51de5866a0ca73150e30184b59c46dae15 Mon Sep 17 00:00:00 2001 From: cipriandraghici Date: Tue, 17 Sep 2024 17:06:53 +0300 Subject: [PATCH 08/21] update signMessage method and add TODOs for next steps --- src/core/methods/login/login.ts | 12 +----------- src/core/methods/signMessage/signMessage.ts | 16 +++++++++------- .../actions/transactions/transactionsActions.ts | 2 +- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/src/core/methods/login/login.ts b/src/core/methods/login/login.ts index d4e0b13..193f84f 100644 --- a/src/core/methods/login/login.ts +++ b/src/core/methods/login/login.ts @@ -51,20 +51,10 @@ async function loginWithNativeToken( noCache: true }); - const loginResult = await provider.login?.({ - // TODO remove callbackUrl when the provider will be standardized - callbackUrl: getCallbackUrl(), + const { address, signature, ...loginResult } = await provider.login?.({ token: loginToken }); - const address = provider.getAddress - ? // TODO check why on the second login the address is fetched asynchronously (looks like the crosswindow provider has getAddress as an async function) - await provider.getAddress() - : loginResult?.address; - const signature = provider.getTokenLoginSignature - ? provider.getTokenLoginSignature() - : loginResult?.signature; - if (!address) { console.warn('Login cancelled.'); return null; diff --git a/src/core/methods/signMessage/signMessage.ts b/src/core/methods/signMessage/signMessage.ts index cc96f2e..c52211b 100644 --- a/src/core/methods/signMessage/signMessage.ts +++ b/src/core/methods/signMessage/signMessage.ts @@ -1,4 +1,4 @@ -import { SignableMessage, Address } from '@multiversx/sdk-core'; +import { Message, Address } from '@multiversx/sdk-core'; import { getAccountProvider } from 'core/providers'; import { getProviderType } from 'core/providers/helpers/utils'; import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider'; @@ -8,7 +8,7 @@ import { addOriginToLocationPath } from 'utils/window/addOriginToLocationPath'; import { ProviderTypeEnum } from 'core/providers/types/providerFactory.types'; export interface SignMessageType { - message: string; + message: Message; callbackRoute?: string; options?: { hasConsentPopup?: boolean; @@ -20,15 +20,15 @@ export const signMessage = async ({ message, callbackRoute, options -}: SignMessageType): Promise> => { +}: SignMessageType): Promise> => { const address = getAddress(); const provider = getAccountProvider(); const providerType = getProviderType(provider); const callbackUrl = addOriginToLocationPath(callbackRoute); - const signableMessage = new SignableMessage({ + const messageToSign = new Message({ address: new Address(address), - message: Buffer.from(message, 'ascii') + data: message.data }); if ( @@ -40,9 +40,11 @@ export const signMessage = async ({ ); } - const signedMessage = await provider.signMessage(signableMessage, { + // TODO upgrade sdk-dapp-utils to use Message as input for signMessage method and remove the cast + const signedMessage = await provider.signMessage(messageToSign as any, { callbackUrl: encodeURIComponent(callbackUrl) }); - return signedMessage; + // TODO upgrade sdk-dapp-utils to return Message instead of SignableMessage and remove the cast + return signedMessage as Nullable; }; diff --git a/src/store/actions/transactions/transactionsActions.ts b/src/store/actions/transactions/transactionsActions.ts index 5b431f6..58f096c 100644 --- a/src/store/actions/transactions/transactionsActions.ts +++ b/src/store/actions/transactions/transactionsActions.ts @@ -69,7 +69,7 @@ export const updateSignedTransactionStatus = ( return { ...(serverTransaction ?? {}), ...transaction, - status: status as TransactionServerStatusesEnum, // TODO: @CiprianDraghici is this correct?s + status: status as TransactionServerStatusesEnum, errorMessage, inTransit }; From 7064b5756e7e9741288226da4dc0cac8febb7772 Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Thu, 19 Sep 2024 12:16:35 +0300 Subject: [PATCH 09/21] Upgrade packages --- package.json | 8 +- .../getAreAllTransactionsSignedByGuardian.ts | 21 + .../helpers/getGuardedTransactions.ts | 35 ++ .../signTransactions/signTransactions.ts | 7 +- src/core/providers/ProviderFactory.ts | 4 +- yarn.lock | 358 +++++++++--------- 6 files changed, 251 insertions(+), 182 deletions(-) create mode 100644 src/core/methods/signTransactions/helpers/getAreAllTransactionsSignedByGuardian.ts create mode 100644 src/core/methods/signTransactions/helpers/getGuardedTransactions.ts diff --git a/package.json b/package.json index 94b49ab..d1498e0 100644 --- a/package.json +++ b/package.json @@ -45,9 +45,9 @@ "zustand": "4.4.7" }, "peerDependencies": { - "@multiversx/sdk-core": ">= 13.0.0", + "@multiversx/sdk-core": ">= 13.5.0", "@multiversx/sdk-dapp-utils": ">= 0.1.0", - "@multiversx/sdk-web-wallet-cross-window-provider": ">= 1.0.0", + "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.0", "axios": ">=1.6.5", "bignumber.js": "9.x" }, @@ -56,9 +56,9 @@ }, "devDependencies": { "@types/lodash": "4.17.4", - "@multiversx/sdk-core": ">= 13.0.0", + "@multiversx/sdk-core": ">= 13.5.0", "@multiversx/sdk-dapp-utils": ">= 0.1.0", - "@multiversx/sdk-web-wallet-cross-window-provider": ">= 1.0.0", + "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.0", "@swc/core": "^1.4.17", "@swc/jest": "^0.2.36", "@types/node": "20.12.8", diff --git a/src/core/methods/signTransactions/helpers/getAreAllTransactionsSignedByGuardian.ts b/src/core/methods/signTransactions/helpers/getAreAllTransactionsSignedByGuardian.ts new file mode 100644 index 0000000..3a6dd71 --- /dev/null +++ b/src/core/methods/signTransactions/helpers/getAreAllTransactionsSignedByGuardian.ts @@ -0,0 +1,21 @@ +import { Transaction } from '@multiversx/sdk-core/out'; + +export const getAreAllTransactionsSignedByGuardian = ({ + transactions, + isGuarded +}: { + transactions: Transaction[]; + isGuarded?: boolean; +}) => { + if (!isGuarded) { + return true; + } + + if (transactions.length === 0) { + return false; + } + + return transactions.every((tx) => + Boolean(tx.getGuardianSignature().toString('hex')) + ); +}; diff --git a/src/core/methods/signTransactions/helpers/getGuardedTransactions.ts b/src/core/methods/signTransactions/helpers/getGuardedTransactions.ts new file mode 100644 index 0000000..3bfc3f3 --- /dev/null +++ b/src/core/methods/signTransactions/helpers/getGuardedTransactions.ts @@ -0,0 +1,35 @@ +import { Transaction } from '@multiversx/sdk-core'; +import { getAreAllTransactionsSignedByGuardian } from './getAreAllTransactionsSignedByGuardian'; +import { ProviderFactory } from 'core/providers/ProviderFactory'; +import { getAccount } from 'core/methods/account/getAccount'; +import { walletAddressSelector } from 'store/selectors'; +import { getState } from 'store/store'; + +export const getGuardedTransactions = async ({ + transactions +}: { + transactions: Transaction[]; +}): Promise => { + const { isGuarded, address } = getAccount(); + const walletAddress = walletAddressSelector(getState()); + + const allSignedByGuardian = getAreAllTransactionsSignedByGuardian({ + isGuarded, + transactions + }); + + if (!isGuarded || (isGuarded && allSignedByGuardian)) { + return transactions; + } + + const factory = new ProviderFactory(); + const provider = await factory.createCrossWindowProvider({ + address, + walletAddress + }); + provider.setShouldShowConsentPopup(true); + + const guardedTransactions = await provider.guardTransactions(transactions); + + return guardedTransactions; +}; diff --git a/src/core/methods/signTransactions/signTransactions.ts b/src/core/methods/signTransactions/signTransactions.ts index 3ced0d2..1ca37b3 100644 --- a/src/core/methods/signTransactions/signTransactions.ts +++ b/src/core/methods/signTransactions/signTransactions.ts @@ -5,6 +5,7 @@ import { } from '@multiversx/sdk-core/out'; import { getAccountProvider } from 'core/providers'; import { getAccount } from '../account/getAccount'; +import { getGuardedTransactions } from './helpers/getGuardedTransactions'; type SignTransactionsOptionsType = { skipGuardian?: boolean; @@ -31,5 +32,9 @@ export const signTransactions = async ( const signedTransactions: Transaction[] = (await provider.signTransactions(transacitonsToSign)) ?? []; - return signedTransactions; + const guardedTransactions = isGuarded + ? await getGuardedTransactions({ transactions: signedTransactions }) + : signedTransactions; + + return guardedTransactions; }; diff --git a/src/core/providers/ProviderFactory.ts b/src/core/providers/ProviderFactory.ts index 604bf17..4377eb5 100644 --- a/src/core/providers/ProviderFactory.ts +++ b/src/core/providers/ProviderFactory.ts @@ -45,7 +45,7 @@ export class ProviderFactory { case ProviderTypeEnum.crossWindow: { const { walletAddress } = config.network; - const provider = await this.getCrossWindowProvider({ + const provider = await this.createCrossWindowProvider({ walletAddress, address: config.account?.address || '' }); @@ -167,7 +167,7 @@ export class ProviderFactory { return createdProvider; } - private async getCrossWindowProvider({ + public async createCrossWindowProvider({ address, walletAddress }: { diff --git a/yarn.lock b/yarn.lock index 928b469..76c8777 100644 --- a/yarn.lock +++ b/yarn.lock @@ -414,9 +414,9 @@ eslint-visitor-keys "^3.3.0" "@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" - integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== + version "4.11.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.1.tgz#a547badfc719eb3e5f4b556325e542fbe9d7a18f" + integrity sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q== "@eslint/eslintrc@^3.0.2": version "3.1.0" @@ -763,12 +763,12 @@ rxjs "6" semver "^7.3.5" -"@ledgerhq/devices@^8.0.3", "@ledgerhq/devices@^8.0.5", "@ledgerhq/devices@^8.4.2": - version "8.4.2" - resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.4.2.tgz#f1c56194cf1343d56cad49c8feba92ad93432e14" - integrity sha512-oWNTp3jCMaEvRHsXNYE/yo+PFMgXAJGFHLOU1UdE4/fYkniHbD9wdxwyZrZvrxr9hNw4/9wHiThyITwPtMzG7g== +"@ledgerhq/devices@^8.0.3", "@ledgerhq/devices@^8.0.5", "@ledgerhq/devices@^8.4.3": + version "8.4.3" + resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.4.3.tgz#4c296df4dd4af6f1085d728609b6931a640baf86" + integrity sha512-+ih+M27E6cm6DHrmw3GbS3mEaznCyFc0e62VdQux40XK2psgYhL2yBPftM4KCrBYm1UbHqXzqLN+Jb7rNIzsHg== dependencies: - "@ledgerhq/errors" "^6.18.0" + "@ledgerhq/errors" "^6.19.0" "@ledgerhq/logs" "^6.12.0" rxjs "^7.8.1" semver "^7.3.5" @@ -778,10 +778,10 @@ resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.12.6.tgz#f89c82c91c2930f34bc3e0d86a27ec7b6e6e4f5f" integrity sha512-D+r2B09vaRO06wfGoss+rNgwqWSoK0bCtsaJWzlD2hv1zxTtucqVtSztbRFypIqxWTCb3ix5Nh2dWHEJVTp2Xw== -"@ledgerhq/errors@^6.12.6", "@ledgerhq/errors@^6.13.0", "@ledgerhq/errors@^6.18.0": - version "6.18.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.18.0.tgz#d55d6a57430d7a86532a9033ce0b45103264c620" - integrity sha512-L3jQWAGyooxRDk/MRlW2v4Ji9+kloBtdmz9wBkHaj2j0n+05rweJSV3GHw9oye1BYMbVFqFffmT4H3hlXlCasw== +"@ledgerhq/errors@^6.12.6", "@ledgerhq/errors@^6.13.0", "@ledgerhq/errors@^6.19.0": + version "6.19.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.19.0.tgz#ed4f01df3dabfcdeb0b073159d66cb5f2d086243" + integrity sha512-c3Jid7euMSnpHFp8H7iPtsmKDjwbTjlG46YKdw+RpCclsqtBx1uQDlYmcbP1Yv9201kVlUFUhhP4H623k8xzlQ== "@ledgerhq/hw-transport-web-ble@6.27.17": version "6.27.17" @@ -824,12 +824,12 @@ events "^3.3.0" "@ledgerhq/hw-transport@^6.28.4", "@ledgerhq/hw-transport@^6.28.6": - version "6.31.2" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.31.2.tgz#79c95f7928a64a0e3b5bc4ea7b5be04b9f738322" - integrity sha512-B27UIzMzm2IXPGYnEB95R7eHxpXBkTBHh6MUJJQZVknt8LilEz1tfpTYUdzAKDGQ+Z5MZyYb01Eh3Zqm3kn3uw== + version "6.31.3" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.31.3.tgz#ceecea278ee200dbb8d7e2ce5e47e09a287c1611" + integrity sha512-rFplkHWF5NXtlYwAusqLlMu298NHtRD+2q/jrTYc//uu/xJO9LkDIgKid6IVF2+e1Wj7yX6YQVrU6L0Yu1ntEw== dependencies: - "@ledgerhq/devices" "^8.4.2" - "@ledgerhq/errors" "^6.18.0" + "@ledgerhq/devices" "^8.4.3" + "@ledgerhq/errors" "^6.19.0" "@ledgerhq/logs" "^6.12.0" events "^3.3.0" @@ -924,9 +924,9 @@ uuid "^9.0.1" "@metamask/utils@^9.0.0": - version "9.2.0" - resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-9.2.0.tgz#62c59a180fd7c3a08752009429ef2bdda8619a04" - integrity sha512-01riKC6oc6YJVJBL6g6TgCBwcmzwuVSIIMhnwvWanPWs3ZpUabJzy3GR9PlsBPa2pHd1p0Q6WMVRExWWEHzsQA== + version "9.2.1" + resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-9.2.1.tgz#d9f84706ff97e0c8d1bde5778549365b14269e81" + integrity sha512-/u663aUaB6+Xe75i3Mt/1cCljm41HDYIsna5oBrwGvgkY2zH7/9k9Zjd706cxoAbxN7QgLSVAReUiGnuxCuXrQ== dependencies: "@ethereumjs/tx" "^4.2.0" "@metamask/superstruct" "^3.1.0" @@ -965,10 +965,10 @@ resolved "https://registry.yarnpkg.com/@multiversx/sdk-bls-wasm/-/sdk-bls-wasm-0.3.5.tgz#2e83308fdc7a0928c6d5a7f910d796fd8eb2d90b" integrity sha512-c0tIdQUnbBLSt6NYU+OpeGPYdL0+GV547HeHT8Xc0BKQ7Cj0v82QUoA2QRtWrR1G4MNZmLsIacZSsf6DrIS2Bw== -"@multiversx/sdk-core@>= 13.0.0": - version "13.4.2" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-core/-/sdk-core-13.4.2.tgz#bfe524b9b18b631bef96acead7713d2d1ccab15c" - integrity sha512-+XdBSaX+iUMm9BRv86Tmzy16H3XS7TQ2/+HN12hCgP9TF003K8KABTCJnlyIrQ1oM5iI3ffbY+fEQpAwo+wQEQ== +"@multiversx/sdk-core@>= 13.5.0": + version "13.6.1" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-core/-/sdk-core-13.6.1.tgz#5e36351701675e50ee93a1dc9725658c40a441ad" + integrity sha512-I3o+WcSkcX88ls8X15ZiHQHtl1cdB8oq1wVmqAdYfyNaKjnmQae94lb2qHbh89HCsuiTsMMEP4rrXiITQbRTOg== dependencies: "@multiversx/sdk-transaction-decoder" "1.0.2" bech32 "1.1.4" @@ -1054,10 +1054,10 @@ tweetnacl "1.0.3" uuid "8.3.2" -"@multiversx/sdk-web-wallet-cross-window-provider@>= 1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-web-wallet-cross-window-provider/-/sdk-web-wallet-cross-window-provider-1.0.0.tgz#14ea0eb110de78a7e5dfbb1cb237cc8f86006b40" - integrity sha512-xqdKCFpBCxNcp4aSwC2FLbks2Ii2uy5YpHnqR8qnqCnjH6TqdGZ1xKzQauZsiYqseVueVTmynK28w9pTOZ0Oqg== +"@multiversx/sdk-web-wallet-cross-window-provider@>= 2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-web-wallet-cross-window-provider/-/sdk-web-wallet-cross-window-provider-2.0.0.tgz#1a29f0034fc5ac95608de32556c1a1d983309058" + integrity sha512-U+RpbfH45MotM3BQEhB9fVbmM70wLkO7DV/vV4sSdtgoEhy5JlaslOFm6p/ipsdfirQW19w6tBD2cNBH1LSijQ== dependencies: "@types/jest" "^29.5.11" "@types/qs" "6.9.10" @@ -1087,11 +1087,16 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.0.tgz#085fd70f6d7d9d109671090ccae1d3bec62554a1" integrity sha512-ilHEACi9DwqJB0pw7kv+Apvh50jiiSyR/cQ3y4W7lOR5mhvn/50FLUfsnfJz0BDZtl/RR16kXvptiv6q1msYZg== -"@noble/hashes@1.4.0", "@noble/hashes@^1.3.1", "@noble/hashes@~1.4.0": +"@noble/hashes@1.4.0", "@noble/hashes@~1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== +"@noble/hashes@^1.3.1": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.5.0.tgz#abadc5ca20332db2b1b2aa3e496e9af1213570b0" + integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -1274,9 +1279,9 @@ integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== "@scure/base@^1.1.3", "@scure/base@~1.1.6": - version "1.1.7" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.7.tgz#fe973311a5c6267846aa131bc72e96c5d40d2b30" - integrity sha512-PPNYBslrLNNUQ/Yad37MHYsNQtK67EhWb6WtSvNLLPo7SdVZgkUjD6Dg+5On7zNwmskf8OX7I7Nx5oN+MIWE0g== + version "1.1.9" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.9.tgz#e5e142fbbfe251091f9c5f1dd4c834ac04c3dbd1" + integrity sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg== "@scure/bip32@1.4.0": version "1.4.0" @@ -1453,74 +1458,74 @@ "@stablelib/random" "^1.0.2" "@stablelib/wipe" "^1.0.1" -"@swc/core-darwin-arm64@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.22.tgz#2ce216c4bb61627ff9689213e690ffc64ed02114" - integrity sha512-B2Bh2W+C7ALdGwDxRWAJ+UtNExfozvwyayGiNkbR3wmDKXXeQfhGM5MK+QYUWKu7UQ6ATq69OyZrxofDobKUug== - -"@swc/core-darwin-x64@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.7.22.tgz#78d028d72756193a1bedf3cc0766aede1b290878" - integrity sha512-s34UQntnQ6tL9hS9aX3xG7OfGhpmy05FEEndbHaooGO8O+L5k8uWxhE5KhYCOC0N803sGdZg6YZmKtYrWN/YxA== - -"@swc/core-linux-arm-gnueabihf@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.22.tgz#f95e45179e362dd5cfc3c9b8083af33e430195d9" - integrity sha512-SE69+oos1jLOXx5YdMH//Qc5zQc2xYukajB+0BWmkcFd/S/cCanGWYtdSzYausm8af2Fw1hPJMNIfndJLnBDFw== - -"@swc/core-linux-arm64-gnu@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.22.tgz#8058a7c18385cadf56ca7d2db4d6fa41e52f4bd3" - integrity sha512-59FzDW/ojgiTj4dlnv3Z3ESuVlzhSAq9X12CNYh4/WTCNA8BoJqOnWMRQKspWtoNlnVviFLMvpek0pGXHndEBA== - -"@swc/core-linux-arm64-musl@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.22.tgz#8d29b9574ad3ff615fcba85b6e661d510f48186e" - integrity sha512-cMQMI8YRO/XR3OrYuiUlWksNsJOZSkA6gSLNyH6eHTw+FOAzv05oJ4SFYe6s1WesrOqRwhpez6y5H6OIP/EKzg== - -"@swc/core-linux-x64-gnu@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.22.tgz#ad863612d32c00ec28b3dc3fc1a8418ca9c94f2b" - integrity sha512-639kA7MXrWqWYfwuSJ+XTg21VYb/5o99R1zJrndoEjEX6m7Wza/sXssQKU5jbbkPoSEKVKNP3n/gazLWiUKgiQ== - -"@swc/core-linux-x64-musl@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.22.tgz#421740384a738631b1bbc6202eeb5489ed5e356b" - integrity sha512-f3zfGgY8EJQUOk3ve25ZTkNkhB/kHo9QlN2r+0exaE1g9W7X8IS6J8pWzF3hJrV2P9dBi6ofMOt+opVA89JKHA== - -"@swc/core-win32-arm64-msvc@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.22.tgz#ba62979f394faabe8a4c964e5590169269d8170c" - integrity sha512-p/Fav5U+LtTJD/tbbS0dKK8SVVAhXo5Jdm1TDeBPJ4BEIVguYBZEXgD3CW9wY4K34g1hscpiz2Q2rktfhFj1+A== - -"@swc/core-win32-ia32-msvc@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.22.tgz#7fe30501e853298a552c2bd89306cc41d15f95c8" - integrity sha512-HbmfasaCNTqeCTvDjleYj+jJZQ6MlraiVOdhW55KtbA9mAVQdPBq6DDAvR7VOero3wUNYUM/e36otFKgEJI5Rg== - -"@swc/core-win32-x64-msvc@1.7.22": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.22.tgz#8be5c1f89c61c0d6412093398274b3cbc1b4b52f" - integrity sha512-lppIveE+hpe7WXny/9cUT+T6sBM/ND0E+dviKWJ5jFBISj2KWomlSJGUjYEsRGJVPnTEc8uOlKK7etmXBhQx9A== +"@swc/core-darwin-arm64@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.26.tgz#5f4096c00e71771ca1b18c824f0c92a052c70760" + integrity sha512-FF3CRYTg6a7ZVW4yT9mesxoVVZTrcSWtmZhxKCYJX9brH4CS/7PRPjAKNk6kzWgWuRoglP7hkjQcd6EpMcZEAw== + +"@swc/core-darwin-x64@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.7.26.tgz#867b7a4f094e6b64201090ca5fcbf3da7d0f3e22" + integrity sha512-az3cibZdsay2HNKmc4bjf62QVukuiMRh5sfM5kHR/JMTrLyS6vSw7Ihs3UTkZjUxkLTT8ro54LI6sV6sUQUbLQ== + +"@swc/core-linux-arm-gnueabihf@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.26.tgz#35bb43894def296d92aaa2cc9372d48042f37777" + integrity sha512-VYPFVJDO5zT5U3RpCdHE5v1gz4mmR8BfHecUZTmD2v1JeFY6fv9KArJUpjrHEEsjK/ucXkQFmJ0jaiWXmpOV9Q== + +"@swc/core-linux-arm64-gnu@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.26.tgz#8e2321cc4ec84cbfed8f8e16ff1ed7b854450443" + integrity sha512-YKevOV7abpjcAzXrhsl+W48Z9mZvgoVs2eP5nY+uoMAdP2b3GxC0Df1Co0I90o2lkzO4jYBpTMcZlmUXLdXn+Q== + +"@swc/core-linux-arm64-musl@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.26.tgz#b1c16e4b23ffa9ff19973eda6ffee35d2a7de7b0" + integrity sha512-3w8iZICMkQQON0uIcvz7+Q1MPOW6hJ4O5ETjA0LSP/tuKqx30hIniCGOgPDnv3UTMruLUnQbtBwVCZTBKR3Rkg== + +"@swc/core-linux-x64-gnu@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.26.tgz#388e2cc13a010cd28787aead2cecf31eb491836d" + integrity sha512-c+pp9Zkk2lqb06bNGkR2Looxrs7FtGDMA4/aHjZcCqATgp348hOKH5WPvNLBl+yPrISuWjbKDVn3NgAvfvpH4w== + +"@swc/core-linux-x64-musl@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.26.tgz#51e0ff30981f26d7a5b97a7a7b5b291bad050d1a" + integrity sha512-PgtyfHBF6xG87dUSSdTJHwZ3/8vWZfNIXQV2GlwEpslrOkGqy+WaiiyE7Of7z9AvDILfBBBcJvJ/r8u980wAfQ== + +"@swc/core-win32-arm64-msvc@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.26.tgz#a7fdcc4074c34ee6a026506b594d00323383c11f" + integrity sha512-9TNXPIJqFynlAOrRD6tUQjMq7KApSklK3R/tXgIxc7Qx+lWu8hlDQ/kVPLpU7PWvMMwC/3hKBW+p5f+Tms1hmA== + +"@swc/core-win32-ia32-msvc@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.26.tgz#ae7be6dde798eebee2000b8fd84e01a439b5bd6a" + integrity sha512-9YngxNcG3177GYdsTum4V98Re+TlCeJEP4kEwEg9EagT5s3YejYdKwVAkAsJszzkXuyRDdnHUpYbTrPG6FiXrQ== + +"@swc/core-win32-x64-msvc@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.26.tgz#310d607004d7319085a4dec20c0c38c3405cc05b" + integrity sha512-VR+hzg9XqucgLjXxA13MtV5O3C0bK0ywtLIBw/+a+O+Oc6mxFWHtdUeXDbIi5AiPbn0fjgVJMqYnyjGyyX8u0w== "@swc/core@^1.4.17": - version "1.7.22" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.7.22.tgz#fe7d515bba08fdd29937eae6dc40077459634087" - integrity sha512-Asn79WKqyjEuO2VEeSnVjn2YiRMToRhFJwOsQeqftBvwWMn1FGUuzVcXtkQFBk37si8Gh2Vkk/+p0u4K5NxDig== + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.7.26.tgz#beda9b82063fcec7b56c958804a4d175aecf9a9d" + integrity sha512-f5uYFf+TmMQyYIoxkn/evWhNGuUzC730dFwAKGwBVHHVoPyak1/GvJUm6i1SKl+2Hrj9oN0i3WSoWWZ4pgI8lw== dependencies: "@swc/counter" "^0.1.3" "@swc/types" "^0.1.12" optionalDependencies: - "@swc/core-darwin-arm64" "1.7.22" - "@swc/core-darwin-x64" "1.7.22" - "@swc/core-linux-arm-gnueabihf" "1.7.22" - "@swc/core-linux-arm64-gnu" "1.7.22" - "@swc/core-linux-arm64-musl" "1.7.22" - "@swc/core-linux-x64-gnu" "1.7.22" - "@swc/core-linux-x64-musl" "1.7.22" - "@swc/core-win32-arm64-msvc" "1.7.22" - "@swc/core-win32-ia32-msvc" "1.7.22" - "@swc/core-win32-x64-msvc" "1.7.22" + "@swc/core-darwin-arm64" "1.7.26" + "@swc/core-darwin-x64" "1.7.26" + "@swc/core-linux-arm-gnueabihf" "1.7.26" + "@swc/core-linux-arm64-gnu" "1.7.26" + "@swc/core-linux-arm64-musl" "1.7.26" + "@swc/core-linux-x64-gnu" "1.7.26" + "@swc/core-linux-x64-musl" "1.7.26" + "@swc/core-win32-arm64-msvc" "1.7.26" + "@swc/core-win32-ia32-msvc" "1.7.26" + "@swc/core-win32-x64-msvc" "1.7.26" "@swc/counter@^0.1.3": version "0.1.3" @@ -1620,9 +1625,9 @@ "@types/istanbul-lib-report" "*" "@types/jest@^29.5.11": - version "29.5.12" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.12.tgz#7f7dc6eb4cf246d2474ed78744b05d06ce025544" - integrity sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw== + version "29.5.13" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.13.tgz#8bc571659f401e6a719a7bf0dbcb8b78c71a8adc" + integrity sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg== dependencies: expect "^29.0.0" pretty-format "^29.0.0" @@ -1670,9 +1675,9 @@ form-data "^4.0.0" "@types/node@*", "@types/node@>=13.7.0": - version "22.5.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.1.tgz#de01dce265f6b99ed32b295962045d10b5b99560" - integrity sha512-KkHsxej0j9IW1KKOOAA/XBA0z08UFSrRQHErzEfA3Vgq57eXIMYboIlHJuYIfd+lwCQjtKqUu3UnmKbtUc9yRw== + version "22.5.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.5.tgz#52f939dd0f65fc552a4ad0b392f3c466cc5d7a44" + integrity sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA== dependencies: undici-types "~6.19.2" @@ -2052,9 +2057,9 @@ acorn-jsx@^5.3.2: integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-walk@^8.0.2: - version "8.3.3" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" - integrity sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw== + version "8.3.4" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" + integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== dependencies: acorn "^8.11.0" @@ -2098,9 +2103,9 @@ ansi-regex@^5.0.1: integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-regex@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" - integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== + version "6.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.1.0.tgz#95ec409c69619d6cb1b8b34f14b660ef28ebd654" + integrity sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA== ansi-styles@^3.2.1: version "3.2.1" @@ -2263,9 +2268,9 @@ axios-mock-adapter@^1.22.0: is-buffer "^2.0.5" axios@>=1.6.5, axios@^1.7.4: - version "1.7.5" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.5.tgz#21eed340eb5daf47d29b6e002424b3e88c8c54b1" - integrity sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw== + version "1.7.7" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f" + integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q== dependencies: follow-redirects "^1.15.6" form-data "^4.0.0" @@ -2586,9 +2591,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001646: - version "1.0.30001655" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001655.tgz#0ce881f5a19a2dcfda2ecd927df4d5c1684b982f" - integrity sha512-jRGVy3iSGO5Uutn2owlb5gR6qsGngTw9ZTb4ali9f3glshcNmJ2noam4Mo9zia5P9Dk3jNNydy7vQjuE5dQmfg== + version "1.0.30001662" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001662.tgz#3574b22dfec54a3f3b6787331da1040fe8e763ec" + integrity sha512-sgMUVwLmGseH8ZIrm1d51UbrhqMCH3jvS7gF/M6byuHOnKyLOBL7W8yz5V02OHwgLGA36o/AFhWzzh4uc5aqTA== chalk@^2.4.2: version "2.4.2" @@ -2653,9 +2658,9 @@ citty@^0.1.5, citty@^0.1.6: consola "^3.2.3" cjs-module-lexer@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.0.tgz#677de7ed7efff67cc40c9bf1897fea79d41b5215" - integrity sha512-N1NGmowPlGBLsOZLPvm48StN04V4YvQRL0i6b7ctrVY3epjP/ct7hFLOItz6pDIvRjwpfPxi52a2UWV2ziir8g== + version "1.4.1" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz#707413784dbb3a72aa11c2f2b042a0bef4004170" + integrity sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA== cli-cursor@^3.1.0: version "3.1.0" @@ -2926,12 +2931,12 @@ data-view-byte-offset@^1.0.0: es-errors "^1.3.0" is-data-view "^1.0.1" -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: - version "4.3.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" - integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: + version "4.3.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== dependencies: - ms "2.1.2" + ms "^2.1.3" debug@^3.2.7: version "3.2.7" @@ -2940,13 +2945,6 @@ debug@^3.2.7: dependencies: ms "^2.1.1" -debug@~4.3.1, debug@~4.3.2: - version "4.3.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" - integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== - dependencies: - ms "^2.1.3" - decimal.js@^10.4.2: version "10.4.3" resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" @@ -3102,9 +3100,9 @@ ed2curve@0.3.0: tweetnacl "1.x.x" electron-to-chromium@^1.5.4: - version "1.5.13" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz#1abf0410c5344b2b829b7247e031f02810d442e6" - integrity sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q== + version "1.5.25" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.25.tgz#492ade1cde401332b9b75aa0c55fd5e1550ca66c" + integrity sha512-kMb204zvK3PsSlgvvwzI3wBIcAw15tRkYk+NQdsjdDtcQWTp2RABbMQ9rUBy8KNEOM+/E6ep+XC3AykiWZld4g== elliptic@^6.5.3, elliptic@^6.5.5: version "6.5.7" @@ -3369,9 +3367,9 @@ eslint-import-resolver-typescript@3.6.1: is-glob "^4.0.3" eslint-module-utils@^2.7.4, eslint-module-utils@^2.8.0: - version "2.8.2" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.2.tgz#2ecad69d71e1fa81f17f7f24d5d3e46b168de663" - integrity sha512-3XnC5fDyc8M4J2E8pt8pmSVRX2M+5yWMCfI/kDZwauQeFgzQOuhcRBFKjTeJagqgk4sFKxe1mvNVnaWwImx/Tg== + version "2.11.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.11.0.tgz#b99b211ca4318243f09661fae088f373ad5243c4" + integrity sha512-gbBE5Hitek/oG6MUVj6sFuzEjA/ClzNflVrLovHi/JgLdC7fiN5gLAY1WIPW1a0V5I999MnsrvVrCOGmmVqDBQ== dependencies: debug "^3.2.7" @@ -3741,9 +3739,9 @@ flatted@^3.2.9: integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== follow-redirects@^1.15.6: - version "1.15.6" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" - integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== + version "1.15.9" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1" + integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== for-each@^0.3.3: version "0.3.3" @@ -3850,9 +3848,9 @@ get-symbol-description@^1.0.2: get-intrinsic "^1.2.4" get-tsconfig@^4.5.0: - version "4.8.0" - resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.8.0.tgz#125dc13a316f61650a12b20c97c11b8fd996fedd" - integrity sha512-Pgba6TExTZ0FJAn1qkJAjIeKoDJ3CsI2ChuLohJnZl/tTU8MVrq3b+2t5UOPfRa4RMsorClBjJALkJUMjG1PAw== + version "4.8.1" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.8.1.tgz#8995eb391ae6e1638d251118c7b56de7eb425471" + integrity sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg== dependencies: resolve-pkg-maps "^1.0.0" @@ -3946,7 +3944,7 @@ graphemer@^1.4.0: resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.9.0.tgz#1c310e63f16a49ce1fbb230bd0a000e99f6f115f" integrity sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw== -h3@^1.10.2, h3@^1.11.1: +h3@^1.10.2, h3@^1.12.0: version "1.12.0" resolved "https://registry.yarnpkg.com/h3/-/h3-1.12.0.tgz#9d7f05f08a997d263e484b02436cb027df3026d8" integrity sha512-Zi/CcNeWBXDrFNlV0hUBJQR9F7a96RjMeAZweW/ZWkR9fuXrMcvKnSA63f/zZ9l0GgQOZDVHGvXivNN9PWOwhA== @@ -5142,7 +5140,7 @@ loose-envify@^1.1.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" -lru-cache@^10.2.0: +lru-cache@^10.2.0, lru-cache@^10.4.3: version "10.4.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== @@ -5289,11 +5287,6 @@ mri@^1.2.0: resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" @@ -5345,9 +5338,9 @@ nanoassert@^1.0.0: integrity sha512-C40jQ3NzfkP53NsO8kEOFd79p4b9kDXQMwgiY1z8ZwrDZgUyom0AHwGegF4Dm99L+YoYhuaB0ceerUcXmqr1rQ== napi-wasm@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/napi-wasm/-/napi-wasm-1.1.0.tgz#bbe617823765ae9c1bc12ff5942370eae7b2ba4e" - integrity sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg== + version "1.1.3" + resolved "https://registry.yarnpkg.com/napi-wasm/-/napi-wasm-1.1.3.tgz#7bb95c88e6561f84880bb67195437b1cfbe99224" + integrity sha512-h/4nMGsHjZDCYmQVNODIrYACVJ+I9KItbG+0si6W/jSjdA9JbWDoU4LLeMXVcEQGHjttI2tuXqDrbGF7qkUHHg== natural-compare@^1.4.0: version "1.4.0" @@ -5364,7 +5357,7 @@ node-addon-api@^7.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-7.1.1.tgz#1aba6693b0f255258a049d621329329322aad558" integrity sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ== -node-fetch-native@^1.6.2, node-fetch-native@^1.6.3, node-fetch-native@^1.6.4: +node-fetch-native@^1.6.3, node-fetch-native@^1.6.4: version "1.6.4" resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.6.4.tgz#679fc8fd8111266d47d7e72c379f1bed9acff06e" integrity sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ== @@ -5509,7 +5502,7 @@ object.values@^1.1.7: define-properties "^1.2.1" es-object-atoms "^1.0.0" -ofetch@^1.3.3: +ofetch@^1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/ofetch/-/ofetch-1.3.4.tgz#7ea65ced3c592ec2b9906975ae3fe1d26a56f635" integrity sha512-KLIET85ik3vhEfS+3fDlc/BAZiAp+43QEC/yCo5zkNoY2YaKvNkOaFr/6wCFgFH1kuYQM5pMNi0Tg8koiIemtw== @@ -5519,9 +5512,9 @@ ofetch@^1.3.3: ufo "^1.5.3" ohash@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/ohash/-/ohash-1.1.3.tgz#f12c3c50bfe7271ce3fd1097d42568122ccdcf07" - integrity sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw== + version "1.1.4" + resolved "https://registry.yarnpkg.com/ohash/-/ohash-1.1.4.tgz#ae8d83014ab81157d2c285abf7792e2995fadd72" + integrity sha512-FlDryZAahJmEF3VR3w1KogSEdWX3WhA5GPakFx4J81kEAiHyLMpdLLElS8n8dfNadMgAne/MywcvmogzscVt4g== on-exit-leak-free@^0.2.0: version "0.2.0" @@ -5709,9 +5702,9 @@ path-scurry@^1.11.1: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-to-regexp@^6.2.0: - version "6.2.2" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.2.tgz#324377a83e5049cbecadc5554d6a63a9a4866b36" - integrity sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw== + version "6.3.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.3.0.tgz#2b6a26a337737a8e1416f9272ed0766b1c0389f4" + integrity sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ== path-type@^4.0.0: version "4.0.0" @@ -5735,9 +5728,9 @@ pbkdf2@^3.0.3, pbkdf2@^3.0.9, pbkdf2@^3.1.2: sha.js "^2.4.8" picocolors@^1.0.0, picocolors@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" - integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== + version "1.1.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" + integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" @@ -6492,7 +6485,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -6506,6 +6499,13 @@ strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -6794,11 +6794,11 @@ typed-array-length@^1.0.6: possible-typed-array-names "^1.0.0" typescript@^5.4.5: - version "5.5.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" - integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== + version "5.6.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0" + integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw== -ufo@^1.4.0, ufo@^1.5.3: +ufo@^1.4.0, ufo@^1.5.3, ufo@^1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.4.tgz#16d6949674ca0c9e0fbbae1fa20a71d7b1ded754" integrity sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ== @@ -6857,20 +6857,20 @@ universalify@^0.2.0: integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== unstorage@^1.9.0: - version "1.10.2" - resolved "https://registry.yarnpkg.com/unstorage/-/unstorage-1.10.2.tgz#fb7590ada8b30e83be9318f85100158b02a76dae" - integrity sha512-cULBcwDqrS8UhlIysUJs2Dk0Mmt8h7B0E6mtR+relW9nZvsf/u4SkAYyNliPiPW7XtFNb5u3IUMkxGxFTTRTgQ== + version "1.12.0" + resolved "https://registry.yarnpkg.com/unstorage/-/unstorage-1.12.0.tgz#a215895dfdef01ffb8ff529bb3869dbf947d8498" + integrity sha512-ARZYTXiC+e8z3lRM7/qY9oyaOkaozCeNd2xoz7sYK9fv7OLGhVsf+BZbmASqiK/HTZ7T6eAlnVq9JynZppyk3w== dependencies: anymatch "^3.1.3" chokidar "^3.6.0" destr "^2.0.3" - h3 "^1.11.1" + h3 "^1.12.0" listhen "^1.7.2" - lru-cache "^10.2.0" + lru-cache "^10.4.3" mri "^1.2.0" - node-fetch-native "^1.6.2" - ofetch "^1.3.3" - ufo "^1.4.0" + node-fetch-native "^1.6.4" + ofetch "^1.3.4" + ufo "^1.5.4" untun@^0.1.3: version "0.1.3" @@ -7079,8 +7079,7 @@ word-wrap@^1.2.5: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: - name wrap-ansi-cjs +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -7098,6 +7097,15 @@ wrap-ansi@^6.0.1: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + 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.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From cfcb9f3dbf0aba474097eceea276039941702743 Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Thu, 19 Sep 2024 12:40:51 +0300 Subject: [PATCH 10/21] Remove unused --- src/core/providers/ProviderFactory.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/core/providers/ProviderFactory.ts b/src/core/providers/ProviderFactory.ts index 4377eb5..173eee3 100644 --- a/src/core/providers/ProviderFactory.ts +++ b/src/core/providers/ProviderFactory.ts @@ -7,10 +7,8 @@ import { ProviderTypeEnum } from './types/providerFactory.types'; import { isBrowserWithPopupConfirmation } from '../../constants'; -import { HWProvider } from '@multiversx/sdk-hw-provider/out'; import { fetchAccount } from 'utils'; import { setLedgerLogin } from 'store/actions/loginInfo/loginInfoActions'; -import { getLedgerConfiguration } from './helpers/getLedgerConfiguration'; import { setLedgerAccount } from 'store/actions/account/accountActions'; import { getLedgerProvider } from './helpers/getLedgerProvider'; From d461db411dde723edc7ad133ff5c6770e1335a65 Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Thu, 19 Sep 2024 12:54:07 +0300 Subject: [PATCH 11/21] Update yarn lock --- yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index 76c8777..9683cab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -982,10 +982,10 @@ resolved "https://registry.yarnpkg.com/@multiversx/sdk-dapp-utils/-/sdk-dapp-utils-0.1.0.tgz#3103c2ffc648703e75f96acd229af299cb0840ab" integrity sha512-EFvktZ/S1WQ1ie02nnKZHARC4r23JZWwoTFd5py1qi/Z/UoLHIzJ394HLjXFb6gBTsp4wnvNwIXBA/DNrd2Yeg== -"@multiversx/sdk-extension-provider@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-extension-provider/-/sdk-extension-provider-3.0.0.tgz#e0e178ee5555f9440457547759621f5c3152c5fa" - integrity sha512-xNHLShzimYbMXqEJoiNyB4fNOXQUwSJCzt9FiOA4GdxucJnCgIM25mXtSj2I93cz+KD39QgRjEYep+li/lykOw== +"@multiversx/sdk-extension-provider@4.0.0-alpha.0": + version "4.0.0-alpha.0" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-extension-provider/-/sdk-extension-provider-4.0.0-alpha.0.tgz#e00ba0df0d1ef8ac0330ff3f6f0c5ced8163c5b3" + integrity sha512-LPRy2sgWG1Ti3KMxembP0/13GHntenFK1kbXAfHUJiOH29s4nbGDqBlTI0p42en4c1BGlEbVJEfpUq1LtO5ZYA== "@multiversx/sdk-hw-provider@6.4.0": version "6.4.0" From aedb8d38ad2a30cec1277366ac4e435bac59c28c Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Thu, 19 Sep 2024 12:59:20 +0300 Subject: [PATCH 12/21] Try alpha 1 --- package.json | 4 ++-- yarn.lock | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 302ed7d..aed09e3 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "peerDependencies": { "@multiversx/sdk-core": ">= 13.5.0", "@multiversx/sdk-dapp-utils": ">= 0.1.0", - "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.0", + "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.0-alpha.1", "axios": ">=1.6.5", "bignumber.js": "9.x" }, @@ -58,7 +58,7 @@ "@types/lodash": "4.17.4", "@multiversx/sdk-core": ">= 13.5.0", "@multiversx/sdk-dapp-utils": ">= 0.1.0", - "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.0", + "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.0-alpha.1", "@swc/core": "^1.4.17", "@swc/jest": "^0.2.36", "@types/node": "20.12.8", diff --git a/yarn.lock b/yarn.lock index 9683cab..bab24aa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1054,7 +1054,7 @@ tweetnacl "1.0.3" uuid "8.3.2" -"@multiversx/sdk-web-wallet-cross-window-provider@>= 2.0.0": +"@multiversx/sdk-web-wallet-cross-window-provider@>= 2.0.0-alpha.1": version "2.0.0" resolved "https://registry.yarnpkg.com/@multiversx/sdk-web-wallet-cross-window-provider/-/sdk-web-wallet-cross-window-provider-2.0.0.tgz#1a29f0034fc5ac95608de32556c1a1d983309058" integrity sha512-U+RpbfH45MotM3BQEhB9fVbmM70wLkO7DV/vV4sSdtgoEhy5JlaslOFm6p/ipsdfirQW19w6tBD2cNBH1LSijQ== From aa4857bb615bf8c1ecb59ae29effc740544c062a Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Thu, 19 Sep 2024 14:14:18 +0300 Subject: [PATCH 13/21] Upgrade cwp --- package.json | 4 ++-- yarn.lock | 27 ++++++--------------------- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index aed09e3..22345c9 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "peerDependencies": { "@multiversx/sdk-core": ">= 13.5.0", "@multiversx/sdk-dapp-utils": ">= 0.1.0", - "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.0-alpha.1", + "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.1", "axios": ">=1.6.5", "bignumber.js": "9.x" }, @@ -58,7 +58,7 @@ "@types/lodash": "4.17.4", "@multiversx/sdk-core": ">= 13.5.0", "@multiversx/sdk-dapp-utils": ">= 0.1.0", - "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.0-alpha.1", + "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.1", "@swc/core": "^1.4.17", "@swc/jest": "^0.2.36", "@types/node": "20.12.8", diff --git a/yarn.lock b/yarn.lock index bab24aa..6432cd4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1054,13 +1054,11 @@ tweetnacl "1.0.3" uuid "8.3.2" -"@multiversx/sdk-web-wallet-cross-window-provider@>= 2.0.0-alpha.1": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-web-wallet-cross-window-provider/-/sdk-web-wallet-cross-window-provider-2.0.0.tgz#1a29f0034fc5ac95608de32556c1a1d983309058" - integrity sha512-U+RpbfH45MotM3BQEhB9fVbmM70wLkO7DV/vV4sSdtgoEhy5JlaslOFm6p/ipsdfirQW19w6tBD2cNBH1LSijQ== +"@multiversx/sdk-web-wallet-cross-window-provider@>= 2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-web-wallet-cross-window-provider/-/sdk-web-wallet-cross-window-provider-2.0.1.tgz#56b2b1a37561dddb06c5ff09b45cf5ce336df609" + integrity sha512-Qw63+zz2HHO8IRKn63NAAI83WX8PB3Zrz3nZ8RNK3+bn7Po/uXzSRmx1tZ8du6A7EnW9ocTZtc1jMvXZWQCu/Q== dependencies: - "@types/jest" "^29.5.11" - "@types/qs" "6.9.10" qs "6.11.2" "@multiversx/sdk-web-wallet-provider@3.2.1": @@ -1624,14 +1622,6 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^29.5.11": - version "29.5.13" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.13.tgz#8bc571659f401e6a719a7bf0dbcb8b78c71a8adc" - integrity sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg== - dependencies: - expect "^29.0.0" - pretty-format "^29.0.0" - "@types/js-levenshtein@^1.1.1": version "1.1.3" resolved "https://registry.yarnpkg.com/@types/js-levenshtein/-/js-levenshtein-1.1.3.tgz#a6fd0bdc8255b274e5438e0bfb25f154492d1106" @@ -1693,11 +1683,6 @@ dependencies: undici-types "~5.26.4" -"@types/qs@6.9.10": - version "6.9.10" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.10.tgz#0af26845b5067e1c9a622658a51f60a3934d51e8" - integrity sha512-3Gnx08Ns1sEoCrWssEgTSJs/rsT2vhGP+Ja9cnnk9k4ALxinORlQneLXFeFKOTJMOeZUFD1s7w+w2AphTpvzZw== - "@types/semver@^7.5.8": version "7.5.8" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" @@ -3600,7 +3585,7 @@ exit@^0.1.2: resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== -expect@^29.0.0, expect@^29.7.0: +expect@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== @@ -5834,7 +5819,7 @@ prettier@3.2.5: resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368" integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A== -pretty-format@^29.0.0, pretty-format@^29.7.0: +pretty-format@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== From 28343a524ce0026b99d4591d40fe6ede62841980 Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Thu, 19 Sep 2024 14:17:15 +0300 Subject: [PATCH 14/21] Added jest types --- package.json | 3 ++- yarn.lock | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 22345c9..c592613 100644 --- a/package.json +++ b/package.json @@ -55,12 +55,13 @@ "string-width": "4.1.0" }, "devDependencies": { - "@types/lodash": "4.17.4", "@multiversx/sdk-core": ">= 13.5.0", "@multiversx/sdk-dapp-utils": ">= 0.1.0", "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.1", "@swc/core": "^1.4.17", "@swc/jest": "^0.2.36", + "@types/jest": "29.5.13", + "@types/lodash": "4.17.4", "@types/node": "20.12.8", "@typescript-eslint/eslint-plugin": "7.8.0", "@typescript-eslint/parser": "7.8.0", diff --git a/yarn.lock b/yarn.lock index 6432cd4..0e10a06 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1622,6 +1622,14 @@ dependencies: "@types/istanbul-lib-report" "*" +"@types/jest@^29.5.13": + version "29.5.13" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.13.tgz#8bc571659f401e6a719a7bf0dbcb8b78c71a8adc" + integrity sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg== + dependencies: + expect "^29.0.0" + pretty-format "^29.0.0" + "@types/js-levenshtein@^1.1.1": version "1.1.3" resolved "https://registry.yarnpkg.com/@types/js-levenshtein/-/js-levenshtein-1.1.3.tgz#a6fd0bdc8255b274e5438e0bfb25f154492d1106" @@ -3585,7 +3593,7 @@ exit@^0.1.2: resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== -expect@^29.7.0: +expect@^29.0.0, expect@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== @@ -5819,7 +5827,7 @@ prettier@3.2.5: resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368" integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A== -pretty-format@^29.7.0: +pretty-format@^29.0.0, pretty-format@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== From 3479319d044770a32778b8c253bc6774c74b0821 Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Thu, 19 Sep 2024 16:19:47 +0300 Subject: [PATCH 15/21] Fix guardian signing --- src/core/methods/signTransactions/signTransactions.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/methods/signTransactions/signTransactions.ts b/src/core/methods/signTransactions/signTransactions.ts index 1ca37b3..338405e 100644 --- a/src/core/methods/signTransactions/signTransactions.ts +++ b/src/core/methods/signTransactions/signTransactions.ts @@ -1,4 +1,5 @@ import { + Address, Transaction, TransactionOptions, TransactionVersion @@ -16,15 +17,16 @@ export const signTransactions = async ( options: SignTransactionsOptionsType = {} ): Promise => { const provider = getAccountProvider(); - const { isGuarded } = getAccount(); + const { isGuarded, activeGuardianAddress } = getAccount(); const transacitonsToSign = - isGuarded && !options.skipGuardian + activeGuardianAddress && !options.skipGuardian ? transactions?.map((transaction) => { transaction.setVersion(TransactionVersion.withTxOptions()); transaction.setOptions( TransactionOptions.withOptions({ guarded: true }) ); + transaction.setGuardian(Address.fromBech32(activeGuardianAddress)); return transaction; }) : transactions; From fd8a40817dbecd8b3daf6ca633d6e0b8204e1fe1 Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Thu, 19 Sep 2024 17:29:16 +0300 Subject: [PATCH 16/21] Upgrade ledger --- package.json | 2 +- src/core/providers/ProviderFactory.ts | 13 +++- yarn.lock | 86 +++++++++++++-------------- 3 files changed, 54 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index c592613..c0c42a8 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "dependencies": { "@lifeomic/axios-fetch": "3.0.1", "@multiversx/sdk-extension-provider": "4.0.0-alpha.0", - "@multiversx/sdk-hw-provider": "6.4.0", + "@multiversx/sdk-hw-provider": "7.0.0-alpha.0", "@multiversx/sdk-metamask-provider": "0.0.7", "@multiversx/sdk-native-auth-client": "^1.0.8", "@multiversx/sdk-opera-provider": "1.0.0-alpha.1", diff --git a/src/core/providers/ProviderFactory.ts b/src/core/providers/ProviderFactory.ts index e52659c..ea5c01e 100644 --- a/src/core/providers/ProviderFactory.ts +++ b/src/core/providers/ProviderFactory.ts @@ -68,8 +68,15 @@ export class ProviderFactory { createdProvider.login = async (options?: { callbackUrl?: string | undefined; token?: string | undefined; - }) => { - await provider.isConnected(); + }): Promise<{ + address: string; + signature: string; + }> => { + const isConnected = provider.isConnected(); + + if (!isConnected) { + throw new Error('Ledger device is not connected'); + } // TODO: perform additional UI logic here // maybe extract to file @@ -132,7 +139,7 @@ export class ProviderFactory { signature: loginInfo.signature.toString('hex') }; } else { - const address = await hwProviderLogin({ + const { address } = await hwProviderLogin({ addressIndex: accountsWithBalance[selectedIndex].index }); return { diff --git a/yarn.lock b/yarn.lock index 0e10a06..9ddfb63 100644 --- a/yarn.lock +++ b/yarn.lock @@ -763,7 +763,7 @@ rxjs "6" semver "^7.3.5" -"@ledgerhq/devices@^8.0.3", "@ledgerhq/devices@^8.0.5", "@ledgerhq/devices@^8.4.3": +"@ledgerhq/devices@^8.0.7", "@ledgerhq/devices@^8.3.0", "@ledgerhq/devices@^8.4.3": version "8.4.3" resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.4.3.tgz#4c296df4dd4af6f1085d728609b6931a640baf86" integrity sha512-+ih+M27E6cm6DHrmw3GbS3mEaznCyFc0e62VdQux40XK2psgYhL2yBPftM4KCrBYm1UbHqXzqLN+Jb7rNIzsHg== @@ -778,52 +778,52 @@ resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.12.6.tgz#f89c82c91c2930f34bc3e0d86a27ec7b6e6e4f5f" integrity sha512-D+r2B09vaRO06wfGoss+rNgwqWSoK0bCtsaJWzlD2hv1zxTtucqVtSztbRFypIqxWTCb3ix5Nh2dWHEJVTp2Xw== -"@ledgerhq/errors@^6.12.6", "@ledgerhq/errors@^6.13.0", "@ledgerhq/errors@^6.19.0": +"@ledgerhq/errors@^6.12.6", "@ledgerhq/errors@^6.14.0", "@ledgerhq/errors@^6.16.4", "@ledgerhq/errors@^6.19.0": version "6.19.0" resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.19.0.tgz#ed4f01df3dabfcdeb0b073159d66cb5f2d086243" integrity sha512-c3Jid7euMSnpHFp8H7iPtsmKDjwbTjlG46YKdw+RpCclsqtBx1uQDlYmcbP1Yv9201kVlUFUhhP4H623k8xzlQ== -"@ledgerhq/hw-transport-web-ble@6.27.17": - version "6.27.17" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-web-ble/-/hw-transport-web-ble-6.27.17.tgz#40bdf67dd277863c307399ea42f62e607c88b278" - integrity sha512-OoKbImhgyi43F6PM2KAJfViW+oEmZ3M8Tq9XZ0X57oL6QCQUYv6FakEFFkZzNuNWFdtFKGPgNt6xygqIdNElEQ== +"@ledgerhq/hw-transport-web-ble@6.28.6": + version "6.28.6" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-web-ble/-/hw-transport-web-ble-6.28.6.tgz#f1f5361983b2f4ead0f716f326b5881809b97066" + integrity sha512-SsseU5T4ePhdvFdwUOsF207gyMgiHyymvRAV66/hpHCd0+m/81kV8nZneeD3Z1pG0XPG+tPlF90r7nLwtUoiXw== dependencies: - "@ledgerhq/devices" "^8.0.5" - "@ledgerhq/errors" "^6.13.0" - "@ledgerhq/hw-transport" "^6.28.6" - "@ledgerhq/logs" "^6.10.1" - rxjs "6" + "@ledgerhq/devices" "^8.3.0" + "@ledgerhq/errors" "^6.16.4" + "@ledgerhq/hw-transport" "^6.30.6" + "@ledgerhq/logs" "^6.12.0" + rxjs "^7.8.1" -"@ledgerhq/hw-transport-webhid@6.27.15": - version "6.27.15" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.27.15.tgz#36cbf1fd710dee19f51519668229a5df95b05046" - integrity sha512-xhtFy/SNttvBna8t1ZiP74K6Lj8uDhp0W+Zjvwz4IS6tS9gWZbKUB7scbrNrJep6Q77Of1bzDXrswyaoxFZrUg== +"@ledgerhq/hw-transport-webhid@6.28.6": + version "6.28.6" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.28.6.tgz#94562750136d869774cb56304573a1875ca6375f" + integrity sha512-npU1mgL97KovpTUgcdORoOZ7eVFgwCA7zt0MpgUGUMRNJWDgCFsJslx7KrVXlCGOg87gLfDojreIre502I5pYg== dependencies: - "@ledgerhq/devices" "^8.0.3" - "@ledgerhq/errors" "^6.12.6" - "@ledgerhq/hw-transport" "^6.28.4" - "@ledgerhq/logs" "^6.10.1" + "@ledgerhq/devices" "^8.3.0" + "@ledgerhq/errors" "^6.16.4" + "@ledgerhq/hw-transport" "^6.30.6" + "@ledgerhq/logs" "^6.12.0" -"@ledgerhq/hw-transport-webusb@6.27.15": - version "6.27.15" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-webusb/-/hw-transport-webusb-6.27.15.tgz#b661000ca68f21ed1cd4f931f0c9690b217529fc" - integrity sha512-XRteQmJMFbMETOwwwJrXhEvBEdu1DpuDQNI04bzMQE9p81rLjwd6pIhfP/W1O94av7Iq4kaatNsNpxkitmp59w== +"@ledgerhq/hw-transport-webusb@6.28.6": + version "6.28.6" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-webusb/-/hw-transport-webusb-6.28.6.tgz#c17c193578da112ef76769e4ce72129d40d87faa" + integrity sha512-rzICsvhcFcL4wSAvRPe+b9EEWB8cxj6yWy3FZdfs7ufi/0muNpFXWckWv1TC34em55sGXu2cMcwMKXg/O/Lc0Q== dependencies: - "@ledgerhq/devices" "^8.0.3" - "@ledgerhq/errors" "^6.12.6" - "@ledgerhq/hw-transport" "^6.28.4" - "@ledgerhq/logs" "^6.10.1" + "@ledgerhq/devices" "^8.3.0" + "@ledgerhq/errors" "^6.16.4" + "@ledgerhq/hw-transport" "^6.30.6" + "@ledgerhq/logs" "^6.12.0" -"@ledgerhq/hw-transport@6.28.4": - version "6.28.4" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.28.4.tgz#c2fc5bff4fca71ac44f069b775d33d0b1b5d9000" - integrity sha512-fB2H92YQjidmae2GFCmOGPwkZWk0lvTu0tlLlzfiY0wRheAG+DEgjnqhdU8wmydkPLIj0WUjRgldtnJtg/a2iQ== +"@ledgerhq/hw-transport@6.28.8": + version "6.28.8" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.28.8.tgz#f99a5c71c5c09591e9bfb1b970c42aafbe81351f" + integrity sha512-XxQVl4htd018u/M66r0iu5nlHi+J6QfdPsORzDF6N39jaz+tMqItb7tUlXM/isggcuS5lc7GJo7NOuJ8rvHZaQ== dependencies: - "@ledgerhq/devices" "^8.0.3" - "@ledgerhq/errors" "^6.12.6" + "@ledgerhq/devices" "^8.0.7" + "@ledgerhq/errors" "^6.14.0" events "^3.3.0" -"@ledgerhq/hw-transport@^6.28.4", "@ledgerhq/hw-transport@^6.28.6": +"@ledgerhq/hw-transport@^6.30.6": version "6.31.3" resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.31.3.tgz#ceecea278ee200dbb8d7e2ce5e47e09a287c1611" integrity sha512-rFplkHWF5NXtlYwAusqLlMu298NHtRD+2q/jrTYc//uu/xJO9LkDIgKid6IVF2+e1Wj7yX6YQVrU6L0Yu1ntEw== @@ -987,17 +987,17 @@ resolved "https://registry.yarnpkg.com/@multiversx/sdk-extension-provider/-/sdk-extension-provider-4.0.0-alpha.0.tgz#e00ba0df0d1ef8ac0330ff3f6f0c5ced8163c5b3" integrity sha512-LPRy2sgWG1Ti3KMxembP0/13GHntenFK1kbXAfHUJiOH29s4nbGDqBlTI0p42en4c1BGlEbVJEfpUq1LtO5ZYA== -"@multiversx/sdk-hw-provider@6.4.0": - version "6.4.0" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-hw-provider/-/sdk-hw-provider-6.4.0.tgz#a9afda37a23b2950c8b9a4c1f1ddbf1e513b0fda" - integrity sha512-o+iO64U7gi3oqQHIaCNWoOCarrOQyjXEq7kEsWg/HXJOANpc+lq4GiXPtBkN5mOwPoj/UlEk1HfxA+54mTCFNQ== +"@multiversx/sdk-hw-provider@7.0.0-alpha.0": + version "7.0.0-alpha.0" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-hw-provider/-/sdk-hw-provider-7.0.0-alpha.0.tgz#449b96d63ec1efa945ae15a6f217b90338a7a131" + integrity sha512-Mrv+AKXoe95CvxoGRVSF7d1MLNjvI3ot+/1muuBc3cgiwcKBFTbdW9cp5P79mEEDizI5foy/Gscn1Qs5Nh2Hrg== dependencies: "@ledgerhq/devices" "8.0.3" "@ledgerhq/errors" "6.12.6" - "@ledgerhq/hw-transport" "6.28.4" - "@ledgerhq/hw-transport-web-ble" "6.27.17" - "@ledgerhq/hw-transport-webhid" "6.27.15" - "@ledgerhq/hw-transport-webusb" "6.27.15" + "@ledgerhq/hw-transport" "6.28.8" + "@ledgerhq/hw-transport-web-ble" "6.28.6" + "@ledgerhq/hw-transport-webhid" "6.28.6" + "@ledgerhq/hw-transport-webusb" "6.28.6" buffer "6.0.3" platform "1.3.6" @@ -1622,7 +1622,7 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^29.5.13": +"@types/jest@29.5.13": version "29.5.13" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.13.tgz#8bc571659f401e6a719a7bf0dbcb8b78c71a8adc" integrity sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg== From b7387918872bf92f572b6ab4171b9369af1f2867 Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Fri, 20 Sep 2024 10:51:06 +0300 Subject: [PATCH 17/21] Resolve comments --- .../helpers/getGuardedTransactions.ts | 2 +- src/core/providers/ProviderFactory.ts | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/core/methods/signTransactions/helpers/getGuardedTransactions.ts b/src/core/methods/signTransactions/helpers/getGuardedTransactions.ts index 3bfc3f3..65236a5 100644 --- a/src/core/methods/signTransactions/helpers/getGuardedTransactions.ts +++ b/src/core/methods/signTransactions/helpers/getGuardedTransactions.ts @@ -18,7 +18,7 @@ export const getGuardedTransactions = async ({ transactions }); - if (!isGuarded || (isGuarded && allSignedByGuardian)) { + if (!isGuarded || allSignedByGuardian) { return transactions; } diff --git a/src/core/providers/ProviderFactory.ts b/src/core/providers/ProviderFactory.ts index ea5c01e..2264694 100644 --- a/src/core/providers/ProviderFactory.ts +++ b/src/core/providers/ProviderFactory.ts @@ -98,16 +98,16 @@ export class ProviderFactory { fetchAccount(address) ); - await Promise.all(balancePromises).then((balances) => { - balances.forEach((account, index) => { - if (!account) { - return; - } - accountsWithBalance.push({ - address: account.address, - balance: account.balance, - index - }); + const balances = await Promise.all(balancePromises); + + balances.forEach((account, index) => { + if (!account) { + return; + } + accountsWithBalance.push({ + address: account.address, + balance: account.balance, + index }); }); From 0e4d9b2090f58f24ec4edab262ec826d971f2e22 Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Mon, 23 Sep 2024 16:44:02 +0300 Subject: [PATCH 18/21] Separate react store from main store --- src/store/reactStore.ts | 4 ++++ src/store/selectors/hooks/useSelector.ts | 4 ++-- src/store/store.ts | 2 -- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 src/store/reactStore.ts diff --git a/src/store/reactStore.ts b/src/store/reactStore.ts new file mode 100644 index 0000000..94b19db --- /dev/null +++ b/src/store/reactStore.ts @@ -0,0 +1,4 @@ +import { createBoundedUseStore } from './createBoundedStore'; +import { getStore } from './store'; + +export const getReactStore = () => createBoundedUseStore(getStore()); diff --git a/src/store/selectors/hooks/useSelector.ts b/src/store/selectors/hooks/useSelector.ts index 94ac5f3..0b4c1ab 100644 --- a/src/store/selectors/hooks/useSelector.ts +++ b/src/store/selectors/hooks/useSelector.ts @@ -1,11 +1,11 @@ +import { getReactStore } from 'store/reactStore'; import { StoreType } from 'store/store.types'; -import { getStoreHook } from '../../store'; type ExtractState = S extends { getState: () => infer T } ? T : StoreType; export function useSelector( selector: (state: ExtractState) => T ) { - const useStore = getStoreHook(); + const useStore = getReactStore(); return useStore(selector); } diff --git a/src/store/store.ts b/src/store/store.ts index 7e4a27f..b002724 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -84,5 +84,3 @@ export const initStore = (getStorageCallback = defaultStorageCallback) => { }; export const getState = () => getStore().getState(); - -export const getStoreHook = () => createBoundedUseStore(getStore()); From 8ce464a7c669e0a4b6354c2ce6f3168f7719187c Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Mon, 23 Sep 2024 16:44:15 +0300 Subject: [PATCH 19/21] Upgrade empty provider --- src/core/providers/helpers/emptyProvider.ts | 31 ++++++++++++++------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/core/providers/helpers/emptyProvider.ts b/src/core/providers/helpers/emptyProvider.ts index b73c157..2c12f28 100644 --- a/src/core/providers/helpers/emptyProvider.ts +++ b/src/core/providers/helpers/emptyProvider.ts @@ -1,9 +1,13 @@ -import { SignableMessage, Transaction } from '@multiversx/sdk-core'; +import { Message, Transaction } from '@multiversx/sdk-core'; import { EngineTypes } from 'utils/walletconnect/__sdkWalletconnectProvider'; import { IProvider, ProviderTypeEnum } from 'core/providers/types/providerFactory.types'; +import { + IDAppProviderAccount, + IDAppProviderOptions +} from '@multiversx/sdk-dapp-utils/out'; export const DAPP_INIT_ROUTE = '/dapp/init'; @@ -28,12 +32,21 @@ export class EmptyProvider implements IProvider { throw new Error(notInitializedError(`logout with options: ${options}`)); } + getAccount(): IDAppProviderAccount | null { + throw new Error(notInitializedError(`unable to get account`)); + } + setAccount(account: IDAppProviderAccount): void { + throw new Error( + notInitializedError(`unable to set account with: ${account}`) + ); + } + isInitialized(): boolean { return false; } - isConnected(): Promise { - return Promise.resolve(false); + isConnected(): boolean { + return false; } sendTransaction?< @@ -64,14 +77,12 @@ export class EmptyProvider implements IProvider { ); } - signMessage( - message: T, - options: TOptions - ): Promise { + signMessage( + message: Message, + options?: IDAppProviderOptions + ): Promise { throw new Error( - notInitializedError( - `signTransactions with ${message} and options ${options}` - ) + notInitializedError(`signMessage with ${message} and options ${options}`) ); } From 4e1420f39be8691ba8fc960c20544b427aa8913b Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Mon, 23 Sep 2024 16:44:38 +0300 Subject: [PATCH 20/21] Remove callbackRoute from signMessage and upgrade to Message --- package.json | 15 +++++++------ src/core/methods/signMessage/signMessage.ts | 7 +----- yarn.lock | 24 ++++++++++----------- 3 files changed, 21 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index c0c42a8..f033ef1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@multiversx/sdk-dapp-core", - "version": "0.0.0-alpha.9", + "version": "0.0.0-alpha.10", "main": "out/index.js", "module": "out/index.js", "types": "out/index.d.ts", @@ -21,7 +21,7 @@ "scripts": { "compile": "tsc && tsc-alias", "build-esbuild": "rimraf out && node esbuild.js", - "publish-verdaccio": "npm unpublish --registry http://localhost:4873 @multiversx/sdk-dapp-core@0.0.0-alpha.3 && rimraf out && yarn compile && npm publish --registry http://localhost:4873", + "publish-verdaccio": "npm unpublish --registry http://localhost:4873 @multiversx/sdk-dapp-core@0.0.0-alpha.11 && rimraf out && yarn compile && npm publish --registry http://localhost:4873", "build": "yarn build-esbuild && yarn compile", "test": "jest", "compile-next": "rimraf out && tsc --p tsconfig.next.json && tsc-alias --project tsconfig.next.json" @@ -32,7 +32,7 @@ "dependencies": { "@lifeomic/axios-fetch": "3.0.1", "@multiversx/sdk-extension-provider": "4.0.0-alpha.0", - "@multiversx/sdk-hw-provider": "7.0.0-alpha.0", + "@multiversx/sdk-hw-provider": "7.0.0", "@multiversx/sdk-metamask-provider": "0.0.7", "@multiversx/sdk-native-auth-client": "^1.0.8", "@multiversx/sdk-opera-provider": "1.0.0-alpha.1", @@ -41,22 +41,24 @@ "@multiversx/sdk-web-wallet-provider": "3.2.1", "isomorphic-fetch": "3.0.0", "lodash": "4.17.21", + "protobufjs": "7.3.0", "socket.io-client": "4.7.5", "zustand": "4.4.7" }, "peerDependencies": { "@multiversx/sdk-core": ">= 13.5.0", - "@multiversx/sdk-dapp-utils": ">= 0.1.0", + "@multiversx/sdk-dapp-utils": ">= 1.0.1", "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.1", "axios": ">=1.6.5", - "bignumber.js": "9.x" + "bignumber.js": "9.x", + "immer": "10.x" }, "resolutions": { "string-width": "4.1.0" }, "devDependencies": { "@multiversx/sdk-core": ">= 13.5.0", - "@multiversx/sdk-dapp-utils": ">= 0.1.0", + "@multiversx/sdk-dapp-utils": "1.0.1", "@multiversx/sdk-web-wallet-cross-window-provider": ">= 2.0.1", "@swc/core": "^1.4.17", "@swc/jest": "^0.2.36", @@ -85,7 +87,6 @@ "msw": "1.3.1", "node-stdlib-browser": "1.2.0", "prettier": "3.2.5", - "protobufjs": "^7.3.0", "react": "^18.3.1", "rimraf": "^5.0.6", "ts-jest": "29.1.2", diff --git a/src/core/methods/signMessage/signMessage.ts b/src/core/methods/signMessage/signMessage.ts index c52211b..750b80a 100644 --- a/src/core/methods/signMessage/signMessage.ts +++ b/src/core/methods/signMessage/signMessage.ts @@ -15,17 +15,14 @@ export interface SignMessageType { }; } -// TODO: upgrade to Message export const signMessage = async ({ message, - callbackRoute, options }: SignMessageType): Promise> => { const address = getAddress(); const provider = getAccountProvider(); const providerType = getProviderType(provider); - const callbackUrl = addOriginToLocationPath(callbackRoute); const messageToSign = new Message({ address: new Address(address), data: message.data @@ -41,9 +38,7 @@ export const signMessage = async ({ } // TODO upgrade sdk-dapp-utils to use Message as input for signMessage method and remove the cast - const signedMessage = await provider.signMessage(messageToSign as any, { - callbackUrl: encodeURIComponent(callbackUrl) - }); + const signedMessage = await provider.signMessage(messageToSign, options); // TODO upgrade sdk-dapp-utils to return Message instead of SignableMessage and remove the cast return signedMessage as Nullable; diff --git a/yarn.lock b/yarn.lock index 9ddfb63..4460edb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -977,20 +977,20 @@ json-bigint "1.0.0" keccak "3.0.2" -"@multiversx/sdk-dapp-utils@>= 0.1.0": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-dapp-utils/-/sdk-dapp-utils-0.1.0.tgz#3103c2ffc648703e75f96acd229af299cb0840ab" - integrity sha512-EFvktZ/S1WQ1ie02nnKZHARC4r23JZWwoTFd5py1qi/Z/UoLHIzJ394HLjXFb6gBTsp4wnvNwIXBA/DNrd2Yeg== +"@multiversx/sdk-dapp-utils@1.0.1": + version "1.0.1" + resolved "http://localhost:4873/@multiversx/sdk-dapp-utils/-/sdk-dapp-utils-1.0.1.tgz#242a82c1f523efdcdec9a0be7816e079216215f0" + integrity sha512-ccmRjbWyxbPqEITwAHdtJ10VXQS6R565gZILMXoyQU7M7yUDnauV15vOfMmYko4MnCJq40U/zxx4dN3mJW4Mgw== "@multiversx/sdk-extension-provider@4.0.0-alpha.0": version "4.0.0-alpha.0" resolved "https://registry.yarnpkg.com/@multiversx/sdk-extension-provider/-/sdk-extension-provider-4.0.0-alpha.0.tgz#e00ba0df0d1ef8ac0330ff3f6f0c5ced8163c5b3" integrity sha512-LPRy2sgWG1Ti3KMxembP0/13GHntenFK1kbXAfHUJiOH29s4nbGDqBlTI0p42en4c1BGlEbVJEfpUq1LtO5ZYA== -"@multiversx/sdk-hw-provider@7.0.0-alpha.0": - version "7.0.0-alpha.0" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-hw-provider/-/sdk-hw-provider-7.0.0-alpha.0.tgz#449b96d63ec1efa945ae15a6f217b90338a7a131" - integrity sha512-Mrv+AKXoe95CvxoGRVSF7d1MLNjvI3ot+/1muuBc3cgiwcKBFTbdW9cp5P79mEEDizI5foy/Gscn1Qs5Nh2Hrg== +"@multiversx/sdk-hw-provider@7.0.0": + version "7.0.0" + resolved "http://localhost:4873/@multiversx/sdk-hw-provider/-/sdk-hw-provider-7.0.0.tgz#dafb239179949e23a75805c7cd386d618b1855cd" + integrity sha512-ZRGp5q985v5wvjnSZw+uvEXKGwe5YORuULhYMVoh63cPtGhyHIxl7H9D190KtSV0/LJfTcVUDDrtKoepOoKuVA== dependencies: "@ledgerhq/devices" "8.0.3" "@ledgerhq/errors" "6.12.6" @@ -5859,10 +5859,10 @@ prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.5" -protobufjs@^7.3.0: - version "7.4.0" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.4.0.tgz#7efe324ce9b3b61c82aae5de810d287bc08a248a" - integrity sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw== +protobufjs@7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.3.0.tgz#a32ec0422c039798c41a0700306a6e305b9cb32c" + integrity sha512-YWD03n3shzV9ImZRX3ccbjqLxj7NokGN0V/ESiBV5xWqrommYHYiihuIyavq03pWSGqlyvYUFmfoMKd+1rPA/g== dependencies: "@protobufjs/aspromise" "^1.1.2" "@protobufjs/base64" "^1.1.2" From ad4c2ef5b21def099898382ab5f57dd88b7325ea Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Mon, 23 Sep 2024 16:45:19 +0300 Subject: [PATCH 21/21] Revert version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f033ef1..225d120 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@multiversx/sdk-dapp-core", - "version": "0.0.0-alpha.10", + "version": "0.0.0-alpha.9", "main": "out/index.js", "module": "out/index.js", "types": "out/index.d.ts",