-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ditch support to mb wallet #541
Conversation
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🥳
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- A bunch of tests are deleted that shouldn't be.
- I propose removing the redundant "Bitte" from all the naming.
@@ -1,52 +0,0 @@ | |||
import { nearPrice } from './nearPrice'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleting a test seems unrelated and unwise.
@@ -72,15 +72,15 @@ the default way of interacting with Mintbase Wallet is using the MintbaseWalletC | |||
|
|||
```typescript | |||
import "@near-wallet-selector/modal-ui/styles.css"; | |||
import { MintbaseWalletContextProvider } from '@mintbase-js/react' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this should just be called WalletContextProvider
- independent of the name. If it were, then we wouldn't have had to change anything here.
@@ -6,8 +6,7 @@ | |||
"scripts": { | |||
"build": "tsc", | |||
"watch": "tsc && tsc --watch & jest --watch --coverage", | |||
"lint": "eslint . --fix --ext ts --ext tsx", | |||
"test": "jest --coverage" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why tho?
const setupBitteWallet = async (): Promise<WalletSelectorComponents> => { | ||
const isOnlyBitteWallet = !!onlyBitteWallet || !!(additionalWallets && additionalWallets.length > 0); | ||
|
||
return await setupBitteWalletSelector( | ||
callbackUrl, | ||
isOnlyMbWallet, | ||
isOnlyBitteWallet, | ||
selectedNetwork, | ||
selectedContract, | ||
isOnlyMbWallet ? { additionalWallets } : undefined, | ||
isOnlyBitteWallet ? { additionalWallets } : undefined, | ||
successUrl, failureUrl, | ||
); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could live without having the wallet name everywhere. Like why not just setupWallet
? People know its the bitte wallet from the import.
network?, | ||
contractAddress?, | ||
options?: { additionalWallets?: Array<WalletModuleFactory> }, | ||
successUrl?: string, | ||
failureUrl?: string, | ||
): Promise<WalletSelectorComponents> => { | ||
|
||
if (onlyMbWallet === false) { | ||
if (onlyBitteWallet === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to this Pr, but this entire if block is unnecessary and could probably be replaced with much more compact similar code as in react/WalletContext
@@ -1,201 +0,0 @@ | |||
import React, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no delete tests.
@@ -1,195 +0,0 @@ | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no delete tests.
This shouldn't have been merged. |
User description
Bitte Wallet will be the standard now.
PR Type
Enhancement, Tests
Description
onlyBitteWallet
property toBitteWalletContextProvider
and replaced all references fromonlyMbWallet
toonlyBitteWallet
.Changes walkthrough 📝
BitteWalletContext.tsx
Update BitteWallet context to replace Mintbase wallet references
packages/react/src/BitteWalletContext.tsx
onlyBitteWallet
property to context provider.onlyMbWallet
toonlyBitteWallet
.setupBitteWallet
.MintbaseWalletContext.tsx
Remove Mintbase wallet context implementation
packages/react/src/MintbaseWalletContext.tsx
index.ts
Remove MintbaseWalletContext export
packages/react/src/index.ts
bitte-wallet.ts
Update BitteWallet setup to replace Mintbase wallet references
packages/react/src/wallet/bitte-wallet.ts
onlyMbWallet
toonlyBitteWallet
.index.ts
Remove Mintbase wallet setup export
packages/wallet/src/index.ts
setupMintbaseWallet
.mintbase-wallet.ts
Remove Mintbase wallet implementation
packages/wallet/src/mintbase-wallet.ts
setup.ts
Remove Mintbase wallet setup function
packages/wallet/src/setup.ts
MintbaseWalletContext.test.tsx
Remove Mintbase wallet context tests
packages/react/src/MintbaseWalletContext.test.tsx