From 6730e02749d3a940db29f58297de2b849967accd Mon Sep 17 00:00:00 2001 From: sweetim Date: Wed, 5 Apr 2023 23:16:57 +0900 Subject: [PATCH 01/19] refactor code to remove sonarlint warning --- .../react/contexts/WalletSelectorContext.tsx | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/examples/react/contexts/WalletSelectorContext.tsx b/examples/react/contexts/WalletSelectorContext.tsx index 4f150d13f..a0d31bb3e 100644 --- a/examples/react/contexts/WalletSelectorContext.tsx +++ b/examples/react/contexts/WalletSelectorContext.tsx @@ -17,7 +17,7 @@ import { setupNearSnap } from "@near-wallet-selector/near-snap"; import { setupWelldoneWallet } from "@near-wallet-selector/welldone-wallet"; import { setupXDEFI } from "@near-wallet-selector/xdefi"; import type { ReactNode } from "react"; -import React, { useCallback, useContext, useEffect, useState } from "react"; +import React, { useCallback, useContext, useEffect, useState, useMemo } from "react"; import { distinctUntilChanged, map } from "rxjs"; import { setupNeth } from "@near-wallet-selector/neth"; @@ -51,6 +51,7 @@ export const WalletSelectorContextProvider: React.FC<{ const [selector, setSelector] = useState(null); const [modal, setModal] = useState(null); const [accounts, setAccounts] = useState>([]); + const [loading, setLoading] = useState(true); const init = useCallback(async () => { const _selector = await setupWalletSelector({ @@ -108,6 +109,7 @@ export const WalletSelectorContextProvider: React.FC<{ setSelector(_selector); setModal(_modal); + setLoading(false); }, []); useEffect(() => { @@ -141,23 +143,25 @@ export const WalletSelectorContextProvider: React.FC<{ subscription.unsubscribe(); onHideSubscription.remove(); }; - }, [selector]); + }, [selector, modal]); - if (!selector || !modal) { + const walletSelectorContextValue = useMemo( + () => ({ + selector: selector!, + modal: modal!, + accounts, + accountId: accounts.find((account) => account.active)?.accountId || null, + }), + [selector, modal, accounts] +); + + if (loading) { return ; } - const accountId = - accounts.find((account) => account.active)?.accountId || null; - return ( {children} From b04dcd8379a7a18292f4599b8791b5468c317945 Mon Sep 17 00:00:00 2001 From: sweetim Date: Wed, 5 Apr 2023 23:40:22 +0900 Subject: [PATCH 02/19] fix indent issue --- .../react/contexts/WalletSelectorContext.tsx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/examples/react/contexts/WalletSelectorContext.tsx b/examples/react/contexts/WalletSelectorContext.tsx index a0d31bb3e..8671ee7a3 100644 --- a/examples/react/contexts/WalletSelectorContext.tsx +++ b/examples/react/contexts/WalletSelectorContext.tsx @@ -17,7 +17,13 @@ import { setupNearSnap } from "@near-wallet-selector/near-snap"; import { setupWelldoneWallet } from "@near-wallet-selector/welldone-wallet"; import { setupXDEFI } from "@near-wallet-selector/xdefi"; import type { ReactNode } from "react"; -import React, { useCallback, useContext, useEffect, useState, useMemo } from "react"; +import React, { + useCallback, + useContext, + useEffect, + useState, + useMemo +} from "react"; import { distinctUntilChanged, map } from "rxjs"; import { setupNeth } from "@near-wallet-selector/neth"; @@ -147,13 +153,13 @@ export const WalletSelectorContextProvider: React.FC<{ const walletSelectorContextValue = useMemo( () => ({ - selector: selector!, - modal: modal!, - accounts, - accountId: accounts.find((account) => account.active)?.accountId || null, + selector: selector!, + modal: modal!, + accounts, + accountId: accounts.find((account) => account.active)?.accountId || null, }), [selector, modal, accounts] -); + ); if (loading) { return ; From 2a397950e43265869f8658f829120dd3f9144cd0 Mon Sep 17 00:00:00 2001 From: sweetim Date: Wed, 5 Apr 2023 23:49:38 +0900 Subject: [PATCH 03/19] fix indent issue --- examples/react/contexts/WalletSelectorContext.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/react/contexts/WalletSelectorContext.tsx b/examples/react/contexts/WalletSelectorContext.tsx index 8671ee7a3..37c826dd3 100644 --- a/examples/react/contexts/WalletSelectorContext.tsx +++ b/examples/react/contexts/WalletSelectorContext.tsx @@ -22,7 +22,7 @@ import React, { useContext, useEffect, useState, - useMemo + useMemo, } from "react"; import { distinctUntilChanged, map } from "rxjs"; @@ -166,9 +166,7 @@ export const WalletSelectorContextProvider: React.FC<{ } return ( - + {children} ); From be2ebe20bdb7f5cc771f223cdd488d63e97d2188 Mon Sep 17 00:00:00 2001 From: amirsaran3 Date: Thu, 6 Apr 2023 14:16:13 +0200 Subject: [PATCH 04/19] Updated docs --- packages/account-export/README.md | 1 + packages/coin98-wallet/README.md | 1 + packages/core/docs/api/selector.md | 1 + packages/core/docs/guides/custom-wallets.md | 27 ++++++++++++++++----- packages/finer-wallet/README.md | 1 + packages/here-wallet/README.md | 7 ++++++ packages/ledger/README.md | 1 + packages/math-wallet/README.md | 1 + packages/meteor-wallet/README.md | 1 + packages/modal-ui-js/README.md | 2 +- packages/modal-ui/README.md | 1 + packages/my-near-wallet/README.md | 3 +++ packages/narwallets/README.md | 1 + packages/near-snap/README.md | 1 + packages/near-wallet/README.md | 3 +++ packages/nearfi/README.md | 1 + packages/nightly-connect/README.md | 2 +- packages/nightly/README.md | 1 + packages/opto-wallet/README.md | 1 + packages/sender/README.md | 1 + packages/wallet-connect/README.md | 2 ++ packages/wallet-utils/README.md | 8 +++++- packages/welldone-wallet/README.md | 1 + packages/xdefi/README.md | 1 + 24 files changed, 61 insertions(+), 9 deletions(-) diff --git a/packages/account-export/README.md b/packages/account-export/README.md index f67bba944..0b80f3ca0 100644 --- a/packages/account-export/README.md +++ b/packages/account-export/README.md @@ -43,6 +43,7 @@ modal.show(); - `accounts` (`Array`): List of objects with an account id and its private key to be exported. - `theme` (`Theme?`): Specify light/dark theme for UI. Defaults to the browser configuration when omitted or set to 'auto'. This can be either `light`, `dark` or `auto`. - `description` (`string?`): Define a custom description in the UI. +- `onComplete` (`(accounts: Array) => void`): Triggers when the user completes the flow. By default it is not set. ## Styles & Customizing CSS diff --git a/packages/coin98-wallet/README.md b/packages/coin98-wallet/README.md index df7e13e1f..a60285cae 100644 --- a/packages/coin98-wallet/README.md +++ b/packages/coin98-wallet/README.md @@ -43,6 +43,7 @@ const selector = await setupWalletSelector({ ## Options - `iconUrl`: (`string?`): Icon is optional. Default image point to Coin98 Wallet Logo in base64 format. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. ## License diff --git a/packages/core/docs/api/selector.md b/packages/core/docs/api/selector.md index cd949211c..b5855ce60 100644 --- a/packages/core/docs/api/selector.md +++ b/packages/core/docs/api/selector.md @@ -12,6 +12,7 @@ - `debug` (`boolean`): Whether internal logging is enabled. - `optimizeWalletOrder` (`boolean`): Whether wallet order optimization is enabled. - `randomizeWalletOrder` (`boolean`): Weather wallet order randomization is enabled. +- `languageCode` (`string?`): ISO 639-1 two-letter language code. **Description** Resolved variation of the options passed to `setupWalletSelector`. diff --git a/packages/core/docs/guides/custom-wallets.md b/packages/core/docs/guides/custom-wallets.md index 10c8bee16..3355b25f6 100644 --- a/packages/core/docs/guides/custom-wallets.md +++ b/packages/core/docs/guides/custom-wallets.md @@ -41,6 +41,16 @@ const MyWallet: WalletBehaviourFactory = ({ return []; }, + async verifyOwner({ message }) { + const signature = provider.signMessage(message); + + return { + ...data, + signature: Buffer.from(signature.signature).toString("base64"), + keyType: signature.publicKey.keyType, + }; // Promise + }, + async signAndSendTransaction({ signerId, receiverId, actions }) { // Sign a list of NEAR Actions before sending via an RPC endpoint. // An RPC provider is injected to make this process easier and configured based on options.network. @@ -92,12 +102,13 @@ export function setupMyWallet({ A variation of `WalletModule` is added to state during setup under `modules` (`ModuleState`) and accessed by the UI to display the available wallets. It's important that `id` is unique to avoid conflicts with other wallets installed by a dApp. The `type` property is coupled to the parameter we pass to `WalletModuleFactory` and `WalletBehaviourFactory`. -Although we've tried to implement a polymorphic approach to wallets, there are some differences between wallet types that means your implementation won't always mirror other wallets such as Sender vs. Ledger. There are currently four types of wallet: +Although we've tried to implement a polymorphic approach to wallets, there are some differences between wallet types that means your implementation won't always mirror other wallets such as Sender vs. Ledger. There are currently five types of wallet: -- `BrowserWallet`: NEAR Wallet -- `InjectedWallet`: Sender & Math Wallet -- `HardwareWallet`: Ledger -- `BridgeWallet`: WalletConnect +- `BrowserWallet` +- `InjectedWallet` +- `HardwareWallet` +- `BridgeWallet` +- `InstantLinkWallet` ## Methods @@ -105,7 +116,7 @@ Although we've tried to implement a polymorphic approach to wallets, there are s This method handles access to accounts via `FunctionCall` access keys. It's important that at least one account is returned to be in a signed in state. -> Note: Hardware wallets require `derivationPaths`. +> Note: Hardware wallets require `accounts`. ### `signOut` @@ -115,6 +126,10 @@ This method handles signing out from accounts and cleanup such as event listener This method returns the current list of accounts we have access to. When no accounts are returned, the wallet is considered to be in a signed out state. +### `verifyOwner` + +Signs the message and verifies the owner. Message is not sent to blockchain. + ### `signAndSendTransaction` This method signs a list of NEAR Actions before sending via an RPC endpoint. The implementation can differ widely based on how much the wallet you're integrating does for you. At a minimum the wallet must be able to sign a message. diff --git a/packages/finer-wallet/README.md b/packages/finer-wallet/README.md index a0b99d8b6..1d588c83d 100644 --- a/packages/finer-wallet/README.md +++ b/packages/finer-wallet/README.md @@ -36,6 +36,7 @@ const selector = await setupWalletSelector({ - `walletUrl` (`string?`): Wallet URL used to redirect when signing transactions. This parameter is required when using custom network configuration. - `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/finer-wallet-icon.png`. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. ## Assets diff --git a/packages/here-wallet/README.md b/packages/here-wallet/README.md index 69e51957a..ded92e1f5 100644 --- a/packages/here-wallet/README.md +++ b/packages/here-wallet/README.md @@ -80,6 +80,13 @@ const hereWallet = setupHereWallet({ ``` +## Options + +- `iconUrl`: (`string?`): Icon is optional. Default image point to Here Wallet Logo in base64 format. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. +- `defaultStrategy`: (`() => HereStrategy?`): DefaultStrategy is optional. Default is `undefined`. +- `defaultProvider`: (`HereProvider`): HereProvider is optional. Default is `undefined`. + ## License This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0). diff --git a/packages/ledger/README.md b/packages/ledger/README.md index c63d87c4a..2f833b99b 100644 --- a/packages/ledger/README.md +++ b/packages/ledger/README.md @@ -41,6 +41,7 @@ const selector = await setupWalletSelector({ ## Options - `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/ledger-icon.png`. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. ## Assets diff --git a/packages/math-wallet/README.md b/packages/math-wallet/README.md index 8ce0f89f4..d27c45dc2 100644 --- a/packages/math-wallet/README.md +++ b/packages/math-wallet/README.md @@ -42,6 +42,7 @@ const selector = await setupWalletSelector({ ## Options - `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/math-wallet-icon.png`. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. ## Assets diff --git a/packages/meteor-wallet/README.md b/packages/meteor-wallet/README.md index ba738377e..858c3333c 100644 --- a/packages/meteor-wallet/README.md +++ b/packages/meteor-wallet/README.md @@ -41,6 +41,7 @@ const selector = await setupWalletSelector({ ## Options - `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/meteor-icon.png`. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. ## Assets diff --git a/packages/modal-ui-js/README.md b/packages/modal-ui-js/README.md index 6db179e8c..ce680a31b 100644 --- a/packages/modal-ui-js/README.md +++ b/packages/modal-ui-js/README.md @@ -39,7 +39,7 @@ modal.show(); - `methodNames` (`Array?`): Specify limited access to particular methods on the Smart Contract. - `theme` (`Theme?`): Specify light/dark theme for UI. Defaults to the browser configuration when omitted or set to 'auto'. This can be either `light`, `dark` or `auto`. - `description` (`string?`): Define a custom description in the UI. - +- `onHide` (`(hideReason: "user-triggered" | "wallet-navigation") => void`): Triggers when the user hides the modal. By default it is not set. ## Styles & Customizing CSS diff --git a/packages/modal-ui/README.md b/packages/modal-ui/README.md index a4dd4e08d..b48850503 100644 --- a/packages/modal-ui/README.md +++ b/packages/modal-ui/README.md @@ -39,6 +39,7 @@ modal.show(); - `methodNames` (`Array?`): Specify limited access to particular methods on the Smart Contract. - `theme` (`Theme?`): Specify light/dark theme for UI. Defaults to the browser configuration when omitted or set to 'auto'. This can be either `light`, `dark` or `auto`. - `description` (`string?`): Define a custom description in the UI. +- `onHide` (`(hideReason: "user-triggered" | "wallet-navigation") => void`): Triggers when the user hides the modal. By default it is not set. ## Styles & Customizing CSS diff --git a/packages/my-near-wallet/README.md b/packages/my-near-wallet/README.md index f18cc3054..f92d4acce 100644 --- a/packages/my-near-wallet/README.md +++ b/packages/my-near-wallet/README.md @@ -43,6 +43,9 @@ const selector = await setupWalletSelector({ - `walletUrl` (`string?`): Wallet URL used to redirect when signing transactions. This parameter is required for custom network configuration. - `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/my-near-wallet-icon.png`. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. +- `successUrl`: (`string?`): SuccessUrl is optional. Default is `''` (empty string). +- `failureUrl`: (`string?`): FailureUrl is optional. Default is `''` (empty string). ## Assets diff --git a/packages/narwallets/README.md b/packages/narwallets/README.md index aa294b245..7aee29e27 100644 --- a/packages/narwallets/README.md +++ b/packages/narwallets/README.md @@ -34,6 +34,7 @@ const selector = await setupWalletSelector({ ## Options - `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/narwallets-logo.png`. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. ## Assets diff --git a/packages/near-snap/README.md b/packages/near-snap/README.md index 9daddea25..f2cea80ac 100644 --- a/packages/near-snap/README.md +++ b/packages/near-snap/README.md @@ -43,6 +43,7 @@ const selector = await setupWalletSelector({ ## Options - `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/near-snap-icon.png`. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. ## Assets diff --git a/packages/near-wallet/README.md b/packages/near-wallet/README.md index fa5dd06a9..a80c997a0 100644 --- a/packages/near-wallet/README.md +++ b/packages/near-wallet/README.md @@ -36,6 +36,9 @@ const selector = await setupWalletSelector({ - `walletUrl` (`string?`): Wallet URL used to redirect when signing transactions. This parameter is required when using custom network configuration. - `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/near-wallet-icon.png`. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. +- `successUrl`: (`string?`): SuccessUrl is optional. Default is `''` (empty string). +- `failureUrl`: (`string?`): FailureUrl is optional. Default is `''` (empty string). ## Assets diff --git a/packages/nearfi/README.md b/packages/nearfi/README.md index 60ee968df..d1e120dc4 100644 --- a/packages/nearfi/README.md +++ b/packages/nearfi/README.md @@ -45,6 +45,7 @@ const selector = await setupWalletSelector({ ## Options - `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/nearfi-icon.png`. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. ## Assets diff --git a/packages/nightly-connect/README.md b/packages/nightly-connect/README.md index 8de5964a5..241fac4e1 100644 --- a/packages/nightly-connect/README.md +++ b/packages/nightly-connect/README.md @@ -45,11 +45,11 @@ const selector = await setupWalletSelector({ ## Options -- `persistent` (`boolean?`): Indication of whether last session id should be persisted in localStorage and used after user refreshes app. Defaults to true. - `appMetadata` (`object`): App metadata used to provide context of the dApp to the connected wallet. - `url` (`string?`): URL address of Nightly Connect proxy. - `timeout` (`number?`): Timeout of requests sent via proxy. - `iconUrl` (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/nightly-connect.png`. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. ## Assets diff --git a/packages/nightly/README.md b/packages/nightly/README.md index 16a849554..8a608d5d1 100644 --- a/packages/nightly/README.md +++ b/packages/nightly/README.md @@ -43,6 +43,7 @@ const selector = await setupWalletSelector({ ## Options - `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/nightly-icon.png`. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. ## Assets diff --git a/packages/opto-wallet/README.md b/packages/opto-wallet/README.md index 2c420b9fa..f170281db 100644 --- a/packages/opto-wallet/README.md +++ b/packages/opto-wallet/README.md @@ -43,6 +43,7 @@ const selector = await setupWalletSelector({ - `walletUrl` (`string?`): Wallet URL used to redirect when signing transactions. This parameter is required for custom network configuration. - `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/opto-wallet-icon.png`. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. ## Assets diff --git a/packages/sender/README.md b/packages/sender/README.md index ef9ec8792..9b002c45d 100644 --- a/packages/sender/README.md +++ b/packages/sender/README.md @@ -41,6 +41,7 @@ const selector = await setupWalletSelector({ ## Options - `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/sender-icon.png`. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. ## Assets diff --git a/packages/wallet-connect/README.md b/packages/wallet-connect/README.md index cddd71473..edfbac353 100644 --- a/packages/wallet-connect/README.md +++ b/packages/wallet-connect/README.md @@ -55,7 +55,9 @@ Project ID is required for wallet connect, please obtain it from [walletconnect. - `projectId` (`string`): Project ID is `required` to instantiate the client. More details can be found [here](https://docs.walletconnect.com/2.0/cloud/relay#project-id). - `metadata` (`object`): Metadata used to provide context of the dApp to the connected wallet. More details can be found [here](https://docs.walletconnect.com/2.0/specs/clients/core/pairing/data-structures#metadata). - `chainId` (`string?`): Chain ID for requests. Defaults to `"near:` unless using custom network configuration. +- `relayUrl` (`string?`): Relay URL for requests. Defaults to `"wss://relay.walletconnect.com"`. - `iconUrl` (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/wallet-connect-icon.png`. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. ## Assets diff --git a/packages/wallet-utils/README.md b/packages/wallet-utils/README.md index 6d4f79b10..3dfcdac84 100644 --- a/packages/wallet-utils/README.md +++ b/packages/wallet-utils/README.md @@ -25,7 +25,7 @@ npm install @near-wallet-selector/wallet-utils Then use it in your custom wallet integration: ```ts -import { createAction } from "@near-wallet-selector/wallet-utils"; +import { createAction, signTransactions } from "@near-wallet-selector/wallet-utils"; const action = createAction({ type: "Transfer", @@ -33,6 +33,12 @@ const action = createAction({ deposit: "10000000000000000000000", }, }); + +const signedTransactions = await signTransactions( + [{ signerId, receiverId, actions }], + signer, + options.network +); ``` ## License diff --git a/packages/welldone-wallet/README.md b/packages/welldone-wallet/README.md index 214de9c65..c58e180d6 100644 --- a/packages/welldone-wallet/README.md +++ b/packages/welldone-wallet/README.md @@ -41,6 +41,7 @@ const selector = await setupWalletSelector({ ## Options - `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/welldone-wallet.png`. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. ## Assets diff --git a/packages/xdefi/README.md b/packages/xdefi/README.md index 7afb51976..3c1586def 100644 --- a/packages/xdefi/README.md +++ b/packages/xdefi/README.md @@ -41,6 +41,7 @@ const selector = await setupWalletSelector({ ## Options - `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/xdefi-icon.png`. +- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`. ## Assets From 6480db698a05766f17e73a989e7fae14fd3187f8 Mon Sep 17 00:00:00 2001 From: amirsaran3 Date: Thu, 6 Apr 2023 14:27:33 +0200 Subject: [PATCH 05/19] Fixed typos --- packages/core/docs/guides/custom-wallets.md | 2 +- packages/core/docs/guides/multilanguage-support.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/docs/guides/custom-wallets.md b/packages/core/docs/guides/custom-wallets.md index 3355b25f6..edf980051 100644 --- a/packages/core/docs/guides/custom-wallets.md +++ b/packages/core/docs/guides/custom-wallets.md @@ -22,7 +22,7 @@ const MyWallet: WalletBehaviourFactory = ({ options, provider, }) => { - // Initialise wallet-sepecific client(s) here. + // Initialise wallet-specific client(s) here. return { async signIn({ contractId, methodNames }) { diff --git a/packages/core/docs/guides/multilanguage-support.md b/packages/core/docs/guides/multilanguage-support.md index f5d6184b7..bb402d417 100644 --- a/packages/core/docs/guides/multilanguage-support.md +++ b/packages/core/docs/guides/multilanguage-support.md @@ -1,7 +1,7 @@ -# Multilanguage support +# Multi-language support - Languages are detected from browser language settings. -- If user preffered language is not supported, english is rendered as default. +- If user preferred language is not supported, english is rendered as default. ## Supported languages From 595b180284378c2aa65eafb2046413682f17a00f Mon Sep 17 00:00:00 2001 From: sweetim Date: Thu, 6 Apr 2023 22:11:27 +0900 Subject: [PATCH 06/19] change WalletSelectorContextValue interface --- examples/react/contexts/WalletSelectorContext.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/react/contexts/WalletSelectorContext.tsx b/examples/react/contexts/WalletSelectorContext.tsx index 37c826dd3..47695dc7a 100644 --- a/examples/react/contexts/WalletSelectorContext.tsx +++ b/examples/react/contexts/WalletSelectorContext.tsx @@ -42,8 +42,8 @@ declare global { } interface WalletSelectorContextValue { - selector: WalletSelector; - modal: WalletSelectorModal; + selector: WalletSelector | null; + modal: WalletSelectorModal | null; accounts: Array; accountId: string | null; } @@ -110,6 +110,8 @@ export const WalletSelectorContextProvider: React.FC<{ const state = _selector.store.getState(); setAccounts(state.accounts); + // this is added for debugging purpose only + // for more information (https://github.com/near/wallet-selector/pull/764#issuecomment-1498073367) window.selector = _selector; window.modal = _modal; @@ -153,8 +155,8 @@ export const WalletSelectorContextProvider: React.FC<{ const walletSelectorContextValue = useMemo( () => ({ - selector: selector!, - modal: modal!, + selector, + modal, accounts, accountId: accounts.find((account) => account.active)?.accountId || null, }), From d12d6d92fb4f43c218cf5ac4dc9aeb5b9da98cd7 Mon Sep 17 00:00:00 2001 From: sweetim Date: Thu, 6 Apr 2023 22:11:38 +0900 Subject: [PATCH 07/19] refactor export context --- .../contexts/WalletSelectorExportContext.tsx | 38 ++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/examples/react/contexts/WalletSelectorExportContext.tsx b/examples/react/contexts/WalletSelectorExportContext.tsx index e6479e722..53f9445a9 100644 --- a/examples/react/contexts/WalletSelectorExportContext.tsx +++ b/examples/react/contexts/WalletSelectorExportContext.tsx @@ -1,5 +1,11 @@ import type { ReactNode } from "react"; -import React, { useCallback, useContext, useEffect, useState } from "react"; +import React, { + useCallback, + useContext, + useEffect, + useState, + useMemo, +} from "react"; import { map, distinctUntilChanged } from "rxjs"; import { setupWalletSelector } from "@near-wallet-selector/core"; import type { WalletSelector, AccountState } from "@near-wallet-selector/core"; @@ -29,8 +35,8 @@ declare global { } interface ExportAccountSelectorContextValue { - importSelector: WalletSelector; - ExportModal: WalletSelectorModal; + importSelector: WalletSelector | null; + ExportModal: WalletSelectorModal | null; accounts: Array; accountId: string | null; } @@ -44,6 +50,7 @@ export const ExportAccountSelectorContextProvider: React.FC<{ const [importSelector, setSelector] = useState(null); const [ExportModal, setModal] = useState(null); const [accounts, setAccounts] = useState>([]); + const [loading, setLoading] = useState(true); const init = useCallback(async () => { const _selector = await setupWalletSelector({ @@ -95,11 +102,14 @@ export const ExportAccountSelectorContextProvider: React.FC<{ const state = _selector.store.getState(); setAccounts(state.accounts); + // this is added for debugging purpose only + // for more information (https://github.com/near/wallet-selector/pull/764#issuecomment-1498073367) window.importSelector = _selector; window.ExportModal = _modal; setSelector(_selector); setModal(_modal); + setLoading(false); }, []); useEffect(() => { @@ -126,21 +136,23 @@ export const ExportAccountSelectorContextProvider: React.FC<{ return () => subscription.unsubscribe(); }, [importSelector]); - if (!importSelector || !ExportModal) { + const exportWalletSelectorContextValue = useMemo( + () => ({ + selector, + modal, + accounts, + accountId: accounts.find((account) => account.active)?.accountId || null, + }), + [selector, modal, accounts] + ); + + if (loading) { return ; } - const accountId = - accounts.find((account) => account.active)?.accountId || null; - return ( {children} From 319ff1aeda9ac7bf385c7dcf999ad4b445e60b2a Mon Sep 17 00:00:00 2001 From: sweetim Date: Thu, 6 Apr 2023 22:42:38 +0900 Subject: [PATCH 08/19] fix lint error --- examples/react/contexts/WalletSelectorExportContext.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/react/contexts/WalletSelectorExportContext.tsx b/examples/react/contexts/WalletSelectorExportContext.tsx index 53f9445a9..309319692 100644 --- a/examples/react/contexts/WalletSelectorExportContext.tsx +++ b/examples/react/contexts/WalletSelectorExportContext.tsx @@ -48,7 +48,7 @@ export const ExportAccountSelectorContextProvider: React.FC<{ children: ReactNode; }> = ({ children }) => { const [importSelector, setSelector] = useState(null); - const [ExportModal, setModal] = useState(null); + const [modal, setModal] = useState(null); const [accounts, setAccounts] = useState>([]); const [loading, setLoading] = useState(true); @@ -138,12 +138,12 @@ export const ExportAccountSelectorContextProvider: React.FC<{ const exportWalletSelectorContextValue = useMemo( () => ({ - selector, + importSelector, modal, accounts, accountId: accounts.find((account) => account.active)?.accountId || null, }), - [selector, modal, accounts] + [importSelector, modal, accounts] ); if (loading) { From 0be8f2ead1d3814a20aa53a7343da91485a8fb97 Mon Sep 17 00:00:00 2001 From: sweetim Date: Thu, 6 Apr 2023 22:54:21 +0900 Subject: [PATCH 09/19] fix lint error --- .../contexts/WalletSelectorExportContext.tsx | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/examples/react/contexts/WalletSelectorExportContext.tsx b/examples/react/contexts/WalletSelectorExportContext.tsx index 309319692..a7ace28fa 100644 --- a/examples/react/contexts/WalletSelectorExportContext.tsx +++ b/examples/react/contexts/WalletSelectorExportContext.tsx @@ -136,15 +136,17 @@ export const ExportAccountSelectorContextProvider: React.FC<{ return () => subscription.unsubscribe(); }, [importSelector]); - const exportWalletSelectorContextValue = useMemo( - () => ({ - importSelector, - modal, - accounts, - accountId: accounts.find((account) => account.active)?.accountId || null, - }), - [importSelector, modal, accounts] - ); + const exportWalletSelectorContextValue = + useMemo( + () => ({ + importSelector, + modal, + accounts, + accountId: + accounts.find((account) => account.active)?.accountId || null, + }), + [importSelector, modal, accounts] + ); if (loading) { return ; From 3405a282e7459ad5d437d6609c5224d703e355a9 Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Fri, 7 Apr 2023 11:25:57 +0200 Subject: [PATCH 10/19] Remove null type from selector and modal to avoid using ! operator in child components. --- examples/react/components/ExportContent.tsx | 4 ++-- examples/react/contexts/WalletSelectorContext.tsx | 8 ++++---- .../react/contexts/WalletSelectorExportContext.tsx | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/react/components/ExportContent.tsx b/examples/react/components/ExportContent.tsx index 4cd5a9f23..3a90eeaa1 100644 --- a/examples/react/components/ExportContent.tsx +++ b/examples/react/components/ExportContent.tsx @@ -3,10 +3,10 @@ import { Fragment } from "react"; import { useExportAccountSelector } from "../contexts/WalletSelectorExportContext"; const ExportContent: NextPage = () => { - const { ExportModal } = useExportAccountSelector(); + const { exportModal } = useExportAccountSelector(); return ( - +

The Export Accounts modal assists users in migrating their accounts to any Wallet Selector wallet supporting account imports. Any sensitive diff --git a/examples/react/contexts/WalletSelectorContext.tsx b/examples/react/contexts/WalletSelectorContext.tsx index 47695dc7a..b690badfd 100644 --- a/examples/react/contexts/WalletSelectorContext.tsx +++ b/examples/react/contexts/WalletSelectorContext.tsx @@ -42,8 +42,8 @@ declare global { } interface WalletSelectorContextValue { - selector: WalletSelector | null; - modal: WalletSelectorModal | null; + selector: WalletSelector; + modal: WalletSelectorModal; accounts: Array; accountId: string | null; } @@ -155,8 +155,8 @@ export const WalletSelectorContextProvider: React.FC<{ const walletSelectorContextValue = useMemo( () => ({ - selector, - modal, + selector: selector!, + modal: modal!, accounts, accountId: accounts.find((account) => account.active)?.accountId || null, }), diff --git a/examples/react/contexts/WalletSelectorExportContext.tsx b/examples/react/contexts/WalletSelectorExportContext.tsx index a7ace28fa..d5fc980b7 100644 --- a/examples/react/contexts/WalletSelectorExportContext.tsx +++ b/examples/react/contexts/WalletSelectorExportContext.tsx @@ -30,13 +30,13 @@ import { setupLedger } from "@near-wallet-selector/ledger"; declare global { interface Window { importSelector: WalletSelector; - ExportModal: WalletSelectorModal; + exportModal: WalletSelectorModal; } } interface ExportAccountSelectorContextValue { - importSelector: WalletSelector | null; - ExportModal: WalletSelectorModal | null; + importSelector: WalletSelector; + exportModal: WalletSelectorModal; accounts: Array; accountId: string | null; } @@ -105,7 +105,7 @@ export const ExportAccountSelectorContextProvider: React.FC<{ // this is added for debugging purpose only // for more information (https://github.com/near/wallet-selector/pull/764#issuecomment-1498073367) window.importSelector = _selector; - window.ExportModal = _modal; + window.exportModal = _modal; setSelector(_selector); setModal(_modal); @@ -139,8 +139,8 @@ export const ExportAccountSelectorContextProvider: React.FC<{ const exportWalletSelectorContextValue = useMemo( () => ({ - importSelector, - modal, + importSelector: importSelector!, + exportModal: modal!, accounts, accountId: accounts.find((account) => account.active)?.accountId || null, From a948bb083918a1bcd1eee1a1b1ed3b401b4ef236 Mon Sep 17 00:00:00 2001 From: amirsaran3 Date: Fri, 7 Apr 2023 12:08:40 +0200 Subject: [PATCH 11/19] Removed deprecated onHide from docs --- packages/modal-ui-js/README.md | 1 - packages/modal-ui/README.md | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/modal-ui-js/README.md b/packages/modal-ui-js/README.md index ce680a31b..7e4f94520 100644 --- a/packages/modal-ui-js/README.md +++ b/packages/modal-ui-js/README.md @@ -39,7 +39,6 @@ modal.show(); - `methodNames` (`Array?`): Specify limited access to particular methods on the Smart Contract. - `theme` (`Theme?`): Specify light/dark theme for UI. Defaults to the browser configuration when omitted or set to 'auto'. This can be either `light`, `dark` or `auto`. - `description` (`string?`): Define a custom description in the UI. -- `onHide` (`(hideReason: "user-triggered" | "wallet-navigation") => void`): Triggers when the user hides the modal. By default it is not set. ## Styles & Customizing CSS diff --git a/packages/modal-ui/README.md b/packages/modal-ui/README.md index b48850503..a4dd4e08d 100644 --- a/packages/modal-ui/README.md +++ b/packages/modal-ui/README.md @@ -39,7 +39,6 @@ modal.show(); - `methodNames` (`Array?`): Specify limited access to particular methods on the Smart Contract. - `theme` (`Theme?`): Specify light/dark theme for UI. Defaults to the browser configuration when omitted or set to 'auto'. This can be either `light`, `dark` or `auto`. - `description` (`string?`): Define a custom description in the UI. -- `onHide` (`(hideReason: "user-triggered" | "wallet-navigation") => void`): Triggers when the user hides the modal. By default it is not set. ## Styles & Customizing CSS From 9f62548b178eb5d7c6ad0a9eecb26114d74b6d0f Mon Sep 17 00:00:00 2001 From: amirsaran3 Date: Fri, 7 Apr 2023 12:15:31 +0200 Subject: [PATCH 12/19] Removed unused onHide property from modal options --- packages/modal-ui-js/src/lib/modal.types.ts | 1 - packages/modal-ui-js/src/lib/render-modal.ts | 8 ++------ packages/modal-ui/src/lib/modal.types.ts | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/modal-ui-js/src/lib/modal.types.ts b/packages/modal-ui-js/src/lib/modal.types.ts index 617206ccd..714f4f8e5 100644 --- a/packages/modal-ui-js/src/lib/modal.types.ts +++ b/packages/modal-ui-js/src/lib/modal.types.ts @@ -9,7 +9,6 @@ export interface ModalOptions { methodNames?: Array; theme?: Theme; description?: string; - onHide?: (hideReason: "user-triggered" | "wallet-navigation") => void; } export type ModalHideReason = "user-triggered" | "wallet-navigation"; diff --git a/packages/modal-ui-js/src/lib/render-modal.ts b/packages/modal-ui-js/src/lib/render-modal.ts index 4a8909d01..a302e0b69 100644 --- a/packages/modal-ui-js/src/lib/render-modal.ts +++ b/packages/modal-ui-js/src/lib/render-modal.ts @@ -320,9 +320,7 @@ export function renderModal() { } modalState.container.children[0].classList.remove("open"); - if (modalState.options.onHide) { - modalState.emitter.emit("onHide", { hideReason: "user-triggered" }); - } + modalState.emitter.emit("onHide", { hideReason: "user-triggered" }); }); // TODO: Better handle `click` event listener for close-button. @@ -337,9 +335,7 @@ export function renderModal() { if (target && target.className === "close-button") { modalState.container.children[0].classList.remove("open"); - if (modalState.options.onHide) { - modalState.emitter.emit("onHide", { hideReason: "user-triggered" }); - } + modalState.emitter.emit("onHide", { hideReason: "user-triggered" }); } }); initialRender = false; diff --git a/packages/modal-ui/src/lib/modal.types.ts b/packages/modal-ui/src/lib/modal.types.ts index 6167b7dbb..253f81e99 100644 --- a/packages/modal-ui/src/lib/modal.types.ts +++ b/packages/modal-ui/src/lib/modal.types.ts @@ -7,7 +7,6 @@ export interface ModalOptions { methodNames?: Array; theme?: Theme; description?: string; - onHide?: (hideReason: "user-triggered" | "wallet-navigation") => void; } export type ModalHideReason = "user-triggered" | "wallet-navigation"; From 6eb200f2c4a29f0f754e073f65186be66c234e79 Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Fri, 7 Apr 2023 12:56:28 +0200 Subject: [PATCH 13/19] Disable rules from eslintrc.json for neth-lib. --- packages/neth/.eslintrc.json | 8 ++++++++ packages/neth/src/lib/neth-lib.ts | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/neth/.eslintrc.json b/packages/neth/.eslintrc.json index 9d9c0db55..481351fd3 100644 --- a/packages/neth/.eslintrc.json +++ b/packages/neth/.eslintrc.json @@ -13,6 +13,14 @@ { "files": ["*.js", "*.jsx"], "rules": {} + }, + { + "files": ["neth-lib.ts"], + "rules": { + "@typescript-eslint/naming-convention": ["off"], + "@typescript-eslint/no-use-before-define": ["off"], + "@typescript-eslint/no-explicit-any": ["off"] + } } ] } diff --git a/packages/neth/src/lib/neth-lib.ts b/packages/neth/src/lib/neth-lib.ts index 7ed9087ec..a6179cdd6 100644 --- a/packages/neth/src/lib/neth-lib.ts +++ b/packages/neth/src/lib/neth-lib.ts @@ -1,6 +1,3 @@ -/*eslint @typescript-eslint/no-use-before-define: 1*/ -/*eslint @typescript-eslint/no-explicit-any: 1*/ -/*eslint @typescript-eslint/naming-convention: 1*/ // @ts-nocheck import { ethers } from "ethers"; From a1de1ee43c972b08d78963abc537b16be6744e3f Mon Sep 17 00:00:00 2001 From: amirsaran3 Date: Tue, 11 Apr 2023 16:24:59 +0200 Subject: [PATCH 14/19] Moved instant link wallet signin call after state has been updated --- .../wallet-modules/wallet-modules.service.ts | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/packages/core/src/lib/services/wallet-modules/wallet-modules.service.ts b/packages/core/src/lib/services/wallet-modules/wallet-modules.service.ts index b16598600..a67958802 100644 --- a/packages/core/src/lib/services/wallet-modules/wallet-modules.service.ts +++ b/packages/core/src/lib/services/wallet-modules/wallet-modules.service.ts @@ -374,19 +374,6 @@ export class WalletModules { this.modules = modules; - for (let i = 0; i < this.modules.length; i++) { - if (this.modules[i].type === "instant-link") { - const wallet = (await this.modules[i].wallet()) as InstantLinkWallet; - if (wallet.metadata.runOnStartup) { - try { - await wallet.signIn({ contractId: wallet.getContractId() }); - } catch (err) { - logger.error("Failed to sign in to wallet. " + err); - } - } - } - } - const { accounts, contract, selectedWalletId, recentlySignedInWallets } = await this.resolveStorageState(); @@ -400,5 +387,22 @@ export class WalletModules { recentlySignedInWallets, }, }); + + for (let i = 0; i < this.modules.length; i++) { + if (this.modules[i].type !== "instant-link") { + continue; + } + + const wallet = (await this.modules[i].wallet()) as InstantLinkWallet; + if (!wallet.metadata.runOnStartup) { + continue; + } + + try { + await wallet.signIn({ contractId: wallet.getContractId() }); + } catch (err) { + logger.error("Failed to sign in to wallet. " + err); + } + } } } From 0ac74e081edc33297ec99c15cbd06fe783e8a281 Mon Sep 17 00:00:00 2001 From: amirsaranBIH Date: Wed, 19 Apr 2023 13:00:44 +0200 Subject: [PATCH 15/19] Updated near-api-js to 2.1.0 and fixed neth breaking changes --- package.json | 2 +- packages/neth/src/lib/neth-lib.ts | 100 +++++++++++++----- packages/neth/src/lib/neth.ts | 7 +- yarn.lock | 167 ++++++++++++++++++++++++++++-- 4 files changed, 236 insertions(+), 40 deletions(-) diff --git a/package.json b/package.json index bfd4497da..cd931927e 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "crypto-browserify": "^3.12.0", "ethers": "^5.7.2", "is-mobile": "^3.1.1", - "near-api-js": "^1.1.0", + "near-api-js": "^2.1.0", "near-seed-phrase": "^0.2.0", "next": "12.2.3", "ngx-deploy-npm": "^4.3.10", diff --git a/packages/neth/src/lib/neth-lib.ts b/packages/neth/src/lib/neth-lib.ts index 7ed9087ec..3bc7778a8 100644 --- a/packages/neth/src/lib/neth-lib.ts +++ b/packages/neth/src/lib/neth-lib.ts @@ -462,13 +462,13 @@ export const handleCheckAccount = async ({ const account = new Account(connection, newAccountId); logger.log("Checking account address mapping."); - const mapRes = await account.viewFunction( - NETWORK[networkId].MAP_ACCOUNT_ID, - "get_eth", - { + const mapRes = await account.viewFunction({ + contractId: NETWORK[networkId].MAP_ACCOUNT_ID, + methodName: "get_eth", + args: { account_id: newAccountId, - } - ); + }, + }); if (mapRes === null) { return handleMapping(); } @@ -481,7 +481,10 @@ export const handleCheckAccount = async ({ logger.log("Checking contract setup."); try { - const ethRes = await account.viewFunction(newAccountId, "get_address"); + const ethRes = await account.viewFunction({ + contractId: newAccountId, + methodName: "get_address", + }); // any reason the address wasn't set properly if (!ethRes || !ethRes.length) { return handleSetupContract(); @@ -532,7 +535,10 @@ export const handleRefreshAppKey = async (signer, ethAddress) => { // now refresh app key const nonce = parseInt( - await account.viewFunction(accountId, "get_nonce"), + await account.viewFunction({ + contractId: accountId, + methodName: "get_nonce", + }), 16 ).toString(); // new public key based on current nonce which will become the app_key_nonce in contract after this TX @@ -556,7 +562,10 @@ export const handleRefreshAppKey = async (signer, ethAddress) => { if (hasAppKey(accessKeys)) { // old public key based on current app_key_nonce const appKeyNonce = parseInt( - await account.viewFunction(accountId, "get_app_key_nonce"), + await account.viewFunction({ + contractId: accountId, + methodName: "get_app_key_nonce", + }), 16 ).toString(); const { publicKey: oldPublicKey } = await keyPairFromEthSig( @@ -612,7 +621,10 @@ export const handleUpdateContract = async (signer, ethAddress) => { }, ]; const nonce = parseInt( - await account.viewFunction(accountId, "get_nonce"), + await account.viewFunction({ + contractId: accountId, + methodName: "get_nonce", + }), 16 ).toString(); const args = await ethSignJson(signer, { @@ -694,7 +706,10 @@ export const handleDisconnect = async (signer, ethAddress) => { }) ) { const appKeyNonce = parseInt( - await account.viewFunction(accountId, "get_app_key_nonce"), + await account.viewFunction({ + contractId: accountId, + methodName: "get_app_key_nonce", + }), 16 ).toString(); const { publicKey: oldPublicKey } = await keyPairFromEthSig( @@ -710,7 +725,10 @@ export const handleDisconnect = async (signer, ethAddress) => { /// get args for execute call const nonce = parseInt( - await account.viewFunction(accountId, "get_nonce"), + await account.viewFunction({ + contractId: accountId, + methodName: "get_nonce", + }), 16 ).toString(); const args = await ethSignJson(signer, { @@ -1005,19 +1023,24 @@ export const switchEthereum = async () => { /// near export const getNearMap = async (eth_address) => { - return contractAccount.viewFunction( - NETWORK[networkId].MAP_ACCOUNT_ID, - "get_near", - { eth_address } - ); + return contractAccount.viewFunction({ + contractId: NETWORK[networkId].MAP_ACCOUNT_ID, + methodName: "get_near", + args: { + eth_address, + }, + }); }; -export const getNear = async (): { - account: NearAccount; - accountId: string; - keyPair: NearKeyPair; - secretKey: string; -} => { +export const getNear = async (): Promise< + | false + | { + account: NearAccount; + accountId: string; + keyPair: NearKeyPair; + secretKey: string; + } +> => { const secretKey = await storage.getItem(APP_KEY_SECRET); const accountId = await storage.getItem(APP_KEY_ACCOUNT_ID); if (!secretKey || !accountId) { @@ -1050,7 +1073,10 @@ export const signOut = async () => { export const verifyOwner = async ({ message, provider, account }) => { let accountId; if (!account) { - ({ account, accountId } = await getNear()); + const nearAccount = await getNear(); + if (nearAccount) { + ({ account, accountId } = nearAccount); + } } else { ({ accountId } = account); } @@ -1153,7 +1179,10 @@ export const getAppKey = async ({ signer, ethAddress: eth_address }) => { // accountId = account.accountId; } const appKeyNonce = parseInt( - await contractAccount.viewFunction(accountId, "get_app_key_nonce"), + await contractAccount.viewFunction({ + contractId: accountId, + methodName: "get_app_key_nonce", + }), 16 ).toString(); const { publicKey, secretKey } = await keyPairFromEthSig( @@ -1174,7 +1203,12 @@ export const getAppKey = async ({ signer, ethAddress: eth_address }) => { }; const broadcastTXs = async () => { - const { account, accountId } = await getNear(); + const nearAccount = await getNear(); + if (!nearAccount) { + logger.log("NETH: ERROR broadcasting tx. No account found."); + return; + } + const { account, accountId } = nearAccount; const args = await storage.getItem(TX_ARGS_ATTEMPT); if (!args || args.length === 0) { return; @@ -1204,7 +1238,14 @@ const broadcastTXs = async () => { export const signAndSendTransactions = async ({ transactions, bundle }) => { const ethRes: any = await getEthereum(); const { signer } = ethRes; - const { account, accountId } = await getNear(); + const nearAccount = await getNear(); + if (!nearAccount) { + logger.log( + "NETH: ERROR signing and sending transactions. No account found." + ); + return; + } + const { account, accountId } = nearAccount; const receivers = transactions.map(({ receiverId }) => receiverId); const transformedTxs = transactions.map(({ receiverId, actions }) => ({ @@ -1212,7 +1253,10 @@ export const signAndSendTransactions = async ({ transactions, bundle }) => { })); const nonce = parseInt( - await account.viewFunction(accountId, "get_nonce"), + await account.viewFunction({ + contractId: accountId, + methodName: "get_nonce", + }), 16 ); const args: Array = []; diff --git a/packages/neth/src/lib/neth.ts b/packages/neth/src/lib/neth.ts index 47eaac96a..3bcce1445 100644 --- a/packages/neth/src/lib/neth.ts +++ b/packages/neth/src/lib/neth.ts @@ -152,7 +152,12 @@ const Neth: WalletBehaviourFactory = async ({ }, async getAccounts() { - const { accountId, account } = await getNear(); + const near = await getNear(); + if (!near) { + logger.log("NETH:getAccounts"); + return []; + } + const { account, accountId } = near; return [ { accountId, diff --git a/yarn.lock b/yarn.lock index 0b4f09090..2234b733a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2716,6 +2716,126 @@ "@motionone/dom" "^10.15.5" tslib "^2.3.1" +"@near-js/accounts@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@near-js/accounts/-/accounts-0.1.0.tgz#3fd44ec290eed196babe31adeac5aea40ccf01dd" + integrity sha512-2VCo8qJRkzzw2p7Na/ApMqn18JXBdQQU9jQMWgcYA/U8yw39EsmXoMTUFsfI9vKoQOmeRgxR5efwQn48rtuJNw== + dependencies: + "@near-js/crypto" "0.0.3" + "@near-js/providers" "0.0.3" + "@near-js/signers" "0.0.3" + "@near-js/transactions" "0.1.0" + "@near-js/types" "0.0.3" + "@near-js/utils" "0.0.3" + ajv "^8.11.2" + ajv-formats "^2.1.1" + bn.js "5.2.1" + borsh "^0.7.0" + depd "^2.0.0" + near-abi "0.1.1" + +"@near-js/crypto@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@near-js/crypto/-/crypto-0.0.3.tgz#4a33e526ab5fa75b703427067985694a279ff8bd" + integrity sha512-3WC2A1a1cH8Cqrx+0iDjp1ASEEhxN/KHEMENYb0KZH6Hp5bXIY7Akt4quC7JlgJS5ESvEiLa40tS5h0zAhBWGw== + dependencies: + "@near-js/types" "0.0.3" + bn.js "5.2.1" + borsh "^0.7.0" + tweetnacl "^1.0.1" + +"@near-js/keystores-browser@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@near-js/keystores-browser/-/keystores-browser-0.0.3.tgz#110b847cd9c358076c2401e9462cc1140e12a908" + integrity sha512-Ve/JQ1SBxdNk3B49lElJ8Y54AoBY+yOStLvdnUIpe2FBOczzwDCkcnPcMDV0NMwVlHpEnOWICWHbRbAkI5Vs+A== + dependencies: + "@near-js/crypto" "0.0.3" + "@near-js/keystores" "0.0.3" + +"@near-js/keystores-node@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@near-js/keystores-node/-/keystores-node-0.0.3.tgz#074e0aadb55b2ceda43f4389b253193d7a7d7057" + integrity sha512-8Yry0jARK2R2+V4KjEganrnpXhosArwgpyrbvtvptwLLNNFvo/AY1ekGV1EpQ3BVst1qvf5R5TXnIti9OBmEHw== + dependencies: + "@near-js/crypto" "0.0.3" + "@near-js/keystores" "0.0.3" + +"@near-js/keystores@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@near-js/keystores/-/keystores-0.0.3.tgz#eb1e8e06936da166b5ed8dab3123eaa1bf7a8dab" + integrity sha512-mnwLYUt4Td8u1I4QE1FBx2d9hMt3ofiriE93FfOluJ4XiqRqVFakFYiHg6pExg5iEkej/sXugBUFeQ4QizUnew== + dependencies: + "@near-js/crypto" "0.0.3" + "@near-js/types" "0.0.3" + +"@near-js/providers@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@near-js/providers/-/providers-0.0.3.tgz#95f71f9d81139f9eb54a287f859785d75ed007f3" + integrity sha512-NblqLsPfKIWKwQZh+dLZs0nQ+Dx9/MrP1uagRmxZd+aEN/IgYr7Q0mdT77WHQKrsgXiMnipknRZxeoY5bImCuw== + dependencies: + "@near-js/transactions" "0.1.0" + "@near-js/types" "0.0.3" + "@near-js/utils" "0.0.3" + bn.js "5.2.1" + borsh "^0.7.0" + http-errors "^1.7.2" + optionalDependencies: + node-fetch "^2.6.1" + +"@near-js/signers@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@near-js/signers/-/signers-0.0.3.tgz#bfc8386613295fc6b51982cf65c79bdc9307aa5e" + integrity sha512-u1R+DDIua5PY1PDFnpVYqdMgQ7c4dyeZsfqMjE7CtgzdqupgTYCXzJjBubqMlAyAx843PoXmLt6CSSKcMm0WUA== + dependencies: + "@near-js/crypto" "0.0.3" + "@near-js/keystores" "0.0.3" + js-sha256 "^0.9.0" + +"@near-js/transactions@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@near-js/transactions/-/transactions-0.1.0.tgz#a03f529da6bb2eaf9dd0590093f2d0763b8ae72a" + integrity sha512-OrrDFqhX0rtH+6MV3U3iS+zmzcPQI+L4GJi9na4Uf8FgpaVPF0mtSmVrpUrS5CC3LwWCzcYF833xGYbXOV4Kfg== + dependencies: + "@near-js/crypto" "0.0.3" + "@near-js/signers" "0.0.3" + "@near-js/types" "0.0.3" + "@near-js/utils" "0.0.3" + bn.js "5.2.1" + borsh "^0.7.0" + js-sha256 "^0.9.0" + +"@near-js/types@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@near-js/types/-/types-0.0.3.tgz#d504222469f4d50a6299c522fb6905ba10905bd6" + integrity sha512-gC3iGUT+r2JjVsE31YharT+voat79ToMUMLCGozHjp/R/UW1M2z4hdpqTUoeWUBGBJuVc810gNTneHGx0jvzwQ== + dependencies: + bn.js "5.2.1" + +"@near-js/utils@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@near-js/utils/-/utils-0.0.3.tgz#5e631f3dbdb7f0c6985bcbef08644db83b519978" + integrity sha512-J72n/EL0VfLRRb4xNUF4rmVrdzMkcmkwJOhBZSTWz3PAZ8LqNeU9ZConPfMvEr6lwdaD33ZuVv70DN6IIjPr1A== + dependencies: + "@near-js/types" "0.0.3" + bn.js "5.2.1" + depd "^2.0.0" + mustache "^4.0.0" + +"@near-js/wallet-account@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@near-js/wallet-account/-/wallet-account-0.0.3.tgz#81f6a0fc6d4f4ffcdb2c895186fdd86baf9a7b44" + integrity sha512-FD/v0z9HzXfmEerfhRde9HUOojh9IM7nXxCJZm6UF49aA2ztlaqbGvmXSfD+yvf3WG58pC5eUFvDl1sdco8jhQ== + dependencies: + "@near-js/accounts" "0.1.0" + "@near-js/crypto" "0.0.3" + "@near-js/keystores" "0.0.3" + "@near-js/signers" "0.0.3" + "@near-js/transactions" "0.1.0" + "@near-js/types" "0.0.3" + "@near-js/utils" "0.0.3" + bn.js "5.2.1" + borsh "^0.7.0" + "@next/env@12.2.3": version "12.2.3" resolved "https://registry.yarnpkg.com/@next/env/-/env-12.2.3.tgz#64f210e74c137d3d9feea738795b055a7f8aebe2" @@ -4411,7 +4531,7 @@ "@types/parse5" "*" "@types/tough-cookie" "*" -"@types/json-schema@*", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": +"@types/json-schema@*", "@types/json-schema@^7.0.11", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== @@ -5380,6 +5500,16 @@ ajv@^6.10.0, ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^8.11.2: + version "8.12.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" + integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + ansi-colors@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" @@ -12179,6 +12309,13 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== +near-abi@0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/near-abi/-/near-abi-0.1.1.tgz#b7ead408ca4ad11de4fe3e595d30a7a8bc5307e0" + integrity sha512-RVDI8O+KVxRpC3KycJ1bpfVj9Zv+xvq9PlW1yIFl46GhrnLw83/72HqHGjGDjQ8DtltkcpSjY9X3YIGZ+1QyzQ== + dependencies: + "@types/json-schema" "^7.0.11" + near-api-js@^0.45.1: version "0.45.1" resolved "https://registry.yarnpkg.com/near-api-js/-/near-api-js-0.45.1.tgz#0f0a4b378758a2f1b32555399d7356da73d0ef27" @@ -12196,21 +12333,31 @@ near-api-js@^0.45.1: text-encoding-utf-8 "^1.0.2" tweetnacl "^1.0.1" -near-api-js@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/near-api-js/-/near-api-js-1.1.0.tgz#907e807f052c1f043c6fbf28f61872de3c02235a" - integrity sha512-qYKv1mYsaDZc2uYndhS+ttDhR9+60qFc+ZjD6lWsAxr3ZskMjRwPffDGQZYhC7BRDQMe1HEbk6d5mf+TVm0Lqg== - dependencies: +near-api-js@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/near-api-js/-/near-api-js-2.1.0.tgz#dbdef65bbfb735de8f891309e198c27254fbe9c5" + integrity sha512-JH+xwBPCo8GZlJoJuStI38nfyBIT21iGXofq/X/ewi2pvMFAgpqCantiGgbm0zujyQLPwQPmA+PMm5VKC8y+nQ== + dependencies: + "@near-js/accounts" "0.1.0" + "@near-js/crypto" "0.0.3" + "@near-js/keystores" "0.0.3" + "@near-js/keystores-browser" "0.0.3" + "@near-js/keystores-node" "0.0.3" + "@near-js/providers" "0.0.3" + "@near-js/signers" "0.0.3" + "@near-js/transactions" "0.1.0" + "@near-js/types" "0.0.3" + "@near-js/utils" "0.0.3" + "@near-js/wallet-account" "0.0.3" + ajv "^8.11.2" + ajv-formats "^2.1.1" bn.js "5.2.1" borsh "^0.7.0" - bs58 "^4.0.0" depd "^2.0.0" error-polyfill "^0.1.3" http-errors "^1.7.2" - js-sha256 "^0.9.0" - mustache "^4.0.0" + near-abi "0.1.1" node-fetch "^2.6.1" - text-encoding-utf-8 "^1.0.2" tweetnacl "^1.0.1" near-hd-key@^1.2.1: From 199ec59f7cf43238337dfa4a7557341802a832af Mon Sep 17 00:00:00 2001 From: amirsaranBIH Date: Wed, 19 Apr 2023 13:47:51 +0200 Subject: [PATCH 16/19] Added necessary polyfills for angular build --- package.json | 3 +++ tsconfig.base.json | 9 +++++++++ yarn.lock | 40 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 51 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index cd931927e..69a9f6d98 100644 --- a/package.json +++ b/package.json @@ -101,6 +101,7 @@ "core-js": "^3.6.5", "crypto-browserify": "^3.12.0", "ethers": "^5.7.2", + "https-browserify": "^1.0.0", "is-mobile": "^3.1.1", "near-api-js": "^2.1.0", "near-seed-phrase": "^0.2.0", @@ -113,9 +114,11 @@ "regenerator-runtime": "0.13.11", "rxjs": "^7.8.0", "stream-browserify": "^3.0.0", + "stream-http": "^3.2.0", "tslib": "^2.3.0", "tweetnacl": "^1.0.3", "tweetnacl-util": "^0.15.1", + "url": "^0.11.0", "zone.js": "~0.11.4" }, "devDependencies": { diff --git a/tsconfig.base.json b/tsconfig.base.json index cd6aa7607..c43d8ae4f 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -103,6 +103,15 @@ ], "stream": [ "node_modules/stream-browserify" + ], + "https": [ + "node_modules/https-browserify" + ], + "http": [ + "node_modules/stream-http" + ], + "url": [ + "node_modules/url" ] } }, diff --git a/yarn.lock b/yarn.lock index 2234b733a..e7f7ff083 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6361,6 +6361,11 @@ builtin-modules@^3.0.0: resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + integrity sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ== + builtins@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9" @@ -9964,6 +9969,11 @@ http-signature@~1.3.6: jsprim "^2.0.2" sshpk "^1.14.1" +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + integrity sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg== + https-proxy-agent@5.0.1, https-proxy-agent@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" @@ -14205,6 +14215,11 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + integrity sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw== + punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -14269,6 +14284,11 @@ query-string@7.1.1, query-string@^7.1.1: split-on-first "^1.0.0" strict-uri-encode "^2.0.0" +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + integrity sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g== + queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -15503,6 +15523,16 @@ stream-combiner2@~1.1.1: duplexer2 "~0.1.0" readable-stream "^2.0.2" +stream-http@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-3.2.0.tgz#1872dfcf24cb15752677e40e5c3f9cc1926028b5" + integrity sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A== + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.4" + readable-stream "^3.6.0" + xtend "^4.0.2" + stream-shift@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" @@ -16440,6 +16470,14 @@ url-loader@^4.1.1: mime-types "^2.1.27" schema-utils "^3.0.0" +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + integrity sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ== + dependencies: + punycode "1.3.2" + querystring "0.2.0" + 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" @@ -17000,7 +17038,7 @@ xmlchars@^2.2.0: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== -xtend@~4.0.1: +xtend@^4.0.2, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== From 7f3eb6bcebac7f94503e80488043d6846a38339a Mon Sep 17 00:00:00 2001 From: amirsaranBIH Date: Wed, 19 Apr 2023 13:53:23 +0200 Subject: [PATCH 17/19] Removed duplicate tsconfig path --- tsconfig.base.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/tsconfig.base.json b/tsconfig.base.json index c43d8ae4f..2d38d6d09 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -92,9 +92,6 @@ "@near-wallet-selector/xdefi": [ "packages/xdefi/src/index.ts" ], - "@near-wallet-selector/opto-wallet": [ - "packages/opto-wallet/src/index.ts" - ], "@near-wallet-selector/finer-wallet": [ "packages/finer-wallet/src/index.ts" ], From a970b43ad5d918d8fa947bf8e4300aea081c59db Mon Sep 17 00:00:00 2001 From: amirsaranBIH Date: Wed, 19 Apr 2023 14:50:36 +0200 Subject: [PATCH 18/19] Updated near-api-js peerDependencies range and updated docs --- README.md | 2 +- packages/account-export/package.json | 2 +- packages/coin98-wallet/README.md | 2 +- packages/coin98-wallet/package.json | 2 +- packages/core/README.md | 2 +- packages/core/package.json | 2 +- packages/default-wallets/README.md | 2 +- packages/finer-wallet/package.json | 2 +- packages/here-wallet/README.md | 2 +- packages/here-wallet/package.json | 2 +- packages/ledger/README.md | 2 +- packages/ledger/package.json | 2 +- packages/math-wallet/README.md | 2 +- packages/math-wallet/package.json | 2 +- packages/meteor-wallet/README.md | 2 +- packages/meteor-wallet/package.json | 2 +- packages/my-near-wallet/README.md | 2 +- packages/my-near-wallet/package.json | 2 +- packages/near-snap/README.md | 2 +- packages/near-snap/package.json | 2 +- packages/near-wallet/package.json | 2 +- packages/nearfi/README.md | 2 +- packages/nearfi/package.json | 2 +- packages/neth/README.md | 2 +- packages/neth/package.json | 2 +- packages/nightly-connect/README.md | 2 +- packages/nightly-connect/package.json | 2 +- packages/nightly/README.md | 2 +- packages/nightly/package.json | 2 +- packages/opto-wallet/README.md | 2 +- packages/opto-wallet/package.json | 2 +- packages/sender/README.md | 2 +- packages/sender/package.json | 2 +- packages/wallet-connect/README.md | 2 +- packages/wallet-connect/package.json | 2 +- packages/wallet-utils/README.md | 2 +- packages/wallet-utils/package.json | 2 +- packages/welldone-wallet/README.md | 2 +- packages/welldone-wallet/package.json | 2 +- packages/xdefi/README.md | 6 +++--- packages/xdefi/package.json | 2 +- 41 files changed, 43 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 03b2c3a48..f96a09a93 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ NEAR Wallet Selector makes it easy for users to interact with your dApp by provi ## Installation and Usage -The easiest way to use NEAR Wallet Selector is to install the [`core`](https://www.npmjs.com/package/@near-wallet-selector/core) package from the NPM registry, some packages may require `near-api-js` v0.44.2 or above check them at [`packages`](./packages) +The easiest way to use NEAR Wallet Selector is to install the [`core`](https://www.npmjs.com/package/@near-wallet-selector/core) package from the NPM registry, some packages may require `near-api-js` v1.0.0 or above check them at [`packages`](./packages) ```bash # Using Yarn diff --git a/packages/account-export/package.json b/packages/account-export/package.json index 547fcaeef..9b9622277 100644 --- a/packages/account-export/package.json +++ b/packages/account-export/package.json @@ -21,6 +21,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/magin/packages/account-export", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/coin98-wallet/README.md b/packages/coin98-wallet/README.md index df7e13e1f..0e3205e02 100644 --- a/packages/coin98-wallet/README.md +++ b/packages/coin98-wallet/README.md @@ -4,7 +4,7 @@ Coin98 Wallet [Coin98 Wallet](https://chrome.google.com/webstore/detail/coin98-w ## Installation -This package requires `near-api-js` v0.44.2 or above: +This package requires `near-api-js` v1.0.0 or above: ```bash # Using Yarn diff --git a/packages/coin98-wallet/package.json b/packages/coin98-wallet/package.json index 9fe250df6..dae1067a0 100644 --- a/packages/coin98-wallet/package.json +++ b/packages/coin98-wallet/package.json @@ -22,6 +22,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/coin98-wallet", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/core/README.md b/packages/core/README.md index 4d1495311..d1bd75b15 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -4,7 +4,7 @@ This is the core package for NEAR Wallet Selector. ## Installation and Usage -The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v0.44.2 or above: +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: ```bash # Using Yarn diff --git a/packages/core/package.json b/packages/core/package.json index 6a9f7138e..e33280aac 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -20,6 +20,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/core", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/default-wallets/README.md b/packages/default-wallets/README.md index bed68ca09..9a599e691 100644 --- a/packages/default-wallets/README.md +++ b/packages/default-wallets/README.md @@ -8,7 +8,7 @@ This is the list of default wallets: ## Installation and Usage -The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v0.44.2 or above: +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: ```bash # Using Yarn diff --git a/packages/finer-wallet/package.json b/packages/finer-wallet/package.json index 02970f643..5b6dffe0b 100644 --- a/packages/finer-wallet/package.json +++ b/packages/finer-wallet/package.json @@ -23,6 +23,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/finer-wallet", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/here-wallet/README.md b/packages/here-wallet/README.md index 69e51957a..e8317c4de 100644 --- a/packages/here-wallet/README.md +++ b/packages/here-wallet/README.md @@ -4,7 +4,7 @@ This is the [Here Wallet](https://herewallet.app/) package for NEAR Wallet Selec ## Installation and Usage -The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v0.44.2 or above: +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: ```bash # Using Yarn diff --git a/packages/here-wallet/package.json b/packages/here-wallet/package.json index 6ee95469a..1e5722ad5 100644 --- a/packages/here-wallet/package.json +++ b/packages/here-wallet/package.json @@ -22,6 +22,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/here-wallet", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/ledger/README.md b/packages/ledger/README.md index c63d87c4a..5166a6b76 100644 --- a/packages/ledger/README.md +++ b/packages/ledger/README.md @@ -4,7 +4,7 @@ This is the [Ledger](https://www.ledger.com/) package for NEAR Wallet Selector. ## Installation and Usage -The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v0.44.2 or above: +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: ```bash # Using Yarn diff --git a/packages/ledger/package.json b/packages/ledger/package.json index f63c94d94..df0086899 100644 --- a/packages/ledger/package.json +++ b/packages/ledger/package.json @@ -22,6 +22,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/ledger", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/math-wallet/README.md b/packages/math-wallet/README.md index 8ce0f89f4..e1ca95f3d 100644 --- a/packages/math-wallet/README.md +++ b/packages/math-wallet/README.md @@ -4,7 +4,7 @@ This is the [Math Wallet](https://chrome.google.com/webstore/detail/math-wallet/ ## Installation and Usage -The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v0.44.2 or above: +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: ```bash # Using Yarn diff --git a/packages/math-wallet/package.json b/packages/math-wallet/package.json index cdfceee0c..0965710b9 100644 --- a/packages/math-wallet/package.json +++ b/packages/math-wallet/package.json @@ -22,6 +22,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/math-wallet", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/meteor-wallet/README.md b/packages/meteor-wallet/README.md index ba738377e..90e4eeb0b 100644 --- a/packages/meteor-wallet/README.md +++ b/packages/meteor-wallet/README.md @@ -4,7 +4,7 @@ This is the [Meteor Wallet](https://meteorwallet.app) package for NEAR Wallet Se ## Installation and Usage -The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v0.44.2 or above: +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: ```bash # Using Yarn diff --git a/packages/meteor-wallet/package.json b/packages/meteor-wallet/package.json index 6e2492d65..a3f1713bb 100644 --- a/packages/meteor-wallet/package.json +++ b/packages/meteor-wallet/package.json @@ -22,6 +22,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/meteor-wallet", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/my-near-wallet/README.md b/packages/my-near-wallet/README.md index f18cc3054..55f350ca3 100644 --- a/packages/my-near-wallet/README.md +++ b/packages/my-near-wallet/README.md @@ -4,7 +4,7 @@ This is the [My NEAR Wallet](https://mynearwallet.com/) package for NEAR Wallet ## Installation and Usage -The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v0.44.2 or above: +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: ```bash # Using Yarn diff --git a/packages/my-near-wallet/package.json b/packages/my-near-wallet/package.json index 74c85f366..5a56b2744 100644 --- a/packages/my-near-wallet/package.json +++ b/packages/my-near-wallet/package.json @@ -22,6 +22,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/my-near-wallet", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/near-snap/README.md b/packages/near-snap/README.md index 9daddea25..462896590 100644 --- a/packages/near-snap/README.md +++ b/packages/near-snap/README.md @@ -5,7 +5,7 @@ This package implement NEAR snap for NEAR Wallet Selector. ## Installation and Usage -The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v0.44.2 or above: +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: ```bash # Using Yarn diff --git a/packages/near-snap/package.json b/packages/near-snap/package.json index 203a43bb6..389f0eb71 100644 --- a/packages/near-snap/package.json +++ b/packages/near-snap/package.json @@ -24,6 +24,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/near-snap", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/near-wallet/package.json b/packages/near-wallet/package.json index d74cec904..80d7c7515 100644 --- a/packages/near-wallet/package.json +++ b/packages/near-wallet/package.json @@ -22,6 +22,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/near-wallet", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/nearfi/README.md b/packages/nearfi/README.md index 60ee968df..508a6752e 100644 --- a/packages/nearfi/README.md +++ b/packages/nearfi/README.md @@ -4,7 +4,7 @@ This is the [NearFi wallet](https://nearfi.finance) package for NEAR Wallet Sele ## Installation and Usage -The easiest way to use this package is to install it from the NPM registry, this package requires near-api-js v0.44.2 or above: +The easiest way to use this package is to install it from the NPM registry, this package requires near-api-js v1.0.0 or above: ```bash # Using Yarn diff --git a/packages/nearfi/package.json b/packages/nearfi/package.json index bc82a4222..1eacdbaa5 100644 --- a/packages/nearfi/package.json +++ b/packages/nearfi/package.json @@ -22,6 +22,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/nearfi", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/neth/README.md b/packages/neth/README.md index 0025566bd..d9cc3a2d6 100644 --- a/packages/neth/README.md +++ b/packages/neth/README.md @@ -4,7 +4,7 @@ This is the [NETH](https://neth.app) package for NEAR Wallet Selector. ## Installation and Usage -The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v0.44.2 or above: +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: ```bash # Using Yarn diff --git a/packages/neth/package.json b/packages/neth/package.json index a909d8c7d..4d5d4e94d 100644 --- a/packages/neth/package.json +++ b/packages/neth/package.json @@ -22,6 +22,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/neth", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/nightly-connect/README.md b/packages/nightly-connect/README.md index 8de5964a5..5352798dd 100644 --- a/packages/nightly-connect/README.md +++ b/packages/nightly-connect/README.md @@ -4,7 +4,7 @@ This is the [Nightly Connect](https://connect.nightly.app/) package for NEAR Wal ## Installation and Usage -The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v0.44.2 or above: +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: ```bash # Using Yarn diff --git a/packages/nightly-connect/package.json b/packages/nightly-connect/package.json index edf6d057c..3bdf0f024 100644 --- a/packages/nightly-connect/package.json +++ b/packages/nightly-connect/package.json @@ -22,6 +22,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/nightly-connect", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/nightly/README.md b/packages/nightly/README.md index 16a849554..ff3ca5af3 100644 --- a/packages/nightly/README.md +++ b/packages/nightly/README.md @@ -5,7 +5,7 @@ This is the [Nightly](https://wallet.nightly.app/) package for NEAR Wallet Selec ## Installation and Usage -The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v0.44.2 or above: +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: ```bash # Using Yarn diff --git a/packages/nightly/package.json b/packages/nightly/package.json index 3f09411ab..ffbf648eb 100644 --- a/packages/nightly/package.json +++ b/packages/nightly/package.json @@ -22,6 +22,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/nightly", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/opto-wallet/README.md b/packages/opto-wallet/README.md index 2c420b9fa..51ee48500 100644 --- a/packages/opto-wallet/README.md +++ b/packages/opto-wallet/README.md @@ -4,7 +4,7 @@ This is the [Opto Wallet](https://optowallet.com/) package for NEAR Wallet Selec ## Installation and Usage -The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v0.44.2 or above: +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: ```bash # Using Yarn diff --git a/packages/opto-wallet/package.json b/packages/opto-wallet/package.json index e807c0d8a..a6f60bee9 100644 --- a/packages/opto-wallet/package.json +++ b/packages/opto-wallet/package.json @@ -22,6 +22,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/opto-wallet", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/sender/README.md b/packages/sender/README.md index ef9ec8792..a342e680c 100644 --- a/packages/sender/README.md +++ b/packages/sender/README.md @@ -4,7 +4,7 @@ This is the [Sender](https://chrome.google.com/webstore/detail/sender-wallet/epa ## Installation and Usage -The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v0.44.2 or above: +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: ```bash # Using Yarn diff --git a/packages/sender/package.json b/packages/sender/package.json index 53270bd71..070acb72d 100644 --- a/packages/sender/package.json +++ b/packages/sender/package.json @@ -22,6 +22,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/sender", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/wallet-connect/README.md b/packages/wallet-connect/README.md index cddd71473..d9272c4eb 100644 --- a/packages/wallet-connect/README.md +++ b/packages/wallet-connect/README.md @@ -4,7 +4,7 @@ This is the [WalletConnect](https://walletconnect.com/) package for NEAR Wallet ## Installation and Usage -The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v0.44.2 or above: +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: ```bash # Using Yarn diff --git a/packages/wallet-connect/package.json b/packages/wallet-connect/package.json index 99d7af153..2de0588d4 100644 --- a/packages/wallet-connect/package.json +++ b/packages/wallet-connect/package.json @@ -22,6 +22,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/wallet-connect", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/wallet-utils/README.md b/packages/wallet-utils/README.md index 6d4f79b10..3ef495a89 100644 --- a/packages/wallet-utils/README.md +++ b/packages/wallet-utils/README.md @@ -4,7 +4,7 @@ This is the Wallet Utils package for NEAR Wallet Selector. ## Installation and Usage -The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v0.44.2 or above: +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: ```bash # Using Yarn diff --git a/packages/wallet-utils/package.json b/packages/wallet-utils/package.json index 96043f6f7..ba1bec65d 100644 --- a/packages/wallet-utils/package.json +++ b/packages/wallet-utils/package.json @@ -20,6 +20,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/wallet-utils", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/welldone-wallet/README.md b/packages/welldone-wallet/README.md index 214de9c65..b4ecfec0d 100644 --- a/packages/welldone-wallet/README.md +++ b/packages/welldone-wallet/README.md @@ -4,7 +4,7 @@ This is the [WELLDONE](https://chrome.google.com/webstore/detail/welldone-wallet ## Installation and Usage -The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v0.44.2 or above: +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: ```bash # Using Yarn diff --git a/packages/welldone-wallet/package.json b/packages/welldone-wallet/package.json index 854d5ccae..82c0f0ad9 100644 --- a/packages/welldone-wallet/package.json +++ b/packages/welldone-wallet/package.json @@ -22,6 +22,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/welldone-wallet", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } diff --git a/packages/xdefi/README.md b/packages/xdefi/README.md index 7afb51976..5b63f94c7 100644 --- a/packages/xdefi/README.md +++ b/packages/xdefi/README.md @@ -4,14 +4,14 @@ This is the [XDEFI](https://www.xdefi.io/) package for NEAR Wallet Selector. ## Installation and Usage -The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v0.44.2 or above: +The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above: ```bash # Using Yarn -yarn add near-api-js@^0.44.2 +yarn add near-api-js@^1.0.0 # Using NPM. -npm install near-api-js@^0.44.2 +npm install near-api-js@^1.0.0 ``` ```bash # Using Yarn diff --git a/packages/xdefi/package.json b/packages/xdefi/package.json index e6b8b344d..06472ed30 100644 --- a/packages/xdefi/package.json +++ b/packages/xdefi/package.json @@ -21,6 +21,6 @@ }, "homepage": "https://github.com/near/wallet-selector/tree/main/packages/xdefi", "peerDependencies": { - "near-api-js": "^0.44.2 || ^1.0.0" + "near-api-js": "^1.0.0 || ^2.0.0" } } From 1329d0f024a4dd5a5cc09477a67a5f4eaf1fc0eb Mon Sep 17 00:00:00 2001 From: DamirSQA Date: Wed, 19 Apr 2023 15:27:59 +0200 Subject: [PATCH 19/19] version bump to v8.8.0 --- package.json | 2 +- packages/account-export/package.json | 2 +- packages/coin98-wallet/package.json | 2 +- packages/core/package.json | 2 +- packages/default-wallets/package.json | 2 +- packages/finer-wallet/package.json | 2 +- packages/here-wallet/package.json | 2 +- packages/ledger/package.json | 2 +- packages/math-wallet/package.json | 2 +- packages/meteor-wallet/package.json | 2 +- packages/modal-ui-js/package.json | 2 +- packages/modal-ui/package.json | 2 +- packages/my-near-wallet/package.json | 2 +- packages/narwallets/package.json | 2 +- packages/near-snap/package.json | 2 +- packages/near-wallet/package.json | 2 +- packages/nearfi/package.json | 2 +- packages/neth/package.json | 2 +- packages/nightly-connect/package.json | 2 +- packages/nightly/package.json | 2 +- packages/opto-wallet/package.json | 2 +- packages/sender/package.json | 2 +- packages/wallet-connect/package.json | 2 +- packages/wallet-utils/package.json | 2 +- packages/welldone-wallet/package.json | 2 +- packages/xdefi/package.json | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 69a9f6d98..7bd508969 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "near-wallet-selector", - "version": "7.9.3", + "version": "8.0.0", "description": "NEAR Wallet Selector makes it easy for users to interact with your dApp by providing an abstraction over various wallets within the NEAR ecosystem", "keywords": [ "near", diff --git a/packages/account-export/package.json b/packages/account-export/package.json index 9b9622277..d43a496c4 100644 --- a/packages/account-export/package.json +++ b/packages/account-export/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/account-export", - "version": "7.9.3", + "version": "8.0.0", "description": "This is the Export Selector UI package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/coin98-wallet/package.json b/packages/coin98-wallet/package.json index dae1067a0..63af8384b 100644 --- a/packages/coin98-wallet/package.json +++ b/packages/coin98-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/coin98-wallet", - "version": "7.9.3", + "version": "8.0.0", "description": "Coin 98 wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/core/package.json b/packages/core/package.json index e33280aac..ee4dfa0e3 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/core", - "version": "7.9.3", + "version": "8.0.0", "description": "This is the core package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/default-wallets/package.json b/packages/default-wallets/package.json index fd6b2e8d4..753418eed 100644 --- a/packages/default-wallets/package.json +++ b/packages/default-wallets/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/default-wallets", - "version": "7.9.3", + "version": "8.0.0", "description": "Default wallets package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/finer-wallet/package.json b/packages/finer-wallet/package.json index 5b6dffe0b..867133fd5 100644 --- a/packages/finer-wallet/package.json +++ b/packages/finer-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/finer-wallet", - "version": "7.9.3", + "version": "8.0.0", "description": "FiNER Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/here-wallet/package.json b/packages/here-wallet/package.json index 1e5722ad5..789e194ee 100644 --- a/packages/here-wallet/package.json +++ b/packages/here-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/here-wallet", - "version": "7.9.3", + "version": "8.0.0", "description": "Here wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/ledger/package.json b/packages/ledger/package.json index df0086899..3366400e2 100644 --- a/packages/ledger/package.json +++ b/packages/ledger/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/ledger", - "version": "7.9.3", + "version": "8.0.0", "description": "Ledger package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/math-wallet/package.json b/packages/math-wallet/package.json index 0965710b9..2748e6521 100644 --- a/packages/math-wallet/package.json +++ b/packages/math-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/math-wallet", - "version": "7.9.3", + "version": "8.0.0", "description": "Math wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/meteor-wallet/package.json b/packages/meteor-wallet/package.json index a3f1713bb..74128ea3d 100644 --- a/packages/meteor-wallet/package.json +++ b/packages/meteor-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/meteor-wallet", - "version": "7.9.3", + "version": "8.0.0", "description": "Meteor wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/modal-ui-js/package.json b/packages/modal-ui-js/package.json index 436f4aacf..eca39e3be 100644 --- a/packages/modal-ui-js/package.json +++ b/packages/modal-ui-js/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/modal-ui-js", - "version": "7.9.3", + "version": "8.0.0", "description": "Modal UI package for NEAR wallet Selector", "keywords": [ "near", diff --git a/packages/modal-ui/package.json b/packages/modal-ui/package.json index f18d2f4d6..553bca64d 100644 --- a/packages/modal-ui/package.json +++ b/packages/modal-ui/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/modal-ui", - "version": "7.9.3", + "version": "8.0.0", "description": "Modal UI package for NEAR wallet Selector", "keywords": [ "near", diff --git a/packages/my-near-wallet/package.json b/packages/my-near-wallet/package.json index 5a56b2744..491fddbdb 100644 --- a/packages/my-near-wallet/package.json +++ b/packages/my-near-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/my-near-wallet", - "version": "7.9.3", + "version": "8.0.0", "description": "My Near Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/narwallets/package.json b/packages/narwallets/package.json index 57c901a44..0091d440a 100644 --- a/packages/narwallets/package.json +++ b/packages/narwallets/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/narwallets", - "version": "7.9.3", + "version": "8.0.0", "description": "This is the Narwallets package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/near-snap/package.json b/packages/near-snap/package.json index 389f0eb71..d83d7be0a 100644 --- a/packages/near-snap/package.json +++ b/packages/near-snap/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/near-snap", - "version": "7.9.3", + "version": "8.0.0", "description": "Metamask snap to interact with Near dapps.", "keywords": [ "near", diff --git a/packages/near-wallet/package.json b/packages/near-wallet/package.json index 80d7c7515..70b8e05ad 100644 --- a/packages/near-wallet/package.json +++ b/packages/near-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/near-wallet", - "version": "7.9.3", + "version": "8.0.0", "description": "Near Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/nearfi/package.json b/packages/nearfi/package.json index 1eacdbaa5..e2414acbc 100644 --- a/packages/nearfi/package.json +++ b/packages/nearfi/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nearfi", - "version": "7.9.3", + "version": "8.0.0", "description": "Nearfi package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/neth/package.json b/packages/neth/package.json index 4d5d4e94d..8151ffb66 100644 --- a/packages/neth/package.json +++ b/packages/neth/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/neth", - "version": "7.9.3", + "version": "8.0.0", "description": "Control NEAR accounts with ETH accounts", "author": "mattlockyer", "keywords": [ diff --git a/packages/nightly-connect/package.json b/packages/nightly-connect/package.json index 3bdf0f024..b85d9e5d1 100644 --- a/packages/nightly-connect/package.json +++ b/packages/nightly-connect/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nightly-connect", - "version": "7.9.3", + "version": "8.0.0", "description": "Nightly connect package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/nightly/package.json b/packages/nightly/package.json index ffbf648eb..e9dbccb82 100644 --- a/packages/nightly/package.json +++ b/packages/nightly/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nightly", - "version": "7.9.3", + "version": "8.0.0", "description": "Nightly wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/opto-wallet/package.json b/packages/opto-wallet/package.json index a6f60bee9..a99b76d9d 100644 --- a/packages/opto-wallet/package.json +++ b/packages/opto-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/opto-wallet", - "version": "7.9.3", + "version": "8.0.0", "description": "Opto wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/sender/package.json b/packages/sender/package.json index 070acb72d..f4c273dda 100644 --- a/packages/sender/package.json +++ b/packages/sender/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/sender", - "version": "7.9.3", + "version": "8.0.0", "description": "Sender wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/wallet-connect/package.json b/packages/wallet-connect/package.json index 2de0588d4..7ccd6c78a 100644 --- a/packages/wallet-connect/package.json +++ b/packages/wallet-connect/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/wallet-connect", - "version": "7.9.3", + "version": "8.0.0", "description": "Wallet Connect package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/wallet-utils/package.json b/packages/wallet-utils/package.json index ba1bec65d..e9bfd7754 100644 --- a/packages/wallet-utils/package.json +++ b/packages/wallet-utils/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/wallet-utils", - "version": "7.9.3", + "version": "8.0.0", "description": "Wallet utils package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/welldone-wallet/package.json b/packages/welldone-wallet/package.json index 82c0f0ad9..4cb635aa3 100644 --- a/packages/welldone-wallet/package.json +++ b/packages/welldone-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/welldone-wallet", - "version": "7.9.3", + "version": "8.0.0", "description": "Welldone wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/xdefi/package.json b/packages/xdefi/package.json index 06472ed30..1d99a9bab 100644 --- a/packages/xdefi/package.json +++ b/packages/xdefi/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/xdefi", - "version": "7.9.3", + "version": "8.0.0", "description": "This is the XDEFI package for NEAR Wallet Selector.", "keywords": [ "near",