Skip to content

Commit

Permalink
Merge pull request #943 from near/dev
Browse files Browse the repository at this point in the history
v8.5.3 Release (dev -> main)
  • Loading branch information
erditkurteshiSQA authored Sep 25, 2023
2 parents 5de4d28 + ee7a187 commit 9b54af0
Show file tree
Hide file tree
Showing 59 changed files with 141 additions and 60 deletions.
1 change: 1 addition & 0 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ permissions:
actions: write
issues: write
pull-requests: write
contents: write

jobs:
release:
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ yarn add \
@near-wallet-selector/ledger \
@near-wallet-selector/wallet-connect \
@near-wallet-selector/nightly-connect \
@near-wallet-selector/default-wallets \
@near-wallet-selector/coin98-wallet \
@near-wallet-selector/opto-wallet \
@near-wallet-selector/neth \
Expand All @@ -90,7 +89,6 @@ npm install \
@near-wallet-selector/ledger \
@near-wallet-selector/wallet-connect \
@near-wallet-selector/nightly-connect \
@near-wallet-selector/default-wallets \
@near-wallet-selector/coin98-wallet \
@near-wallet-selector/opto-wallet \
@near-wallet-selector/neth \
Expand Down
1 change: 1 addition & 0 deletions examples/angular/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
},
"configurations": {
"production": {
"buildOptimizer": false,
"budgets": [
{
"type": "initial",
Expand Down
3 changes: 0 additions & 3 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
},
"test": {
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"]
},
"deploy": {
"dependsOn": ["^deploy"]
}
},
"generators": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "near-wallet-selector",
"version": "8.5.2",
"version": "8.5.3",
"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
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.2",
"version": "8.5.3",
"description": "This is the Export Selector UI package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
3 changes: 2 additions & 1 deletion packages/account-export/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
},
"dependsOn": ["^deploy"]
},
"test": {
"executor": "@nx/jest:jest",
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.2",
"version": "8.5.3",
"description": "Coin 98 wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
3 changes: 2 additions & 1 deletion packages/coin98-wallet/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
},
"dependsOn": ["^deploy"]
}
},
"tags": []
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.2",
"version": "8.5.3",
"description": "This is the core package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
3 changes: 2 additions & 1 deletion packages/core/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
},
"dependsOn": ["^deploy"]
}
},
"tags": []
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.2",
"version": "8.5.3",
"description": "Default wallets package for NEAR Wallet Selector.",
"keywords": [
"near",
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.2",
"version": "8.5.3",
"description": "FiNER Wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
3 changes: 2 additions & 1 deletion packages/finer-wallet/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
},
"dependsOn": ["^deploy"]
}
},
"tags": ["browser-wallet"]
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.2",
"version": "8.5.3",
"description": "Here wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
3 changes: 2 additions & 1 deletion packages/here-wallet/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
},
"dependsOn": ["^deploy"]
}
},
"tags": ["browser-wallet"]
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.2",
"version": "8.5.3",
"description": "Ledger package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
3 changes: 2 additions & 1 deletion packages/ledger/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
},
"dependsOn": ["^deploy"]
}
},
"tags": ["hardware-wallet"]
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.2",
"version": "8.5.3",
"description": "Math wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
3 changes: 2 additions & 1 deletion packages/math-wallet/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
},
"dependsOn": ["^deploy"]
}
},
"tags": ["injected-wallet"]
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.2",
"version": "8.5.3",
"description": "Meteor wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
3 changes: 2 additions & 1 deletion packages/meteor-wallet/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
},
"dependsOn": ["^deploy"]
}
},
"tags": ["injected-wallet"]
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.2",
"version": "8.5.3",
"description": "Modal UI package for NEAR wallet Selector",
"keywords": [
"near",
Expand Down
3 changes: 2 additions & 1 deletion packages/modal-ui-js/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
},
"dependsOn": ["^deploy"]
}
},
"tags": []
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.2",
"version": "8.5.3",
"description": "Modal UI package for NEAR wallet Selector",
"keywords": [
"near",
Expand Down
3 changes: 2 additions & 1 deletion packages/modal-ui/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
},
"dependsOn": ["^deploy"]
}
},
"tags": []
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.2",
"version": "8.5.3",
"description": "My Near Wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
3 changes: 2 additions & 1 deletion packages/my-near-wallet/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
},
"dependsOn": ["^deploy"]
}
},
"tags": ["browser-wallet"]
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.2",
"version": "8.5.3",
"description": "This is the Narwallets package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
3 changes: 2 additions & 1 deletion packages/narwallets/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
},
"dependsOn": ["^deploy"]
}
},
"tags": ["injected-wallet"]
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.2",
"version": "8.5.3",
"description": "Metamask snap to interact with Near dapps.",
"keywords": [
"near",
Expand Down
3 changes: 2 additions & 1 deletion packages/near-snap/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
},
"dependsOn": ["^deploy"]
}
},
"tags": ["injected-wallet"]
Expand Down
34 changes: 33 additions & 1 deletion packages/near-snap/src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,46 @@
import { isMobile } from "is-mobile";
import type { WalletModuleFactory } from "@near-wallet-selector/core";
import { initNearSnap } from "./selector";
import icon from "./icon";

export { icon };

declare global {
interface Window {
ethereum: {
chainId: string;
// eslint-disable-next-line
request: any;
};
}
}

const isInstalled = async (): Promise<boolean> => {
try {
const provider = window.ethereum;
const clientVersion = await provider?.request({
method: "web3_clientVersion",
});

const isFlaskDetected = (clientVersion as Array<string>)?.includes("flask");
return Boolean(provider && isFlaskDetected);
} catch {
return false;
}
};

export function setupNearSnap({
deprecated = false,
iconUrl = icon,
} = {}): WalletModuleFactory {
return async () => {
const mobile = isMobile();
if (mobile) {
return null;
}

const installed = await isInstalled();

return {
id: "near-snap",
type: "injected",
Expand All @@ -19,7 +51,7 @@ export function setupNearSnap({
downloadUrl: "https://near-snap.surge.sh",
iconUrl,
deprecated,
available: true,
available: installed,
},
};
};
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.2",
"version": "8.5.3",
"description": "Near Wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
3 changes: 2 additions & 1 deletion packages/near-wallet/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
},
"dependsOn": ["^deploy"]
}
},
"tags": ["browser-wallet"]
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.2",
"version": "8.5.3",
"description": "Nearfi package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
3 changes: 2 additions & 1 deletion packages/nearfi/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
},
"dependsOn": ["^deploy"]
}
},
"tags": ["injected-wallet"]
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.2",
"version": "8.5.3",
"description": "Control NEAR accounts with ETH accounts",
"author": "mattlockyer",
"keywords": [
Expand Down
Loading

0 comments on commit 9b54af0

Please sign in to comment.