Skip to content

Commit

Permalink
fix: bugfix for plugin wallet status bar chain state (#8880)
Browse files Browse the repository at this point in the history
  • Loading branch information
nuanyang233 committed Mar 3, 2023
1 parent 97be9b2 commit b919906
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Expand Up @@ -17,6 +17,7 @@ import {
useRecentTransactions,
useWallets,
useAccount,
useChainId,
} from '@masknet/web3-hooks-base'
import type { Web3Helper } from '@masknet/web3-helpers'
import { Icons } from '@masknet/icons'
Expand Down Expand Up @@ -76,6 +77,7 @@ export const PluginVerifiedWalletStatusBar = memo<PluginVerifiedWalletStatusBarP
const { classes, cx } = useStyles()

const account = useAccount()
const globalChainId = useChainId()
const { chainId } = useChainContext()
const allWallets = useWallets()

Expand Down Expand Up @@ -120,7 +122,7 @@ export const PluginVerifiedWalletStatusBar = memo<PluginVerifiedWalletStatusBarP
const defaultChainId = useDefaultChainId(defaultPluginId)

const providerDescriptor = useProviderDescriptor(defaultPluginId)
const networkDescriptor = useNetworkDescriptor(defaultPluginId, chainId)
const networkDescriptor = useNetworkDescriptor(defaultPluginId, !isNextIdWallet ? chainId : defaultChainId)

const pendingTransactions = useRecentTransactions(currentPluginID, TransactionStatusType.NOT_DEPEND)

Expand Down Expand Up @@ -174,7 +176,7 @@ export const PluginVerifiedWalletStatusBar = memo<PluginVerifiedWalletStatusBarP
onChangeWallet={openSelectProviderDialog}
selected={isSameAddress(descriptionProps.address, account)}
onSelect={onSelect}
expectedChainId={isSmartPay ? smartPaySupportChainId : chainId}
expectedChainId={isSmartPay ? smartPaySupportChainId : globalChainId}
/>
) : (
<MenuItem key="connect">
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-constants/evm/rpc.json
Expand Up @@ -38,8 +38,8 @@
"BSC": ["https://bsc-dataseed.binance.org/"],
"BSCT": ["https://data-seed-prebsc-1-s1.binance.org:8545/"],
"Matic": [
"https://polygon-mainnet.infura.io/v3/d65858b010d249419cf8687eca12b094",
"https://polygon-mainnet.infura.io/v3/d74bd8586b9e44449cef131d39ceeefb",
"https://polygon-mainnet.infura.io/v3/d65858b010d249419cf8687eca12b094",
"https://polygon-mainnet.infura.io/v3/a9d66980bf334e59a42ca19095f3daeb",
"https://polygon-mainnet.infura.io/v3/f39cc8734e294fba9c3938486df2b1bc",
"https://polygon-mainnet.infura.io/v3/659123dd11294baf8a294d7a11cec92c"
Expand Down

0 comments on commit b919906

Please sign in to comment.