Skip to content

Commit

Permalink
Merge pull request #1204 from near/dev
Browse files Browse the repository at this point in the history
v8.9.12 Release (dev → main)
  • Loading branch information
pivanov authored Sep 11, 2024
2 parents c083610 + 52b704c commit 1340183
Show file tree
Hide file tree
Showing 59 changed files with 1,146 additions and 256 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ yarn add \
@near-wallet-selector/ramper-wallet \
@near-wallet-selector/near-mobile-wallet \
@near-wallet-selector/bitget-wallet \
@near-wallet-selector/okx-wallet \
@near-wallet-selector/mintbase-wallet \
@near-wallet-selector/bitte-wallet \
@near-wallet-selector/ethereum-wallets
Expand Down Expand Up @@ -104,7 +103,6 @@ npm install \
@near-wallet-selector/ramper-wallet \
@near-wallet-selector/near-mobile-wallet \
@near-wallet-selector/bitget-wallet \
@near-wallet-selector/okx-wallet \
@near-wallet-selector/mintbase-wallet \
@near-wallet-selector/bitte-wallet \
@near-wallet-selector/ethereum-wallets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const projectId = "30147604c5f01d0bc4482ab0665b5697";
// TODO: Replace with the NEAR chain after the protocol upgrade.
const near: Chain = {
id: 398,
name: "NEAR wallet playground",
name: "NEAR Protocol Testnet",
nativeCurrency: {
decimals: 18,
name: "NEAR",
Expand Down Expand Up @@ -156,7 +156,7 @@ export class WalletSelectorComponent implements OnInit {
setupNearMobileWallet(),
setupMintbaseWallet({ contractId: CONTRACT_ID }),
setupBitteWallet({ contractId: CONTRACT_ID }),
setupEthereumWallets({ wagmiConfig, web3Modal, devMode: true }),
setupEthereumWallets({ wagmiConfig, web3Modal }),
],
});

Expand Down
4 changes: 2 additions & 2 deletions examples/react/contexts/WalletSelectorContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const projectId = "30147604c5f01d0bc4482ab0665b5697";
// TODO: Replace with the NEAR chain after the protocol upgrade.
const near: Chain = {
id: 398,
name: "NEAR wallet playground",
name: "NEAR Protocol Testnet",
nativeCurrency: {
decimals: 18,
name: "NEAR",
Expand Down Expand Up @@ -188,7 +188,7 @@ export const WalletSelectorContextProvider: React.FC<{
setupNearMobileWallet(),
setupMintbaseWallet({ contractId: CONTRACT_ID }),
setupBitteWallet({ contractId: CONTRACT_ID }),
setupEthereumWallets({ wagmiConfig, web3Modal, devMode: true }),
setupEthereumWallets({ wagmiConfig, web3Modal }),
],
});
const _modal = setupModal(_selector, {
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "near-wallet-selector",
"version": "8.9.12",
"version": "8.9.13",
"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 @@ -44,6 +44,7 @@
"scripts": {
"build:account-export": "nx run-many --target=build --projects=account-export --configuration=production",
"build:all": "nx run-many --target=build --all --exclude=react,angular --configuration=production && node ./scripts/update-package-json.js",
"build:arepa-wallet": "nx run-many --target=build --projects=arepa-wallet --configuration=production",
"build:bitget-wallet": "nx run-many --target=build --projects=bitget-wallet --configuration=production",
"build:core": "nx run-many --target=build --projects=core --configuration=production",
"build:here-wallet": "nx run-many --target=build --projects=here-wallet --configuration=production",
Expand Down Expand Up @@ -91,12 +92,12 @@
"@angular/platform-browser-dynamic": "16.1.9",
"@angular/router": "16.1.9",
"@here-wallet/core": "3.3.1",
"@jscutlery/semver": "5.2.2",
"@jscutlery/semver": "5.3.1",
"@ledgerhq/hw-transport": "6.30.3",
"@ledgerhq/hw-transport-webhid": "6.29.2",
"@metamask/detect-provider": "2.0.0",
"@meteorwallet/sdk": "1.0.9",
"@mintbase-js/wallet": "0.6.0-beta.10",
"@mintbase-js/wallet": "0.6.1",
"@near-snap/sdk": "0.6.0",
"@noble/ciphers": "0.5.3",
"@noble/hashes": "1.4.0",
Expand All @@ -106,7 +107,7 @@
"@walletconnect/modal": "2.6.2",
"@walletconnect/sign-client": "2.13.0",
"@web3modal/wagmi": "5.0.6",
"better-sqlite3": "11.1.2",
"better-sqlite3": "11.2.1",
"big.js": "6.2.1",
"borsh": "0.7.0",
"browserify-fs": "1.0.0",
Expand All @@ -122,15 +123,15 @@
"near-seed-phrase": "0.2.0",
"next": "13.3.0",
"ngx-deploy-npm": "7.1.0",
"qrcode": "1.5.3",
"qrcode": "1.5.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-qr-code": "2.0.15",
"regenerator-runtime": "0.14.1",
"rxjs": "7.8.1",
"stream-browserify": "3.0.0",
"stream-http": "3.2.0",
"tslib": "2.6.3",
"tslib": "2.7.0",
"url": "0.11.0",
"viem": "2.16.2",
"wagmi": "2.10.9",
Expand Down
7 changes: 5 additions & 2 deletions 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.9.12",
"version": "8.9.13",
"description": "This is the Export Selector UI package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand All @@ -19,5 +19,8 @@
"bugs": {
"url": "https://github.com/near/wallet-selector/issues"
},
"homepage": "https://github.com/near/wallet-selector/tree/magin/packages/account-export"
"homepage": "https://github.com/near/wallet-selector/tree/magin/packages/account-export",
"peerDependencies": {
"near-api-js": "4.0.3"
}
}
10 changes: 10 additions & 0 deletions packages/arepa-wallet/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"presets": [
[
"@nrwl/js/babel",
{
"useBuiltIns": "usage"
}
]
]
}
18 changes: 18 additions & 0 deletions packages/arepa-wallet/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
65 changes: 65 additions & 0 deletions packages/arepa-wallet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# @near-wallet-selector/my-near-wallet

This is the [Arepa Wallet](https://mi.arepa.digital/) 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` v1.0.0 or above:

```bash
# Using Yarn
yarn add near-api-js

# Using NPM.
npm install near-api-js
```
```bash
# Using Yarn
yarn add @near-wallet-selector/arepa-wallet

# Using NPM.
npm install @near-wallet-selector/arepa-wallet
```

Then use it in your dApp:

```ts
import { setupWalletSelector } from "@near-wallet-selector/core";
import { setupArepaWallet } from "@near-wallet-selector/arepa-wallet";

// My NEAR Wallet for Wallet Selector can be setup without any params or it can take few optional params, see options below.
const arepaWallet = setupArepaWallet({
walletUrl: "https://develop.globaldv.tech/wallet-arepa/",
iconUrl: "https://<Wallet Icon URL Here>" // optional
});

const selector = await setupWalletSelector({
network: "testnet",
modules: [arepaWallet],
});
```

## Options

- `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/arepa-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

Assets such as icons can be found in the `/assets` directory of the package. Below is an example using Webpack:

```ts
import { setupMyNearWallet } from "@near-wallet-selector/arepa-wallet";
import arepaWalletIconUrl from "@near-wallet-selector/arepa-wallet/assets/arepa-wallet-icon.png";

const arepaWallet = setupArepaWallet({
iconUrl: arepaWalletIconUrl
});
```

## License

This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions packages/arepa-wallet/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
displayName: "arepa-wallet",
preset: "../../jest.preset.js",
globals: {
"ts-jest": {
tsconfig: "<rootDir>/tsconfig.spec.json",
},
},
transform: {
"^.+\\.[tj]sx?$": "ts-jest",
},
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
coverageDirectory: "../../coverage/packages/arepa-wallet",
};
16 changes: 16 additions & 0 deletions packages/arepa-wallet/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* eslint-disable */
export default {
displayName: "arepa-wallet",
preset: "../../jest.preset.js",
globals: {},
transform: {
"^.+\\.[tj]s$": [
"ts-jest",
{
tsconfig: "<rootDir>/tsconfig.spec.json",
},
],
},
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
coverageDirectory: "../../coverage/packages/arepa-wallet",
};
27 changes: 27 additions & 0 deletions packages/arepa-wallet/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "@near-wallet-selector/arepa-wallet",
"version": "8.9.13",
"description": "Arepa Wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
"blockchain",
"wallets",
"dapps",
"near-protocol",
"near-blockchain",
"wallet selector",
"browser wallet",
"arepa Wallet"
],
"repository": {
"type": "git",
"url": "https://github.com/near/wallet-selector.git"
},
"bugs": {
"url": "https://github.com/near/wallet-selector/issues"
},
"homepage": "https://github.com/near/wallet-selector/tree/main/packages/arepa-wallet",
"peerDependencies": {
"near-api-js": "4.0.3"
}
}
56 changes: 56 additions & 0 deletions packages/arepa-wallet/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"name": "arepa-wallet",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/arepa-wallet/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nrwl/rollup:rollup",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/arepa-wallet",
"tsConfig": "packages/arepa-wallet/tsconfig.lib.json",
"project": "packages/arepa-wallet/package.json",
"entryFile": "packages/arepa-wallet/src/index.ts",
"buildableProjectDepsInPackageJsonType": "dependencies",
"compiler": "babel",
"format": ["esm", "cjs"],
"assets": [
{
"glob": "packages/arepa-wallet/README.md",
"input": ".",
"output": "."
},
{
"glob": "packages/arepa-wallet/assets/*",
"input": ".",
"output": "assets"
}
]
}
},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["packages/arepa-wallet/**/*.ts"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/packages/arepa-wallet"],
"options": {
"jestConfig": "packages/arepa-wallet/jest.config.ts",
"passWithNoTests": true
}
},
"deploy": {
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
},
"dependsOn": ["^deploy"]
}
},
"tags": ["browser-wallet"]
}
2 changes: 2 additions & 0 deletions packages/arepa-wallet/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { setupArepaWallet } from "./lib/arepa-wallet";
export type { ArepaWalletParams } from "./lib/arepa-wallet";
Loading

0 comments on commit 1340183

Please sign in to comment.