11import {
22 Permission ,
3+ type AccountChangeEventHandler ,
34 type RequestFnCall ,
45 type RpcMessage ,
56 type RpcTypeToMessageMap ,
6- type AccountChangeEventHandler ,
77 type StarknetWindowObject ,
88 type TypedData ,
99} from "@starknet-io/types-js"
10+ import type { TRPCClientError } from "@trpc/client"
1011import {
11- Account ,
12+ WalletAccount ,
1213 type AccountInterface ,
1314 type ProviderInterface ,
1415 type ProviderOptions ,
@@ -27,15 +28,14 @@ import {
2728 type ConnectorIcons ,
2829} from "../connector"
2930import { DEFAULT_WEBWALLET_ICON , DEFAULT_WEBWALLET_URL } from "./constants"
31+ import { ConnectAndSignSessionError } from "./errors"
3032import { openWebwallet } from "./helpers/openWebwallet"
3133import { setPopupOptions } from "./helpers/trpc"
3234import {
3335 type Theme ,
3436 type WebWalletStarknetWindowObject ,
3537} from "./starknetWindowObject/argentStarknetWindowObject"
3638import type { ApprovalRequest } from "./starknetWindowObject/types"
37- import type { TRPCClientError } from "@trpc/client"
38- import { ConnectAndSignSessionError } from "./errors"
3939
4040let _wallet : StarknetWindowObject | null = null
4141let _address : string | null = null
@@ -239,7 +239,7 @@ export class WebWalletConnector extends Connector {
239239 throw new ConnectorNotConnectedError ( )
240240 }
241241
242- return new Account ( provider , _address , "" )
242+ return new WalletAccount ( provider , this . _wallet , undefined , _address )
243243 }
244244
245245 async chainId ( ) : Promise < bigint > {
@@ -290,5 +290,5 @@ export class WebWalletConnector extends Connector {
290290 }
291291}
292292
293- export type { WebWalletStarknetWindowObject , ApprovalRequest }
294293export { ConnectAndSignSessionError }
294+ export type { ApprovalRequest , WebWalletStarknetWindowObject }
0 commit comments