Skip to content

Commit

Permalink
Merge pull request #911 from near/dev
Browse files Browse the repository at this point in the history
v8.5.2 Release (dev -> main)
  • Loading branch information
erditkurteshiSQA authored Sep 8, 2023
2 parents d2e0668 + 4bfd4f6 commit 9c4a181
Show file tree
Hide file tree
Showing 35 changed files with 282 additions and 258 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Git
run: |
git config user.name "GitHub Bot"
Expand Down Expand Up @@ -50,8 +52,11 @@ jobs:
- name: Run Build All
run: yarn build:all

# Use npx instead of yarn because yarn automatically sets NPM_* environment variables
# like NPM_CONFIG_REGISTRY so npm publish ends up ignoring the .npmrc file
# which is set up by `setup-node` action.
- name: Deploy
run: yarn nx run-many --target=deploy --all --exclude=$EXAMPLE_APPS --dry-run
run: npx nx run-many --target=deploy --all --noBuild --exclude=$EXAMPLE_APPS --dry-run
env:
EXAMPLE_APPS: ${{ env.EXAMPLE_APPS }}

Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ NEAR Wallet Selector makes it easy for users to interact with your dApp by provi
- [Here Wallet](https://www.npmjs.com/package/@near-wallet-selector/here-wallet) - Mobile wallet.
- [NearFi Wallet](https://www.npmjs.com/package/@near-wallet-selector/nearfi) - Mobile wallet.
- [Opto Wallet](https://www.npmjs.com/package/@near-wallet-selector/opto-wallet) - Mobile wallet & Browser wallet.
- [Finer Wallet](https://www.npmjs.com/package/@near-wallet-selector/finer-wallet) - Mobile wallet & Browser wallet.
- [Ramper Wallet](https://www.npmjs.com/package/@near-wallet-selector/ramper-wallet) - Browser wallet.

## Preview
Expand Down Expand Up @@ -71,7 +70,6 @@ yarn add \
@near-wallet-selector/default-wallets \
@near-wallet-selector/coin98-wallet \
@near-wallet-selector/opto-wallet \
@near-wallet-selector/finer-wallet \
@near-wallet-selector/neth \
@near-wallet-selector/xdefi \
@near-wallet-selector/ramper-wallet
Expand All @@ -95,7 +93,6 @@ npm install \
@near-wallet-selector/default-wallets \
@near-wallet-selector/coin98-wallet \
@near-wallet-selector/opto-wallet \
@near-wallet-selector/finer-wallet \
@near-wallet-selector/neth \
@near-wallet-selector/xdefi \
@near-wallet-selector/ramper-wallet
Expand Down Expand Up @@ -133,7 +130,6 @@ import { setupNightlyConnect } from "@near-wallet-selector/nightly-connect";
import { setupNearFi } from "@near-wallet-selector/nearfi";
import { setupCoin98Wallet } from "@near-wallet-selector/coin98-wallet";
import { setupOptoWallet } from "@near-wallet-selector/opto-wallet";
import { setupFinerWallet } from "@near-wallet-selector/finer-wallet";
import { setupNeth } from "@near-wallet-selector/neth";
import { setupXDEFI } from "@near-wallet-selector/xdefi";
import { setupRamperWallet } from "@near-wallet-selector/ramper-wallet";
Expand All @@ -155,7 +151,6 @@ const selector = await setupWalletSelector({
setupNearFi(),
setupCoin98Wallet(),
setupOptoWallet(),
setupFinerWallet(),
setupNeth(),
setupXDEFI(),
setupWalletConnect({
Expand Down
3 changes: 3 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
},
"test": {
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"]
},
"deploy": {
"dependsOn": ["^deploy"]
}
},
"generators": {
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "near-wallet-selector",
"version": "8.5.1",
"version": "8.5.2",
"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",
Expand Down Expand Up @@ -85,8 +85,8 @@
"@angular/platform-browser": "15.2.9",
"@angular/platform-browser-dynamic": "15.2.9",
"@angular/router": "15.2.9",
"@here-wallet/core": "^1.4.3",
"@jscutlery/semver": "^2.30.1",
"@here-wallet/core": "^1.5.1",
"@jscutlery/semver": "3.1.0",
"@ledgerhq/hw-transport": "6.27.1",
"@ledgerhq/hw-transport-webhid": "6.27.1",
"@metamask/detect-provider": "^2.0.0",
Expand All @@ -96,7 +96,7 @@
"@ramper/near": "^0.0.30",
"@walletconnect/modal": "^2.6.0",
"@walletconnect/sign-client": "2.9.1",
"better-sqlite3": "^8.4.0",
"better-sqlite3": "^8.5.2",
"big.js": "^6.1.1",
"bn.js": "^5.2.0",
"borsh": "^0.7.0",
Expand All @@ -116,8 +116,8 @@
"qrcode": "^1.5.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-qr-code": "^2.0.11",
"regenerator-runtime": "0.13.11",
"react-qr-code": "^2.0.12",
"regenerator-runtime": "0.14.0",
"rxjs": "^7.8.1",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
Expand Down Expand Up @@ -161,7 +161,7 @@
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "13.4.0",
"@testing-library/react-hooks": "^7.0.2",
"@types/big.js": "^6.1.6",
"@types/big.js": "^6.2.0",
"@types/bn.js": "^5.1.1",
"@types/gh-pages": "^3.2.1",
"@types/jest": "29.4.4",
Expand All @@ -177,7 +177,7 @@
"@typescript-eslint/parser": "5.58.0",
"babel-jest": "29.4.3",
"css-loader": "^6.4.0",
"cypress": "^9.1.0",
"cypress": "^12.2.0",
"eslint": "~8.15.0",
"eslint-config-next": "13.1.1",
"eslint-config-prettier": "8.1.0",
Expand All @@ -187,7 +187,7 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "7.31.11",
"eslint-plugin-react-hooks": "4.6.0",
"gh-pages": "^5.0.0",
"gh-pages": "^6.0.0",
"jest": "29.4.3",
"jest-environment-jsdom": "28.1.3",
"jest-mock-extended": "^2.0.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/account-export/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/account-export",
"version": "8.5.1",
"version": "8.5.2",
"description": "This is the Export Selector UI package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/coin98-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/coin98-wallet",
"version": "8.5.1",
"version": "8.5.2",
"description": "Coin 98 wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/core",
"version": "8.5.1",
"version": "8.5.2",
"description": "This is the core package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
19 changes: 14 additions & 5 deletions packages/core/src/lib/helpers/verify-signature/verify-signature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,23 @@ export const verifySignature = ({
recipient,
callbackUrl,
}: VerifySignatureParams) => {
// Reconstruct the payload that was **actually signed**
const payload = new Payload({ message, nonce, recipient, callbackUrl });

// Serialize payload based on payloadSchema
const borshPayload = serialize(payloadSchema, payload);
const sha = sha256(borshPayload);

// Hash the payload as in the NEP0413 referenced example
// https://github.com/near/NEPs/blob/master/neps/nep-0413.md#references
// https://github.com/gagdiez/near-login/blob/main/authenticate/wallet-authenticate.js#L21
const hashedPayload = Uint8Array.from(sha256.array(borshPayload));

// Convert real signature to buffer base64
const realSignature = Buffer.from(signature, "base64");
const pk = utils.PublicKey.from(publicKey);
return pk.verify(
new Uint8Array(Buffer.from(sha, "hex")),
Buffer.from(signature, "base64")
);

// Verify the signature
return pk.verify(hashedPayload, realSignature);
};

const fetchAllUserKeys = async ({
Expand Down
2 changes: 1 addition & 1 deletion packages/default-wallets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/default-wallets",
"version": "8.5.1",
"version": "8.5.2",
"description": "Default wallets package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/finer-wallet/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# @near-wallet-selector/finer-wallet

This is the [FiNER Wallet](https://finerwallet.io/) package for NEAR Wallet Selector.

#### ⚠️ FiNER Wallet has been marked as deprecated. ⚠️
## Installation and Usage

The easiest way to use this package is to install it from the NPM registry:
Expand Down
2 changes: 1 addition & 1 deletion packages/finer-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/finer-wallet",
"version": "8.5.1",
"version": "8.5.2",
"description": "FiNER Wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/here-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/here-wallet",
"version": "8.5.1",
"version": "8.5.2",
"description": "Here wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
14 changes: 3 additions & 11 deletions packages/here-wallet/src/lib/selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,9 @@ import type BN from "bn.js";

import type { SelectorInit } from "./types";

// @ts-ignore
export const initHereWallet: SelectorInit = async (config) => {
const {
store,
logger,
emitter,
options,
defaultProvider,
defaultStrategy,
metadata,
} = config;
const { store, logger, emitter, options, defaultProvider, defaultStrategy } =
config;

const here = new HereWallet({
networkId: options.network.networkId as NetworkId,
Expand Down Expand Up @@ -127,7 +119,7 @@ export const initHereWallet: SelectorInit = async (config) => {

async signMessage(data) {
logger.log("HereWallet:signMessage", data);
throw new Error(`Method not supported by ${metadata.name}`);
return await here.signMessage(data);
},

async signAndSendTransactions(data) {
Expand Down
2 changes: 1 addition & 1 deletion packages/here-wallet/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
} from "@near-wallet-selector/core";

export type HereWallet = InjectedWallet &
Omit<Omit<HereWalletProtocol, "getAccounts">, "signIn">;
Omit<Omit<Omit<HereWalletProtocol, "getAccounts">, "signIn">, "signMessage">;

export type SelectorInit = WalletBehaviourFactory<
HereWallet,
Expand Down
2 changes: 1 addition & 1 deletion packages/ledger/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/ledger",
"version": "8.5.1",
"version": "8.5.2",
"description": "Ledger package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/math-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/math-wallet",
"version": "8.5.1",
"version": "8.5.2",
"description": "Math wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/meteor-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/meteor-wallet",
"version": "8.5.1",
"version": "8.5.2",
"description": "Meteor wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/modal-ui-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/modal-ui-js",
"version": "8.5.1",
"version": "8.5.2",
"description": "Modal UI package for NEAR wallet Selector",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/modal-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/modal-ui",
"version": "8.5.1",
"version": "8.5.2",
"description": "Modal UI package for NEAR wallet Selector",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/my-near-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/my-near-wallet",
"version": "8.5.1",
"version": "8.5.2",
"description": "My Near Wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/narwallets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/narwallets",
"version": "8.5.1",
"version": "8.5.2",
"description": "This is the Narwallets package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/near-snap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/near-snap",
"version": "8.5.1",
"version": "8.5.2",
"description": "Metamask snap to interact with Near dapps.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/near-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/near-wallet",
"version": "8.5.1",
"version": "8.5.2",
"description": "Near Wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/nearfi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/nearfi",
"version": "8.5.1",
"version": "8.5.2",
"description": "Nearfi package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/neth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/neth",
"version": "8.5.1",
"version": "8.5.2",
"description": "Control NEAR accounts with ETH accounts",
"author": "mattlockyer",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/nightly-connect/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/nightly-connect",
"version": "8.5.1",
"version": "8.5.2",
"description": "Nightly connect package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/nightly/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/nightly",
"version": "8.5.1",
"version": "8.5.2",
"description": "Nightly wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/opto-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/opto-wallet",
"version": "8.5.1",
"version": "8.5.2",
"description": "Opto wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/ramper-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/ramper-wallet",
"version": "8.5.1",
"version": "8.5.2",
"description": "Ramper wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/sender/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/sender",
"version": "8.5.1",
"version": "8.5.2",
"description": "Sender wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-connect/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@near-wallet-selector/wallet-connect",
"version": "8.5.1",
"version": "8.5.2",
"description": "Wallet Connect package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
Loading

0 comments on commit 9c4a181

Please sign in to comment.