Skip to content

Commit

Permalink
Merge pull request #103 from lidofinance/feature/wallet-generator_bra…
Browse files Browse the repository at this point in the history
…ve_rm-wallets

Brave Wallet Adapter, generator for Wallet Adapters, remove some legacy
  • Loading branch information
alx-khramov authored Nov 20, 2023
2 parents 0b8ff93 + 84a5eaf commit 45a6a5a
Show file tree
Hide file tree
Showing 51 changed files with 1,275 additions and 614 deletions.
2 changes: 1 addition & 1 deletion apps/demo-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@lido-sdk/contracts": "^3.0.3",
"@lido-sdk/providers": "^1.4.13",
"@lido-sdk/react": "^2.0.2",
"@lidofinance/lido-ui": "^3.14.2",
"@lidofinance/lido-ui": "3.9.0",
"@reef-knot/web3-react": "^1.4.1",
"@typechain/ethers-v5": "^11.1.0",
"ethers": "^5.7.2",
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"test": "turbo run test",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"check-packages": "turbo run lint test --filter=./packages/*",
"release": "changeset publish"
"release": "changeset publish",
"new-wallet": "turbo gen wallet"
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
Expand All @@ -28,6 +29,7 @@
"@rollup/plugin-commonjs": "21.1.0",
"@rollup/plugin-json": "5.0.2",
"@rollup/plugin-node-resolve": "15.0.1",
"@turbo/gen": "^1.10.16",
"@types/react": "17.0.53",
"@types/react-dom": "17.0.18",
"@types/styled-components": "5.1.12",
Expand All @@ -54,7 +56,7 @@
"rollup-plugin-svg-import": "1.6.0",
"rollup-plugin-typescript2": "0.34.1",
"tslib": "2.5.0",
"turbo": "^1.10.14",
"turbo": "^1.10.16",
"typescript": "^4.9.5"
},
"dependencies": {},
Expand Down
6 changes: 6 additions & 0 deletions packages/connect-wallet-modal/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @reef-knot/connect-wallet-modal

## 1.9.0

### Minor Changes

- Remove Brave, Coin98, Opera, Gamestop wallets unneeded legacy code

## 1.8.3

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/connect-wallet-modal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reef-knot/connect-wallet-modal",
"version": "1.8.3",
"version": "1.9.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
Expand Down Expand Up @@ -49,8 +49,8 @@
"@reef-knot/types": "^1.3.0",
"@reef-knot/ui-react": "^1.0.7",
"@reef-knot/wallets-helpers": "^1.1.5",
"@reef-knot/wallets-icons": "^1.1.0",
"@reef-knot/web3-react": "^1.6.1",
"@reef-knot/wallets-icons": "^1.2.0",
"@reef-knot/web3-react": "^1.7.0",
"@reef-knot/ledger-connector": "^1.1.0",
"@types/ua-parser-js": "^0.7.36",
"eslint-config-custom": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ import { helpers } from '@reef-knot/web3-react';
import { useReefKnotContext } from '@reef-knot/core-react';
import { WalletAdapterData } from '@reef-knot/types';
import {
ConnectBraveWallet,
ConnectCoinbase,
ConnectGamestop,
ConnectImToken,
ConnectInjected,
ConnectLedger,
ConnectMathWallet,
ConnectMetamask,
ConnectOperaWallet,
ConnectTrust,
ConnectWC,
ConnectXdefi,
Expand All @@ -29,9 +26,6 @@ const walletsButtons: { [K in WalletId | string]: React.ComponentType } = {
[WALLET_IDS.TRUST]: ConnectTrust,
[WALLET_IDS.IM_TOKEN]: ConnectImToken,
[WALLET_IDS.MATH_WALLET]: ConnectMathWallet,
[WALLET_IDS.BRAVE]: ConnectBraveWallet,
[WALLET_IDS.OPERA]: ConnectOperaWallet,
[WALLET_IDS.GAMESTOP]: ConnectGamestop,
[WALLET_IDS.XDEFI]: ConnectXdefi,
};

Expand Down Expand Up @@ -83,10 +77,7 @@ function getWalletsButtons(
];

// Deprecated way of adding wallets with additional detection
addWalletTo(wallets, WALLET_IDS.BRAVE, helpers.isBraveWalletProvider());
addWalletTo(wallets, WALLET_IDS.OPERA, helpers.isOperaWalletProvider());
addWalletTo(wallets, WALLET_IDS.MATH_WALLET, helpers.isMathWalletProvider());
addWalletTo(wallets, WALLET_IDS.GAMESTOP, helpers.isGamestopProvider());
addWalletTo(wallets, WALLET_IDS.XDEFI, helpers.isXdefiProvider());

// Filtering wallets marked as hidden
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const ConnectMathWallet: FC<ConnectWalletProps> = (
const { hasConflicts, conflictingApps, conflictingAppsArray } =
checkConflicts([
CONFLICTS.Xdefi,
CONFLICTS.Gamestop,
CONFLICTS.Tally,
CONFLICTS.Exodus,
CONFLICTS.Trust,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const ConnectMetamask: FC<ConnectWalletProps> = (props: ConnectWalletProps) => {
const { hasConflicts, conflictingApps, conflictingAppsArray } =
checkConflicts([
CONFLICTS.Xdefi,
CONFLICTS.Gamestop,
CONFLICTS.Exodus,
CONFLICTS.Coin98,
CONFLICTS.MathWallet,
Expand Down

This file was deleted.

3 changes: 0 additions & 3 deletions packages/connect-wallet-modal/src/connectButtons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ export { default as ConnectLedger } from './connectLedger';
export { default as ConnectMetamask } from './connectMetamask';
export { default as ConnectTrust } from './connectTrust';
export { default as ConnectMathWallet } from './connectMathWallet';
export { default as ConnectBraveWallet } from './connectBraveWallet';
export { default as ConnectOperaWallet } from './connectOperaWallet';
export { default as ConnectGamestop } from './connectGamestop';
export { default as ConnectXdefi } from './connectXdefi';
export * from './ConnectInjected';
export * from './ConnectWC';
2 changes: 0 additions & 2 deletions packages/connect-wallet-modal/src/constants/conflictChecks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export type ConflictChecks = {
Exodus: ConflictCheck;
Coin98: ConflictCheck;
MathWallet: ConflictCheck;
Gamestop: ConflictCheck;
Coinbase: ConflictCheck;
Xdefi: ConflictCheck;
Trust: ConflictCheck;
Expand All @@ -18,7 +17,6 @@ export const CONFLICTS: ConflictChecks = {
Exodus: [helpers.isExodusProvider, 'Exodus'],
Coin98: [helpers.isCoin98Provider, 'Coin98'],
MathWallet: [helpers.isMathWalletProvider, 'MathWallet'],
Gamestop: [helpers.isGamestopProvider, 'GameStop'],
Coinbase: [helpers.isCoinbaseProvider, 'Coinbase'],
Xdefi: [helpers.isXdefiProvider, 'XDEFI'],
Trust: [helpers.isTrustProvider, 'Trust'],
Expand Down
3 changes: 0 additions & 3 deletions packages/connect-wallet-modal/src/constants/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ export const WALLET_IDS = {
IM_TOKEN: 'ImToken',
COIN98: 'Coin98',
MATH_WALLET: 'MathWallet',
BRAVE: 'Brave Wallet',
OPERA: 'Opera Wallet',
GAMESTOP: 'Gamestop',
XDEFI: 'Xdefi',
} as const;

Expand Down
Loading

0 comments on commit 45a6a5a

Please sign in to comment.