Skip to content

Commit

Permalink
fix: await connectWallet for walletbutton (#1890)
Browse files Browse the repository at this point in the history
* await connectWallet and update connect prop type to promise

* chore: changset

* chore: changeset

* fix: changeset

---------

Co-authored-by: Magomed Khamidov <53529533+KosmosKey@users.noreply.github.com>
Co-authored-by: Daniel Sinclair <d@niel.nyc>
  • Loading branch information
3 people committed Mar 27, 2024
1 parent b25db9a commit b80e8fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-snakes-roll.md
@@ -0,0 +1,5 @@
---
"@rainbow-me/rainbowkit": patch
---

Improved the synchronous connection flow for the `WalletButton` and `WalletButton.Custom` components
Expand Up @@ -33,7 +33,7 @@ export interface WalletButtonRendererProps {
ready: boolean;
mounted: boolean;
connector: WalletConnector;
connect: () => void;
connect: () => Promise<void>;
}) => ReactNode;
}

Expand Down Expand Up @@ -142,7 +142,7 @@ export function WalletButtonRenderer({
return;
}

connectWallet();
await connectWallet();
},
})}
</>
Expand Down

0 comments on commit b80e8fa

Please sign in to comment.