@@ -60,13 +60,9 @@ class AccountAbstractionProvider extends BaseProvider<AccountAbstractionProvider
6060 return this . _publicClient ;
6161 }
6262
63- public static getProviderInstance = async ( params : {
64- eoaProvider : IProvider ;
65- smartAccountInit : ISmartAccount ;
66- chainConfig : CustomChainConfig ;
67- bundlerConfig : BundlerConfig ;
68- paymasterConfig ?: PaymasterConfig ;
69- } ) : Promise < AccountAbstractionProvider > => {
63+ public static getProviderInstance = async (
64+ params : AccountAbstractionProviderConfig & { eoaProvider : IProvider }
65+ ) : Promise < AccountAbstractionProvider > => {
7066 const providerFactory = new AccountAbstractionProvider ( { config : params } ) ;
7167 await providerFactory . setupProvider ( params . eoaProvider ) ;
7268 providerFactory . update ( { eoaProvider : params . eoaProvider } ) ;
@@ -173,11 +169,13 @@ class AccountAbstractionProvider extends BaseProvider<AccountAbstractionProvider
173169
174170export const accountAbstractionProvider = async ( {
175171 accountAbstractionConfig,
176- chainConfig,
172+ getCurrentChain,
173+ getChain,
177174 provider,
178175} : {
179176 accountAbstractionConfig : AccountAbstractionConfig ;
180- chainConfig : CustomChainConfig ;
177+ getCurrentChain : ( ) => CustomChainConfig ;
178+ getChain : ( chainId : string ) => CustomChainConfig | undefined ;
181179 provider : IProvider ;
182180} ) => {
183181 let smartAccountInit : ISmartAccount ;
@@ -214,7 +212,8 @@ export const accountAbstractionProvider = async ({
214212 return AccountAbstractionProvider . getProviderInstance ( {
215213 eoaProvider : provider ,
216214 smartAccountInit,
217- chainConfig,
215+ getCurrentChain,
216+ getChain,
218217 bundlerConfig,
219218 paymasterConfig,
220219 } ) ;
0 commit comments