Skip to content

Commit f1e3397

Browse files
handle withCapabilities option in conenct of burner.ts
1 parent bf2794b commit f1e3397

File tree

1 file changed

+5
-2
lines changed
  • packages/burner-connector/src/burnerConnector

1 file changed

+5
-2
lines changed

packages/burner-connector/src/burnerConnector/burner.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const burner = ({ useSessionStorage = false, rpcUrls = {} }: BurnerConfig
5656
id: burnerWalletId,
5757
name: burnerWalletName,
5858
type: burnerWalletId,
59-
async connect({ chainId } = {}) {
59+
async connect({ chainId, withCapabilities } = {}) {
6060
const provider = await this.getProvider();
6161
const accounts = await provider.request({
6262
method: "eth_accounts",
@@ -67,7 +67,10 @@ export const burner = ({ useSessionStorage = false, rpcUrls = {} }: BurnerConfig
6767
currentChainId = chain.id;
6868
}
6969
connected = true;
70-
return { accounts, chainId: currentChainId };
70+
return {
71+
accounts: (withCapabilities ? accounts.map((address) => ({ address, capabilities: {} })) : accounts) as never,
72+
chainId: currentChainId,
73+
};
7174
},
7275
async getProvider({ chainId } = {}) {
7376
const targetChainId = chainId || connectedChainId;

0 commit comments

Comments
 (0)