Skip to content

Commit

Permalink
Merge pull request #1014 from near/dev
Browse files Browse the repository at this point in the history
v8.8.0 Release (dev -> main)
  • Loading branch information
kujtimprenkuSQA authored Nov 20, 2023
2 parents 196f6b4 + 9db067e commit b8dd1cb
Show file tree
Hide file tree
Showing 44 changed files with 956 additions and 661 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ NEAR Wallet Selector makes it easy for users to interact with your dApp by provi
- [NearFi Wallet](https://www.npmjs.com/package/@near-wallet-selector/nearfi) - Mobile wallet.
- [Ramper Wallet](https://www.npmjs.com/package/@near-wallet-selector/ramper-wallet) - Browser wallet.
- [Near Mobile Wallet](https://nearmobile.app/) - Mobile Wallet.
- [Mintbase Wallet](https://www.npmjs.com/package/@near-wallet-selector/mintbase-wallet) - Browser wallet.

## Preview

Expand Down Expand Up @@ -69,7 +70,8 @@ yarn add \
@near-wallet-selector/neth \
@near-wallet-selector/xdefi \
@near-wallet-selector/ramper-wallet \
@near-wallet-selector/near-mobile-wallet
@near-wallet-selector/near-mobile-wallet \
@near-wallet-selector/mintbase-wallet

# Using NPM.
npm install \
Expand All @@ -90,7 +92,8 @@ npm install \
@near-wallet-selector/neth \
@near-wallet-selector/xdefi \
@near-wallet-selector/ramper-wallet \
@near-wallet-selector/near-mobile-wallet
@near-wallet-selector/near-mobile-wallet \
@near-wallet-selector/mintbase-wallet
```

Optionally, you can install our [`modal-ui`](https://www.npmjs.com/package/@near-wallet-selector/modal-ui) or [`modal-ui-js`](https://www.npmjs.com/package/@near-wallet-selector/modal-ui-js) package for a pre-built interface that wraps the `core` API and presents the supported wallets:
Expand Down Expand Up @@ -127,6 +130,7 @@ import { setupNeth } from "@near-wallet-selector/neth";
import { setupXDEFI } from "@near-wallet-selector/xdefi";
import { setupRamperWallet } from "@near-wallet-selector/ramper-wallet";
import { setupNearMobileWallet } from "@near-wallet-selector/near-mobile-wallet";
import { setupMintbaseWallet } from "@near-wallet-selector/mintbase-wallet";

const selector = await setupWalletSelector({
network: "testnet",
Expand Down Expand Up @@ -165,6 +169,12 @@ const selector = await setupWalletSelector({
},
}),
setupNearMobileWallet(),
setupMintbaseWallet({
networkId: "mainnet",
walletUrl: "https://wallet.mintbase.xyz",
callbackUrl: "https://www.mywebsite.com",
deprecated: false,
}),
],
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet";
import { setupRamperWallet } from "@near-wallet-selector/ramper-wallet";
import { setupNearMobileWallet } from "@near-wallet-selector/near-mobile-wallet";
import { setupLedger } from "@near-wallet-selector/ledger";
import { setupMintbaseWallet } from "@near-wallet-selector/mintbase-wallet";

declare global {
interface Window {
Expand Down Expand Up @@ -81,6 +82,7 @@ export class WalletSelectorExportComponent implements OnInit {
}),
setupRamperWallet(),
setupNearMobileWallet(),
setupMintbaseWallet(),
],
});
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet";
import { setupRamperWallet } from "@near-wallet-selector/ramper-wallet";
import { setupLedger } from "@near-wallet-selector/ledger";
import { setupNearMobileWallet } from "@near-wallet-selector/near-mobile-wallet";
import { setupMintbaseWallet } from "@near-wallet-selector/mintbase-wallet";
import { CONTRACT_ID } from "../../../constants";

declare global {
Expand Down Expand Up @@ -84,6 +85,7 @@ export class WalletSelectorComponent implements OnInit {
}),
setupRamperWallet(),
setupNearMobileWallet(),
setupMintbaseWallet(),
],
});

Expand Down
2 changes: 2 additions & 0 deletions examples/react/contexts/WalletSelectorContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { setupLedger } from "@near-wallet-selector/ledger";
import { setupXDEFI } from "@near-wallet-selector/xdefi";
import { setupRamperWallet } from "@near-wallet-selector/ramper-wallet";
import { setupNearMobileWallet } from "@near-wallet-selector/near-mobile-wallet";
import { setupMintbaseWallet } from "@near-wallet-selector/mintbase-wallet";

import type { ReactNode } from "react";
import React, {
Expand Down Expand Up @@ -95,6 +96,7 @@ export const WalletSelectorContextProvider: React.FC<{
},
}),
setupNearMobileWallet(),
setupMintbaseWallet(),
],
});
const _modal = setupModal(_selector, {
Expand Down
2 changes: 2 additions & 0 deletions examples/react/contexts/WalletSelectorExportContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet";
import { setupLedger } from "@near-wallet-selector/ledger";
import { setupRamperWallet } from "@near-wallet-selector/ramper-wallet";
import { setupNearMobileWallet } from "@near-wallet-selector/near-mobile-wallet";
import { setupMintbaseWallet } from "@near-wallet-selector/mintbase-wallet";

declare global {
interface Window {
Expand Down Expand Up @@ -69,6 +70,7 @@ export const ExportAccountSelectorContextProvider: React.FC<{
setupCoin98Wallet(),
setupNearFi(),
setupRamperWallet(),
setupMintbaseWallet(),
setupWalletConnect({
projectId: "c4f79cc...",
metadata: {
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "near-wallet-selector",
"version": "8.7.2",
"version": "8.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",
Expand All @@ -23,7 +23,8 @@
"welldone-wallet",
"finer-wallet",
"ramper-wallet",
"near-mobile-wallet"
"near-mobile-wallet",
"mintbase-wallet"
],
"homepage": "https://github.com/near/wallet-selector#README",
"bugs": {
Expand Down Expand Up @@ -64,6 +65,7 @@
"build:account-export": "nx run-many --target=build --projects=account-export --configuration=production",
"build:ramper-wallet": "nx run-many --target=build --projects=ramper-wallet --configuration=production",
"build:near-mobile-wallet": "nx run-many --target=build --projects=near-mobile-wallet --configuration=production",
"build:mintbase-wallet": "nx run-many --target=build --projects=mintbase-wallet --configuration=production",
"lint": "nx workspace-lint && nx run-many --target=lint --all --parallel",
"lint:fix": "nx run-many --target=lint --all --fix",
"serve:react": "nx serve react --host=0.0.0.0",
Expand All @@ -88,9 +90,10 @@
"@ledgerhq/hw-transport-webhid": "6.27.1",
"@metamask/detect-provider": "^2.0.0",
"@meteorwallet/sdk": "^0.8.0",
"@mintbase-js/wallet": "0.5.0-beta.6",
"@near-snap/sdk": "^0.6.0",
"@nightlylabs/connect-near": "0.0.15",
"@peersyst/near-mobile-signer": "1.0.9",
"@peersyst/near-mobile-signer": "^1.0.10",
"@ramper/near": "^0.0.30",
"@walletconnect/modal": "^2.6.2",
"@walletconnect/sign-client": "2.10.4",
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.7.2",
"version": "8.8.0",
"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.7.2",
"version": "8.8.0",
"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.7.2",
"version": "8.8.0",
"description": "This is the core 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.7.2",
"version": "8.8.0",
"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.7.2",
"version": "8.8.0",
"description": "Here wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
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.7.2",
"version": "8.8.0",
"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.7.2",
"version": "8.8.0",
"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.7.2",
"version": "8.8.0",
"description": "Meteor wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
Expand Down
10 changes: 10 additions & 0 deletions packages/mintbase-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/mintbase-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": {}
}
]
}
53 changes: 53 additions & 0 deletions packages/mintbase-wallet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# @near-wallet-selector/mintbase-wallet

This is the [Mintbase Wallet](https://wallet.mintbase.xyz) 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/mintbase-wallet

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

Then use it in your dApp:

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

const mintbaseWallet = setupMintbaseWallet({
networkId: 'mainnet',
walletUrl: 'https://wallet.mintbase.xyz',
callbackUrl: 'https://www.mywebsite.com',
deprecated: false,
});

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

## Options

- `networkId`: (`string?`): 'mainnet' or 'testnet' . Defaults to `mainnet`.
- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`.
- `callbackUrl`: (`string?`): Valid url to send your user after txn.
- `walletUrl`: (`string?`): wallet url: https://wallet.mintbase.xyz for mainnet and https://testnet.wallet.mintbase.xyz for testnet.


## License

This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
14 changes: 14 additions & 0 deletions packages/mintbase-wallet/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
displayName: "mintbase-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/mintbase-wallet",
};
16 changes: 16 additions & 0 deletions packages/mintbase-wallet/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* eslint-disable */
export default {
displayName: "mintbase-wallet",
preset: "../../jest.preset.js",
globals: {},
transform: {
"^.+\\.[tj]s$": [
"ts-jest",
{
tsconfig: "<rootDir>/tsconfig.spec.json",
},
],
},
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
coverageDirectory: "../../coverage/packages/mintbase-wallet",
};
27 changes: 27 additions & 0 deletions packages/mintbase-wallet/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "@near-wallet-selector/mintbase-wallet",
"version": "8.8.0",
"description": "Mintbase wallet package for NEAR Wallet Selector.",
"keywords": [
"near",
"blockchain",
"wallets",
"dapps",
"near-protocol",
"near-blockchain",
"wallet selector",
"browser wallet",
"mintbase 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/mintbase-wallet",
"peerDependencies": {
"near-api-js": "^1.0.0 || ^2.0.0"
}
}
Loading

0 comments on commit b8dd1cb

Please sign in to comment.