Skip to content

Commit

Permalink
Revert "fix: Fix trust wallet will get an incorrect account when mult…
Browse files Browse the repository at this point in the history
…iple acc…" (#248)

This reverts commit 82c5d18.
  • Loading branch information
wenty22 authored Dec 26, 2024
1 parent 82c5d18 commit 9d8e31f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
6 changes: 0 additions & 6 deletions .changeset/short-planes-care.md

This file was deleted.

2 changes: 0 additions & 2 deletions packages/walletkit/__dev__/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ function ConnectButton() {
const { publicKey, disconnect: solanaDisconnect } = useSolanaWallet();
const { address: tronAddress, disconnect: tronDisconnect } = useTronWallet();

console.log(address, '====');

return (
<>
<button
Expand Down
6 changes: 1 addition & 5 deletions packages/walletkit/src/evm/wallets/injected.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,7 @@ export function injected(parameters: InjectedParameters = {}) {
async getAccounts() {
const provider = await this.getProvider();
if (!provider) throw new ProviderNotFoundError();

const accounts = await provider.request({
method: this.id === 'trust' ? 'eth_requestAccounts' : 'eth_accounts',
});

const accounts = await provider.request({ method: 'eth_accounts' });
return accounts.map((x) => getAddress(x));
},
async getChainId() {
Expand Down

0 comments on commit 9d8e31f

Please sign in to comment.