Skip to content

Commit

Permalink
rm void, move inside
Browse files Browse the repository at this point in the history
  • Loading branch information
gbarkhatov committed Feb 14, 2025
1 parent c262a65 commit f581cba
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/app/context/wallet/BTCWalletProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ export const BTCWalletProvider = ({ children }: PropsWithChildren) => {
"Only Native SegWit and Taproot addresses are supported. Please switch the address type in your wallet and try again.";

try {
await walletProvider.connectWallet();

const address = await walletProvider.getAddress();
const supported = isSupportedAddressType(address);
if (!supported) {
Expand Down Expand Up @@ -156,10 +158,7 @@ export const BTCWalletProvider = ({ children }: PropsWithChildren) => {
useEffect(() => {
if (!btcWalletProvider) return;

const cb = async () => {
await btcWalletProvider.connectWallet();
void connectBTC(btcWalletProvider);
};
const cb = () => connectBTC(btcWalletProvider);

btcWalletProvider.on("accountChanged", cb);

Expand Down

0 comments on commit f581cba

Please sign in to comment.