Skip to content

Commit

Permalink
pinned evm wallet (#620)
Browse files Browse the repository at this point in the history
Co-authored-by: naturexie <786281870@qq.com>
  • Loading branch information
xieqiancaosissi and naturexie authored Oct 11, 2024
1 parent 4bc83a8 commit 7fefbf4
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions src/context/WalletSelectorContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@ export const WalletSelectorContextProvider: React.FC<any> = ({ children }) => {
} as Network,
debug: false,
modules: [
setupEthereumWallets({
wagmiConfig,
web3Modal,
alwaysOnboardDuringSignIn: true,
} as any),
setupOKXWallet({}),
setupMyNearWallet({
// iconUrl: walletIcons['my-near-wallet'],
Expand Down Expand Up @@ -281,11 +286,6 @@ export const WalletSelectorContextProvider: React.FC<any> = ({ children }) => {
deprecated: false,
}),
setupCoin98Wallet(),
setupEthereumWallets({
wagmiConfig,
web3Modal,
alwaysOnboardDuringSignIn: true,
} as any),
],
});
const _modal = setupModal(_selector, {
Expand Down Expand Up @@ -367,13 +367,6 @@ export const WalletSelectorContextProvider: React.FC<any> = ({ children }) => {
const account = await near.account(accountId);

const allKeys = (await account.getAccessKeys()) as IAccountKey[];
const b = allKeys.find((b) => {
b.public_key == 'ed25519:4EEGqXX9Qu1tVmyc5T5QMw69WKDGdyjR8UGHYkmr6Vk2';
});
console.log('00000000-allKeys', JSON.stringify(allKeys));
if (b) {
debugger;
}
const isWalletMeta = allKeys.some((k) => {
if (k.access_key.permission === 'FullAccess') return false;
const meta = (
Expand All @@ -385,7 +378,6 @@ export const WalletSelectorContextProvider: React.FC<any> = ({ children }) => {
const isSelectLedger =
selector.store.getState().selectedWalletId === 'ledger';
setAllKeys(allKeys);
// setIsLedger(isSelectLedger || isWalletMeta);
setIsLedger(false);
};

Expand Down

0 comments on commit 7fefbf4

Please sign in to comment.