add connect button

This commit is contained in:
horsefacts
2024-11-25 14:32:49 -05:00
committed by lucas-neynar
parent 067c60ad2a
commit a8ba2397bd
2 changed files with 30 additions and 2 deletions

View File

@@ -41,7 +41,9 @@ export function frameConnector() {
async getAccounts() {
if (!connected) throw new Error("Not connected");
const provider = await this.getProvider();
const accounts = await provider.request({ method: "eth_accounts" });
const accounts = await provider.request({
method: "eth_requestAccounts",
});
return accounts.map((x) => getAddress(x));
},
async getChainId() {