From a02c39ac5164cf8904d77449a54706d8d60bc4d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 08:08:00 +0000 Subject: [PATCH 01/22] chore(deps): bump @nightlylabs/connect-near from 0.0.14 to 0.0.15 Bumps @nightlylabs/connect-near from 0.0.14 to 0.0.15. --- updated-dependencies: - dependency-name: "@nightlylabs/connect-near" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 44ce87214..e6641462e 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@ledgerhq/hw-transport-webhid": "6.27.1", "@metamask/detect-provider": "^2.0.0", "@meteorwallet/sdk": "^0.6.0", - "@nightlylabs/connect-near": "0.0.14", + "@nightlylabs/connect-near": "0.0.15", "@walletconnect/qrcode-modal": "2.0.0-alpha.20", "@walletconnect/sign-client": "2.1.4", "better-sqlite3": "^8.0.0", diff --git a/yarn.lock b/yarn.lock index ac336f18b..3f169c217 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2724,10 +2724,10 @@ resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-14.0.6.tgz#a48185b584a528a59ce82217830673268ceee8c2" integrity sha512-mSmLqzRKxQgGiOhvJ8guvRLjXoTL17cVSWlL/Cz+Q3xc1bXa7537ZXBTQTEuZVU2ytdkniKc8l1HqXIx0pFNVQ== -"@nightlylabs/connect-near@0.0.14": - version "0.0.14" - resolved "https://registry.yarnpkg.com/@nightlylabs/connect-near/-/connect-near-0.0.14.tgz#22e30834fb7e282ca30fe591a5cc945160ca3414" - integrity sha512-Dhk4bdLrwGkxe4cOninEx96AuyK58o+0ogLRHORggbyZ6Js2lit2I3TBiMpeiK/aRPWGCMmi+dqRabTqTjN0zA== +"@nightlylabs/connect-near@0.0.15": + version "0.0.15" + resolved "https://registry.yarnpkg.com/@nightlylabs/connect-near/-/connect-near-0.0.15.tgz#51fd0454dc78acbcd6e9c41cc96ee0108d2905c4" + integrity sha512-0YCfqtDsCQ5HM7DhXq75jd8Kg4P4IcoGQ4U5uCbUD9Ky0ToCHF7Z3Zk56Nx+tfiPgvK0UYVSGHDU8nv5aL/rBw== dependencies: "@nightlylabs/qr-code" "1.0.21" isomorphic-localstorage "0.0.8" From e4b5675b13fcca5caad9d98f4a162150cdc88bec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 08:09:13 +0000 Subject: [PATCH 02/22] chore(deps): bump better-sqlite3 from 8.0.0 to 8.0.1 Bumps [better-sqlite3](https://github.com/WiseLibs/better-sqlite3) from 8.0.0 to 8.0.1. - [Release notes](https://github.com/WiseLibs/better-sqlite3/releases) - [Commits](https://github.com/WiseLibs/better-sqlite3/compare/v8.0.0...v8.0.1) --- updated-dependencies: - dependency-name: better-sqlite3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 44ce87214..353b40f61 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "@nightlylabs/connect-near": "0.0.14", "@walletconnect/qrcode-modal": "2.0.0-alpha.20", "@walletconnect/sign-client": "2.1.4", - "better-sqlite3": "^8.0.0", + "better-sqlite3": "^8.0.1", "big.js": "^6.1.1", "bn.js": "^5.2.0", "bs58": "^5.0.0", diff --git a/yarn.lock b/yarn.lock index ac336f18b..8c2f26b05 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5799,10 +5799,10 @@ before-after-hook@^2.2.0: resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.2.tgz#a6e8ca41028d90ee2c24222f201c90956091613e" integrity sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ== -better-sqlite3@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/better-sqlite3/-/better-sqlite3-8.0.0.tgz#aa350edf5defccd726749b8139881e5918b098b6" - integrity sha512-DhIPmhV+F3NBb9oGCNqNON8Cg4nP3/7NOwx412SL6JJUclYjAKmqNtbL6xBfG2RcG0uZWUS/TEHRy4AFLeq5Zg== +better-sqlite3@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/better-sqlite3/-/better-sqlite3-8.0.1.tgz#3a596d21fbcefadf36f94e126c5cf24d5697d0b8" + integrity sha512-JhTZjpyapA1icCEjIZB4TSSgkGdFgpWZA2Wszg7Cf4JwJwKQmbvuNnJBeR+EYG/Z29OXvR4G//Rbg31BW/Z7Yg== dependencies: bindings "^1.5.0" prebuild-install "^7.1.0" From fee4a04d9501587616cc637894c9c9d1b4a1c15e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 08:09:42 +0000 Subject: [PATCH 03/22] chore(deps): bump rxjs from 7.6.0 to 7.8.0 Bumps [rxjs](https://github.com/reactivex/rxjs) from 7.6.0 to 7.8.0. - [Release notes](https://github.com/reactivex/rxjs/releases) - [Changelog](https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md) - [Commits](https://github.com/reactivex/rxjs/compare/7.6.0...7.8.0) --- updated-dependencies: - dependency-name: rxjs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 44ce87214..b892a6ccc 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "react-dom": "18.2.0", "react-qr-code": "^2.0.11", "regenerator-runtime": "0.13.11", - "rxjs": "^7.5.7", + "rxjs": "^7.8.0", "stream-browserify": "^3.0.0", "tslib": "^2.3.0", "tweetnacl": "^1.0.3", diff --git a/yarn.lock b/yarn.lock index ac336f18b..f26fe96d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14429,13 +14429,20 @@ rxjs@6, rxjs@6.6.7, rxjs@^6.5.4: dependencies: tslib "^1.9.0" -rxjs@7.6.0, rxjs@^7.5.1, rxjs@^7.5.5, rxjs@^7.5.7: +rxjs@7.6.0: version "7.6.0" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.6.0.tgz#361da5362b6ddaa691a2de0b4f2d32028f1eb5a2" integrity sha512-DDa7d8TFNUalGC9VqXvQ1euWNN7sc63TrUCuM9J998+ViviahMIjKSOU7rfcgFOF+FCD71BhDRv4hrFz+ImDLQ== dependencies: tslib "^2.1.0" +rxjs@^7.5.1, rxjs@^7.5.5, rxjs@^7.8.0: + version "7.8.0" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.0.tgz#90a938862a82888ff4c7359811a595e14e1e09a4" + integrity sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg== + dependencies: + tslib "^2.1.0" + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" From 62f5d9660a20326fe6fa478c19cc5e6c57f04ad1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 08:10:08 +0000 Subject: [PATCH 04/22] chore(deps-dev): bump gh-pages from 4.0.0 to 5.0.0 Bumps [gh-pages](https://github.com/tschaub/gh-pages) from 4.0.0 to 5.0.0. - [Release notes](https://github.com/tschaub/gh-pages/releases) - [Changelog](https://github.com/tschaub/gh-pages/blob/main/changelog.md) - [Commits](https://github.com/tschaub/gh-pages/compare/v4.0.0...v5.0.0) --- updated-dependencies: - dependency-name: gh-pages dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 44ce87214..c47d6f73b 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react": "7.30.1", "eslint-plugin-react-hooks": "4.6.0", - "gh-pages": "^4.0.0", + "gh-pages": "^5.0.0", "jest": "27.5.1", "jest-mock-extended": "^2.0.6", "jest-preset-angular": "^12.2.0", diff --git a/yarn.lock b/yarn.lock index ac336f18b..0d6839661 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5526,14 +5526,14 @@ astral-regex@^2.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== -async@^2.6.1, async@^2.6.2: +async@^2.6.2: version "2.6.4" resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== dependencies: lodash "^4.17.14" -async@^3.2.0, async@^3.2.3: +async@^3.2.0, async@^3.2.3, async@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== @@ -7688,10 +7688,10 @@ elliptic@6.5.4, elliptic@^6.5.3: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" -email-addresses@^3.0.1: - version "3.1.0" - resolved "https://registry.yarnpkg.com/email-addresses/-/email-addresses-3.1.0.tgz#cabf7e085cbdb63008a70319a74e6136188812fb" - integrity sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg== +email-addresses@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/email-addresses/-/email-addresses-5.0.0.tgz#7ae9e7f58eef7d5e3e2c2c2d3ea49b78dc854fa6" + integrity sha512-4OIPYlA6JXqtVn8zpHpGiI7vE6EQOAg16aGnDMIAlZVinnoZ8208tW1hAbjWydgN/4PLTT9q+O1K6AH/vALJGw== emittery@^0.8.1: version "0.8.1" @@ -9143,14 +9143,14 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -gh-pages@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-4.0.0.tgz#bd7447bab7eef008f677ac8cc4f6049ab978f4a6" - integrity sha512-p8S0T3aGJc68MtwOcZusul5qPSNZCalap3NWbhRUZYu1YOdp+EjZ+4kPmRM8h3NNRdqw00yuevRjlkuSzCn7iQ== +gh-pages@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-5.0.0.tgz#e0893272a0e33f0453e53a3c017c33b91ddd6394" + integrity sha512-Nqp1SjkPIB94Xw/3yYNTUL+G2dxlhjvv1zeN/4kMC1jfViTEqhtVz/Ba1zSXHuvXCN9ADNS1dN4r5/J/nZWEQQ== dependencies: - async "^2.6.1" + async "^3.2.4" commander "^2.18.0" - email-addresses "^3.0.1" + email-addresses "^5.0.0" filenamify "^4.3.0" find-cache-dir "^3.3.1" fs-extra "^8.1.0" From 1464b1b0fe4b36f409b2a45459e27a95cf93e660 Mon Sep 17 00:00:00 2001 From: Haris Valjevcic Date: Fri, 3 Feb 2023 11:41:53 +0100 Subject: [PATCH 05/22] Public key temp --- .../my-near-wallet/src/lib/my-near-wallet.ts | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/packages/my-near-wallet/src/lib/my-near-wallet.ts b/packages/my-near-wallet/src/lib/my-near-wallet.ts index 82bba0e0f..f4fed6e49 100644 --- a/packages/my-near-wallet/src/lib/my-near-wallet.ts +++ b/packages/my-near-wallet/src/lib/my-near-wallet.ts @@ -16,6 +16,7 @@ import type { } from "@near-wallet-selector/core"; import { createAction } from "@near-wallet-selector/wallet-utils"; import icon from "./icon"; +import edgeSSRLoader from "next/dist/build/webpack/loaders/next-edge-ssr-loader"; export interface MyNearWalletParams { walletUrl?: string; @@ -75,7 +76,6 @@ const MyNearWallet: WalletBehaviourFactory< { params: MyNearWalletExtraOptions } > = async ({ metadata, options, store, params, logger }) => { const _state = await setupWalletState(params, options.network); - const getAccounts = async (): Promise> => { const accountId = _state.wallet.getAccountId(); const account = _state.wallet.account(); @@ -83,18 +83,29 @@ const MyNearWallet: WalletBehaviourFactory< if (!accountId || !account) { return []; } - - return [ - { - accountId, - publicKey: ( - await account.connection.signer.getPublicKey( - account.accountId, - options.network.networkId - ) - ).toString(), - }, - ]; + const publicKeyTemp = await account.connection.signer.getPublicKey( + account.accountId, + options.network.networkId + ); + /* + let publicKeyTemp = ""; + try { + publicKeyTemp = await account.connection.signer + .getPublicKey(account.accountId, options.network.networkId) + .toString(); + } catch (e) { + console.warn(e); + }*/ + if (!publicKeyTemp) { + return []; + } else { + return [ + { + accountId, + publicKey: publicKeyTemp.toString(), + }, + ]; + } }; const transformTransactions = async ( From e8c43401eb0298fc029539721dc636ee6cd278e4 Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Thu, 2 Feb 2023 11:17:42 +0100 Subject: [PATCH 06/22] Removed setupMyNearWallet and setupLedger from default wallets list. --- packages/default-wallets/src/lib/default-wallets.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/default-wallets/src/lib/default-wallets.ts b/packages/default-wallets/src/lib/default-wallets.ts index 8b713e3f9..ad779c082 100644 --- a/packages/default-wallets/src/lib/default-wallets.ts +++ b/packages/default-wallets/src/lib/default-wallets.ts @@ -1,9 +1,7 @@ -import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet"; -import { setupLedger } from "@near-wallet-selector/ledger"; import type { WalletModuleFactory } from "@near-wallet-selector/core"; export const setupDefaultWallets = async (): Promise< Array > => { - return [setupMyNearWallet(), setupLedger()]; + return []; }; From 9e214cec5207b35885d97611fca35b53222ef13a Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Thu, 2 Feb 2023 11:23:33 +0100 Subject: [PATCH 07/22] Remove setupDefaultWallets from examples. --- .../wallet-selector-export/wallet-selector-export.component.ts | 2 -- .../src/app/pages/wallet-selector/wallet-selector.component.ts | 2 -- examples/react/contexts/WalletSelectorContext.tsx | 2 -- examples/react/contexts/WalletSelectorExportContext.tsx | 2 -- 4 files changed, 8 deletions(-) diff --git a/examples/angular/src/app/pages/wallet-selector-export/wallet-selector-export.component.ts b/examples/angular/src/app/pages/wallet-selector-export/wallet-selector-export.component.ts index b7471acdf..b5b27314f 100644 --- a/examples/angular/src/app/pages/wallet-selector-export/wallet-selector-export.component.ts +++ b/examples/angular/src/app/pages/wallet-selector-export/wallet-selector-export.component.ts @@ -2,7 +2,6 @@ import type { OnInit } from "@angular/core"; import type { AccountState, WalletSelector } from "@near-wallet-selector/core"; import { setupWalletSelector } from "@near-wallet-selector/core"; import type { WalletSelectorModal } from "@near-wallet-selector/account-export"; -import { setupDefaultWallets } from "@near-wallet-selector/default-wallets"; import { setupNearWallet } from "@near-wallet-selector/near-wallet"; import { setupSender } from "@near-wallet-selector/sender"; import { setupXDEFI } from "@near-wallet-selector/xdefi"; @@ -52,7 +51,6 @@ export class WalletSelectorExportComponent implements OnInit { network: "testnet", debug: true, modules: [ - ...(await setupDefaultWallets()), setupNearWallet(), setupSender(), setupXDEFI(), diff --git a/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts b/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts index 5f1aa2fa7..8d892a52e 100644 --- a/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts +++ b/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts @@ -3,7 +3,6 @@ import type { AccountState, WalletSelector } from "@near-wallet-selector/core"; import { setupWalletSelector } from "@near-wallet-selector/core"; import type { WalletSelectorModal } from "@near-wallet-selector/modal-ui-js"; import { setupModal } from "@near-wallet-selector/modal-ui-js"; -import { setupDefaultWallets } from "@near-wallet-selector/default-wallets"; import { setupNearWallet } from "@near-wallet-selector/near-wallet"; import { setupSender } from "@near-wallet-selector/sender"; import { setupXDEFI } from "@near-wallet-selector/xdefi"; @@ -53,7 +52,6 @@ export class WalletSelectorComponent implements OnInit { network: "testnet", debug: true, modules: [ - ...(await setupDefaultWallets()), setupNearWallet(), setupSender(), setupXDEFI(), diff --git a/examples/react/contexts/WalletSelectorContext.tsx b/examples/react/contexts/WalletSelectorContext.tsx index 81cd8180d..294c57615 100644 --- a/examples/react/contexts/WalletSelectorContext.tsx +++ b/examples/react/contexts/WalletSelectorContext.tsx @@ -1,7 +1,6 @@ import { setupCoin98Wallet } from "@near-wallet-selector/coin98-wallet"; import type { AccountState, WalletSelector } from "@near-wallet-selector/core"; import { setupWalletSelector } from "@near-wallet-selector/core"; -import { setupDefaultWallets } from "@near-wallet-selector/default-wallets"; import { setupHereWallet } from "@near-wallet-selector/here-wallet"; import { setupMathWallet } from "@near-wallet-selector/math-wallet"; import { setupMeteorWallet } from "@near-wallet-selector/meteor-wallet"; @@ -55,7 +54,6 @@ export const WalletSelectorContextProvider: React.FC<{ network: "testnet", debug: true, modules: [ - ...(await setupDefaultWallets()), setupNearWallet(), setupSender(), setupMathWallet(), diff --git a/examples/react/contexts/WalletSelectorExportContext.tsx b/examples/react/contexts/WalletSelectorExportContext.tsx index 84b41489e..23200a23b 100644 --- a/examples/react/contexts/WalletSelectorExportContext.tsx +++ b/examples/react/contexts/WalletSelectorExportContext.tsx @@ -5,7 +5,6 @@ import { setupWalletSelector } from "@near-wallet-selector/core"; import type { WalletSelector, AccountState } from "@near-wallet-selector/core"; import { setupExportSelectorModal } from "@near-wallet-selector/account-export"; import type { WalletSelectorModal } from "@near-wallet-selector/account-export"; -import { setupDefaultWallets } from "@near-wallet-selector/default-wallets"; import { setupNearWallet } from "@near-wallet-selector/near-wallet"; import { setupHereWallet } from "@near-wallet-selector/here-wallet"; import { setupSender } from "@near-wallet-selector/sender"; @@ -49,7 +48,6 @@ export const ExportAccountSelectorContextProvider: React.FC<{ network: "testnet", debug: true, modules: [ - ...(await setupDefaultWallets()), setupNearWallet(), setupSender(), setupMathWallet(), From a77c7cc6f92b19a3ff5780bbda7b2dcb24e517c5 Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Thu, 2 Feb 2023 11:27:03 +0100 Subject: [PATCH 08/22] Add setupMyNearWallet and setupLedger in examples. --- .../wallet-selector-export.component.ts | 4 ++++ .../app/pages/wallet-selector/wallet-selector.component.ts | 6 +++++- examples/react/contexts/WalletSelectorContext.tsx | 6 +++++- examples/react/contexts/WalletSelectorExportContext.tsx | 4 ++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/examples/angular/src/app/pages/wallet-selector-export/wallet-selector-export.component.ts b/examples/angular/src/app/pages/wallet-selector-export/wallet-selector-export.component.ts index b5b27314f..250088bb0 100644 --- a/examples/angular/src/app/pages/wallet-selector-export/wallet-selector-export.component.ts +++ b/examples/angular/src/app/pages/wallet-selector-export/wallet-selector-export.component.ts @@ -20,6 +20,8 @@ import { setupWalletConnect } from "@near-wallet-selector/wallet-connect"; import { setupNightlyConnect } from "@near-wallet-selector/nightly-connect"; import { Component } from "@angular/core"; import { setupExportSelectorModal } from "@near-wallet-selector/account-export"; +import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet"; +import { setupLedger } from "@near-wallet-selector/ledger"; declare global { interface Window { @@ -51,6 +53,8 @@ export class WalletSelectorExportComponent implements OnInit { network: "testnet", debug: true, modules: [ + setupMyNearWallet(), + setupLedger(), setupNearWallet(), setupSender(), setupXDEFI(), diff --git a/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts b/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts index 8d892a52e..c485a6e53 100644 --- a/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts +++ b/examples/angular/src/app/pages/wallet-selector/wallet-selector.component.ts @@ -19,8 +19,10 @@ import { setupOptoWallet } from "@near-wallet-selector/opto-wallet"; import { setupFinerWallet } from "@near-wallet-selector/finer-wallet"; import { setupWalletConnect } from "@near-wallet-selector/wallet-connect"; import { setupNightlyConnect } from "@near-wallet-selector/nightly-connect"; -import { CONTRACT_ID } from "../../../constants"; import { Component } from "@angular/core"; +import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet"; +import { setupLedger } from "@near-wallet-selector/ledger"; +import { CONTRACT_ID } from "../../../constants"; declare global { interface Window { @@ -52,6 +54,8 @@ export class WalletSelectorComponent implements OnInit { network: "testnet", debug: true, modules: [ + setupMyNearWallet(), + setupLedger(), setupNearWallet(), setupSender(), setupXDEFI(), diff --git a/examples/react/contexts/WalletSelectorContext.tsx b/examples/react/contexts/WalletSelectorContext.tsx index 294c57615..175af6628 100644 --- a/examples/react/contexts/WalletSelectorContext.tsx +++ b/examples/react/contexts/WalletSelectorContext.tsx @@ -22,8 +22,10 @@ import { distinctUntilChanged, map } from "rxjs"; import { setupNeth } from "@near-wallet-selector/neth"; import { setupOptoWallet } from "@near-wallet-selector/opto-wallet"; import { setupFinerWallet } from "@near-wallet-selector/finer-wallet"; -import { CONTRACT_ID } from "../constants"; import { Loading } from "../components/Loading"; +import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet"; +import { setupLedger } from "@near-wallet-selector/ledger"; +import { CONTRACT_ID } from "../constants"; declare global { interface Window { @@ -54,6 +56,8 @@ export const WalletSelectorContextProvider: React.FC<{ network: "testnet", debug: true, modules: [ + setupMyNearWallet(), + setupLedger(), setupNearWallet(), setupSender(), setupMathWallet(), diff --git a/examples/react/contexts/WalletSelectorExportContext.tsx b/examples/react/contexts/WalletSelectorExportContext.tsx index 23200a23b..e6479e722 100644 --- a/examples/react/contexts/WalletSelectorExportContext.tsx +++ b/examples/react/contexts/WalletSelectorExportContext.tsx @@ -18,6 +18,8 @@ import { setupWalletConnect } from "@near-wallet-selector/wallet-connect"; import { setupCoin98Wallet } from "@near-wallet-selector/coin98-wallet"; import { setupOptoWallet } from "@near-wallet-selector/opto-wallet"; import { Loading } from "../components/Loading"; +import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet"; +import { setupLedger } from "@near-wallet-selector/ledger"; declare global { interface Window { @@ -48,6 +50,8 @@ export const ExportAccountSelectorContextProvider: React.FC<{ network: "testnet", debug: true, modules: [ + setupMyNearWallet(), + setupLedger(), setupNearWallet(), setupSender(), setupMathWallet(), From 1d540cd5b99734a2a3acaa9d6f8ed7d596d67789 Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Thu, 2 Feb 2023 12:59:21 +0100 Subject: [PATCH 09/22] Updated readme docs of default wallets package. --- packages/default-wallets/README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/default-wallets/README.md b/packages/default-wallets/README.md index fdc72b24e..80efa3e6c 100644 --- a/packages/default-wallets/README.md +++ b/packages/default-wallets/README.md @@ -4,9 +4,7 @@ This is the Default Wallets package for NEAR Wallet Selector. This is the list of default wallets: -- [My NEAR Wallet](https://www.npmjs.com/package/@near-wallet-selector/my-near-wallet) - Browser wallet. -- [Ledger](https://www.npmjs.com/package/@near-wallet-selector/ledger) - Hardware wallet. - +>Note: This package will be deprecated and will not contain any wallets by default starting from next release (current version `v7.6.1`) ## Installation and Usage From 1683d59cafe35cee30713c9d76dc715b997585f7 Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Thu, 2 Feb 2023 13:02:55 +0100 Subject: [PATCH 10/22] Remove setupDefaultWallets reference from main readme. --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 6b61c8277..46d213f84 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,6 @@ import { setupWelldoneWallet } from "@near-wallet-selector/welldone-wallet"; import { setupLedger } from "@near-wallet-selector/ledger"; import { setupWalletConnect } from "@near-wallet-selector/wallet-connect"; import { setupNightlyConnect } from "@near-wallet-selector/nightly-connect"; -import { setupDefaultWallets } from "@near-wallet-selector/default-wallets"; import { setupNearFi } from "@near-wallet-selector/nearfi"; import { setupCoin98Wallet } from "@near-wallet-selector/coin98-wallet"; import { setupOptoWallet } from "@near-wallet-selector/opto-wallet"; @@ -133,7 +132,6 @@ import { setupXDEFI } from "@near-wallet-selector/xdefi"; const selector = await setupWalletSelector({ network: "testnet", modules: [ - ...(await setupDefaultWallets()), setupNearWallet(), setupMyNearWallet(), setupSender(), From eb0b3badac1d4adcc13a68e018745fe77550b254 Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Thu, 2 Feb 2023 13:14:44 +0100 Subject: [PATCH 11/22] Removed defualt wallet list criteria from contributing docs. --- CONTRIBUTING.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 37bd8ca15..c9c2cf40e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -166,8 +166,3 @@ Wallets shall checkbox a statement of compliance to be maintained on the wallet 41. Communication between infrastructure elements should be secured to the maximum extent possible. Please link to your the statement on your website or GitHub repo showing a statement of compliance. Please put link below (even if it is a placeholder). - - -# Default Wallet List Criteria: - -To be included in the default wallet list, a wallet project must have met the Wallet Product Criteria, the Wallet Security Criteria, and completed an audit. From 47e5948bd56dad755df2418246b5e779c7668fba Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Mon, 6 Feb 2023 09:23:19 +0100 Subject: [PATCH 12/22] Updated default-wallets readme. --- packages/default-wallets/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/default-wallets/README.md b/packages/default-wallets/README.md index 80efa3e6c..bed68ca09 100644 --- a/packages/default-wallets/README.md +++ b/packages/default-wallets/README.md @@ -4,7 +4,7 @@ This is the Default Wallets package for NEAR Wallet Selector. This is the list of default wallets: ->Note: This package will be deprecated and will not contain any wallets by default starting from next release (current version `v7.6.1`) +>**Note**: This package does not contain any wallets by default. ## Installation and Usage From 682b3e206d6210b02a7b5748151f549c448a189d Mon Sep 17 00:00:00 2001 From: Yoon-Suji Date: Mon, 6 Feb 2023 19:23:01 +0900 Subject: [PATCH 13/22] feat: add account-export for WELLDONE --- packages/welldone-wallet/src/lib/welldone.ts | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/packages/welldone-wallet/src/lib/welldone.ts b/packages/welldone-wallet/src/lib/welldone.ts index 9e8971cc8..9bcf62abc 100644 --- a/packages/welldone-wallet/src/lib/welldone.ts +++ b/packages/welldone-wallet/src/lib/welldone.ts @@ -329,6 +329,29 @@ const WelldoneWallet: WalletBehaviourFactory = async ({ return results; }, + + buildImportAccountsUrl() { + return `https://docs.welldonestudio.io/contribution/202211-batch-import`; + }, + + async importAccountsInSecureContext({ accounts }) { + if (!_state.wallet) { + throw new Error("Wallet is not installed"); + } + const params: Array = []; + // use batch import + accounts.forEach(({ privateKey }) => { + if (privateKey.slice(0, 8) === "ed25519:") { + params.push(privateKey.slice(8)); + } else { + params.push(privateKey); + } + }); + await _state.wallet.request("near", { + method: "experimental:near:importPrivatekey", + params: params, + }); + }, }; }; @@ -355,6 +378,7 @@ export function setupWelldoneWallet({ "https://chrome.google.com/webstore/detail/welldone-wallet/bmkakpenjmcpfhhjadflneinmhboecjf", deprecated, available: installed, + useUrlAccountImport: true, }, init: WelldoneWallet, }; From 5a6fcfb79dcea9fd03e7ae3f8e5351ec7178a56d Mon Sep 17 00:00:00 2001 From: Yoon-Suji Date: Tue, 7 Feb 2023 10:42:32 +0900 Subject: [PATCH 14/22] refactor: remove importAccountsInSecureContext in WELLDONE --- packages/welldone-wallet/src/lib/welldone.ts | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/packages/welldone-wallet/src/lib/welldone.ts b/packages/welldone-wallet/src/lib/welldone.ts index 9bcf62abc..017c6fd9f 100644 --- a/packages/welldone-wallet/src/lib/welldone.ts +++ b/packages/welldone-wallet/src/lib/welldone.ts @@ -333,25 +333,6 @@ const WelldoneWallet: WalletBehaviourFactory = async ({ buildImportAccountsUrl() { return `https://docs.welldonestudio.io/contribution/202211-batch-import`; }, - - async importAccountsInSecureContext({ accounts }) { - if (!_state.wallet) { - throw new Error("Wallet is not installed"); - } - const params: Array = []; - // use batch import - accounts.forEach(({ privateKey }) => { - if (privateKey.slice(0, 8) === "ed25519:") { - params.push(privateKey.slice(8)); - } else { - params.push(privateKey); - } - }); - await _state.wallet.request("near", { - method: "experimental:near:importPrivatekey", - params: params, - }); - }, }; }; From ce45d5fdd05115061e6e7c605257834eaa2e3a95 Mon Sep 17 00:00:00 2001 From: Haris Valjevcic Date: Tue, 7 Feb 2023 10:19:59 +0100 Subject: [PATCH 15/22] Added try/catch block for publicKey --- .../my-near-wallet/src/lib/my-near-wallet.ts | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/packages/my-near-wallet/src/lib/my-near-wallet.ts b/packages/my-near-wallet/src/lib/my-near-wallet.ts index f4fed6e49..9bb6051d9 100644 --- a/packages/my-near-wallet/src/lib/my-near-wallet.ts +++ b/packages/my-near-wallet/src/lib/my-near-wallet.ts @@ -16,7 +16,6 @@ import type { } from "@near-wallet-selector/core"; import { createAction } from "@near-wallet-selector/wallet-utils"; import icon from "./icon"; -import edgeSSRLoader from "next/dist/build/webpack/loaders/next-edge-ssr-loader"; export interface MyNearWalletParams { walletUrl?: string; @@ -83,26 +82,22 @@ const MyNearWallet: WalletBehaviourFactory< if (!accountId || !account) { return []; } - const publicKeyTemp = await account.connection.signer.getPublicKey( - account.accountId, - options.network.networkId - ); - /* - let publicKeyTemp = ""; try { - publicKeyTemp = await account.connection.signer - .getPublicKey(account.accountId, options.network.networkId) - .toString(); + const publicKey = await account.connection.signer.getPublicKey( + account.accountId, + options.network.networkId + ); + return [ + { + accountId, + publicKey: publicKey.toString(), + }, + ]; } catch (e) { - console.warn(e); - }*/ - if (!publicKeyTemp) { - return []; - } else { return [ { accountId, - publicKey: publicKeyTemp.toString(), + publicKey: undefined, }, ]; } From d56b7258c8f7aeb66514901d52c67d398ba47a37 Mon Sep 17 00:00:00 2001 From: Erdit Kurteshi Date: Thu, 2 Feb 2023 14:11:20 +0100 Subject: [PATCH 16/22] randomized wallet list --- packages/modal-ui/src/lib/components/WalletOptions.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/modal-ui/src/lib/components/WalletOptions.tsx b/packages/modal-ui/src/lib/components/WalletOptions.tsx index adf8b552f..163111a70 100644 --- a/packages/modal-ui/src/lib/components/WalletOptions.tsx +++ b/packages/modal-ui/src/lib/components/WalletOptions.tsx @@ -62,7 +62,7 @@ export const WalletOptions: React.FC = ({ setMoreModules(moreWallets); } - setModules(state.modules); + setModules(state.modules.sort(() => Math.random() - 0.5)); }); return () => subscription.unsubscribe(); // eslint-disable-next-line react-hooks/exhaustive-deps From 37cd2c3e3f09a84a37ea3d8951c1d97ae0373308 Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Fri, 3 Feb 2023 08:50:13 +0100 Subject: [PATCH 17/22] Randomize wallet list in modal-ui-js. --- packages/modal-ui-js/src/lib/modal.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/modal-ui-js/src/lib/modal.ts b/packages/modal-ui-js/src/lib/modal.ts index a5b85fed4..a5a9722b6 100644 --- a/packages/modal-ui-js/src/lib/modal.ts +++ b/packages/modal-ui-js/src/lib/modal.ts @@ -108,6 +108,7 @@ export const setupModal = ( renderModal(); const selectedWalletId = modalState.selector.store.getState().selectedWalletId; + modalState.modules = modalState.modules.sort(() => Math.random() - 0.5); if (selectedWalletId) { const module = modalState.modules.find( (m) => m.id === selectedWalletId From ead821ce59ebce22abc6c49bacdc0879371afe6b Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Mon, 6 Feb 2023 09:40:16 +0100 Subject: [PATCH 18/22] Randomize only the More section. --- packages/modal-ui-js/src/lib/modal.ts | 1 - packages/modal-ui-js/src/lib/render-modal.ts | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/modal-ui-js/src/lib/modal.ts b/packages/modal-ui-js/src/lib/modal.ts index a5a9722b6..a5b85fed4 100644 --- a/packages/modal-ui-js/src/lib/modal.ts +++ b/packages/modal-ui-js/src/lib/modal.ts @@ -108,7 +108,6 @@ export const setupModal = ( renderModal(); const selectedWalletId = modalState.selector.store.getState().selectedWalletId; - modalState.modules = modalState.modules.sort(() => Math.random() - 0.5); if (selectedWalletId) { const module = modalState.modules.find( (m) => m.id === selectedWalletId diff --git a/packages/modal-ui-js/src/lib/render-modal.ts b/packages/modal-ui-js/src/lib/render-modal.ts index 6a526203e..d9c3f0ff3 100644 --- a/packages/modal-ui-js/src/lib/render-modal.ts +++ b/packages/modal-ui-js/src/lib/render-modal.ts @@ -288,7 +288,10 @@ export function renderModal() { ` ); renderOptionsList(".recent-options-list-content", recentlySignedInWallets); - renderOptionsList(".more-options-list-content", moreWallets); + renderOptionsList( + ".more-options-list-content", + moreWallets.sort(() => Math.random() - 0.5) + ); } else { document .querySelector(".wallet-options-wrapper") From 5c55a0f1af9280ce0cbf77cbb0d88a6b11bb64af Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Tue, 7 Feb 2023 15:29:54 +0100 Subject: [PATCH 19/22] Added randomizeWalletOrder option in setupWalletSelector. --- packages/core/README.md | 1 + packages/core/docs/api/selector.md | 2 +- packages/core/src/lib/options.ts | 1 + packages/core/src/lib/options.types.ts | 1 + packages/core/src/lib/wallet-selector.types.ts | 1 + packages/modal-ui-js/src/lib/render-modal.ts | 13 +++++++++---- .../modal-ui/src/lib/components/WalletOptions.tsx | 7 +++++-- 7 files changed, 19 insertions(+), 7 deletions(-) diff --git a/packages/core/README.md b/packages/core/README.md index 611b7e9bf..ccdbe3114 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -45,6 +45,7 @@ const selector = await setupWalletSelector({ - `indexerUrl` (`string`): Custom URL for the Indexer service. - `debug` (`boolean?`): Enable internal logging for debugging purposes. Defaults to `false`. - `optimizeWalletOrder` (`boolean?`): Enable automatic wallet order. Reorders last signed in wallet on top, then installed wallets over not installed and deprecated wallets. +- `randomizeWalletOrder` (`boolean?`): Randomize wallets order in the `More` section of the UI. - `allowMultipleSelectors` (`boolean?`): Optionally allow creating new instances of wallet selector. - `storage` (`StorageService?`): Async storage implementation. Useful when [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) is unavailable. Defaults to `localStorage`. - `modules` (`Array`): List of wallets to support in your dApp. diff --git a/packages/core/docs/api/selector.md b/packages/core/docs/api/selector.md index 36cafa6f1..a00eff02c 100644 --- a/packages/core/docs/api/selector.md +++ b/packages/core/docs/api/selector.md @@ -11,7 +11,7 @@ - `explorerUrl` (`string`): URL for the NEAR explorer. - `debug` (`boolean`): Whether internal logging is enabled. - `optimizeWalletOrder` (`boolean`): Whether wallet order optimization is enabled. - +- `randomizeWalletOrder` (`boolean?`): Weather wallet order randomization is enabled. **Description** Resolved variation of the options passed to `setupWalletSelector`. diff --git a/packages/core/src/lib/options.ts b/packages/core/src/lib/options.ts index 84a51c250..ece946bc4 100644 --- a/packages/core/src/lib/options.ts +++ b/packages/core/src/lib/options.ts @@ -34,6 +34,7 @@ export const resolveOptions = (params: WalletSelectorParams) => { network: resolveNetwork(params.network), debug: params.debug || false, optimizeWalletOrder: params.optimizeWalletOrder === false ? false : true, + randomizeWalletOrder: params.randomizeWalletOrder || false, }; return { diff --git a/packages/core/src/lib/options.types.ts b/packages/core/src/lib/options.types.ts index 70385acf3..1f5e27efc 100644 --- a/packages/core/src/lib/options.types.ts +++ b/packages/core/src/lib/options.types.ts @@ -12,4 +12,5 @@ export interface Options { network: Network; debug: boolean; optimizeWalletOrder: boolean; + randomizeWalletOrder: boolean; } diff --git a/packages/core/src/lib/wallet-selector.types.ts b/packages/core/src/lib/wallet-selector.types.ts index ee84d3e72..a0a86daaf 100644 --- a/packages/core/src/lib/wallet-selector.types.ts +++ b/packages/core/src/lib/wallet-selector.types.ts @@ -14,6 +14,7 @@ export interface WalletSelectorParams { debug?: boolean; optimizeWalletOrder?: boolean; allowMultipleSelectors?: boolean; + randomizeWalletOrder?: boolean; } export type WalletSelectorStore = ReadOnlyStore; diff --git a/packages/modal-ui-js/src/lib/render-modal.ts b/packages/modal-ui-js/src/lib/render-modal.ts index d9c3f0ff3..95c063995 100644 --- a/packages/modal-ui-js/src/lib/render-modal.ts +++ b/packages/modal-ui-js/src/lib/render-modal.ts @@ -288,10 +288,15 @@ export function renderModal() { ` ); renderOptionsList(".recent-options-list-content", recentlySignedInWallets); - renderOptionsList( - ".more-options-list-content", - moreWallets.sort(() => Math.random() - 0.5) - ); + + if (modalState.selector.options.randomizeWalletOrder) { + renderOptionsList( + ".more-options-list-content", + moreWallets.sort(() => Math.random() - 0.5) + ); + } else { + renderOptionsList(".more-options-list-content", moreWallets); + } } else { document .querySelector(".wallet-options-wrapper") diff --git a/packages/modal-ui/src/lib/components/WalletOptions.tsx b/packages/modal-ui/src/lib/components/WalletOptions.tsx index 163111a70..e014713f5 100644 --- a/packages/modal-ui/src/lib/components/WalletOptions.tsx +++ b/packages/modal-ui/src/lib/components/WalletOptions.tsx @@ -61,8 +61,11 @@ export const WalletOptions: React.FC = ({ setRecentModules(recentlySignedInWallets); setMoreModules(moreWallets); } - - setModules(state.modules.sort(() => Math.random() - 0.5)); + if (selector.options.randomizeWalletOrder) { + setModules(state.modules.sort(() => Math.random() - 0.5)); + } else { + setModules(state.modules); + } }); return () => subscription.unsubscribe(); // eslint-disable-next-line react-hooks/exhaustive-deps From 97ba9315947ac71ea0ad6243f0ee26ed405ef1cf Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Tue, 7 Feb 2023 15:42:02 +0100 Subject: [PATCH 20/22] Fix docs. --- packages/core/docs/api/selector.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/docs/api/selector.md b/packages/core/docs/api/selector.md index a00eff02c..cd949211c 100644 --- a/packages/core/docs/api/selector.md +++ b/packages/core/docs/api/selector.md @@ -11,7 +11,7 @@ - `explorerUrl` (`string`): URL for the NEAR explorer. - `debug` (`boolean`): Whether internal logging is enabled. - `optimizeWalletOrder` (`boolean`): Whether wallet order optimization is enabled. -- `randomizeWalletOrder` (`boolean?`): Weather wallet order randomization is enabled. +- `randomizeWalletOrder` (`boolean`): Weather wallet order randomization is enabled. **Description** Resolved variation of the options passed to `setupWalletSelector`. From 63f0b99254bd0e60c82d469e82cfb32aa0852d8b Mon Sep 17 00:00:00 2001 From: Yoon-Suji Date: Thu, 9 Feb 2023 11:10:46 +0900 Subject: [PATCH 21/22] feat: support importAccountsInSecureContext for WELLDONE Wallet --- packages/welldone-wallet/src/lib/welldone.ts | 24 +++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/packages/welldone-wallet/src/lib/welldone.ts b/packages/welldone-wallet/src/lib/welldone.ts index 017c6fd9f..e0271a237 100644 --- a/packages/welldone-wallet/src/lib/welldone.ts +++ b/packages/welldone-wallet/src/lib/welldone.ts @@ -330,8 +330,27 @@ const WelldoneWallet: WalletBehaviourFactory = async ({ return results; }, - buildImportAccountsUrl() { - return `https://docs.welldonestudio.io/contribution/202211-batch-import`; + async importAccountsInSecureContext({ accounts }) { + if (!_state.wallet) { + throw new Error("Wallet is not installed"); + } + const privateKeys: Array = []; + // use batch import + accounts.forEach(({ privateKey }) => { + if (privateKey.slice(0, 8) === "ed25519:") { + privateKeys.push(privateKey.slice(8)); + } else { + privateKeys.push(privateKey); + } + }); + const params = { + privateKey: privateKeys, + network: options.network.networkId, + }; + await _state.wallet.request("near", { + method: "experimental:near:importPrivatekey", + params: [params], + }); }, }; }; @@ -359,7 +378,6 @@ export function setupWelldoneWallet({ "https://chrome.google.com/webstore/detail/welldone-wallet/bmkakpenjmcpfhhjadflneinmhboecjf", deprecated, available: installed, - useUrlAccountImport: true, }, init: WelldoneWallet, }; From 139e04235528c8d2b8c211fdb065e4634ff439a5 Mon Sep 17 00:00:00 2001 From: Kujtim Prenku Date: Thu, 9 Feb 2023 12:52:47 +0100 Subject: [PATCH 22/22] bump version to 7.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-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 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index ecc017571..f77999e34 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "near-wallet-selector", - "version": "7.7.0", + "version": "7.8.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 2773ecb56..d1b1309eb 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.7.0", + "version": "7.8.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 b79579aa3..97959b0d1 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.7.0", + "version": "7.8.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 28bdda2c4..55cc7ed0d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/core", - "version": "7.7.0", + "version": "7.8.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 6a2b5f362..267203e7d 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.7.0", + "version": "7.8.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 e697691b1..e8e60683f 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.7.0", + "version": "7.8.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 9ea2f25ba..c747c442d 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.7.0", + "version": "7.8.0", "description": "Here wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/ledger/package.json b/packages/ledger/package.json index 02b87f0c9..667f68b9e 100644 --- a/packages/ledger/package.json +++ b/packages/ledger/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/ledger", - "version": "7.7.0", + "version": "7.8.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 cdfd26edd..5f9846a58 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.7.0", + "version": "7.8.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 fa46b62a5..39c2d619c 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.7.0", + "version": "7.8.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 82a583fcd..17ccad889 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.7.0", + "version": "7.8.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 95185abe3..7abda7f22 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.7.0", + "version": "7.8.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 c715ea20b..6be52b14a 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.7.0", + "version": "7.8.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 bf9487f90..761f1fa46 100644 --- a/packages/narwallets/package.json +++ b/packages/narwallets/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/narwallets", - "version": "7.7.0", + "version": "7.8.0", "description": "This is the Narwallets package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/near-wallet/package.json b/packages/near-wallet/package.json index 86f685467..3f1c3f0ad 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.7.0", + "version": "7.8.0", "description": "Near Wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/nearfi/package.json b/packages/nearfi/package.json index badeedfb3..2de980fb1 100644 --- a/packages/nearfi/package.json +++ b/packages/nearfi/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nearfi", - "version": "7.7.0", + "version": "7.8.0", "description": "Nearfi package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/neth/package.json b/packages/neth/package.json index 1ec9d3ecf..452bfec90 100644 --- a/packages/neth/package.json +++ b/packages/neth/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/neth", - "version": "7.7.0", + "version": "7.8.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 0925a7b7b..f68a2a09c 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.7.0", + "version": "7.8.0", "description": "Nightly connect package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/nightly/package.json b/packages/nightly/package.json index 6b42107bc..c10bcbfe2 100644 --- a/packages/nightly/package.json +++ b/packages/nightly/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/nightly", - "version": "7.7.0", + "version": "7.8.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 0420d2936..2c406fbde 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.7.0", + "version": "7.8.0", "description": "Opto wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/sender/package.json b/packages/sender/package.json index f24e2217b..387fbd0e7 100644 --- a/packages/sender/package.json +++ b/packages/sender/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/sender", - "version": "7.7.0", + "version": "7.8.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 25ad21ed9..c76037e7b 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.7.0", + "version": "7.8.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 da7b7cf09..9ffa40456 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.7.0", + "version": "7.8.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 2a542e216..5cc509593 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.7.0", + "version": "7.8.0", "description": "Welldone wallet package for NEAR Wallet Selector.", "keywords": [ "near", diff --git a/packages/xdefi/package.json b/packages/xdefi/package.json index 9435290cb..335d42751 100644 --- a/packages/xdefi/package.json +++ b/packages/xdefi/package.json @@ -1,6 +1,6 @@ { "name": "@near-wallet-selector/xdefi", - "version": "7.7.0", + "version": "7.8.0", "description": "This is the XDEFI package for NEAR Wallet Selector.", "keywords": [ "near",