@@ -189,6 +189,7 @@ export const delegationAuthorization = async (contractAddress: string, plugin: R
189
189
}
190
190
191
191
export const createSmartAccount = async ( plugin : RunTab , dispatch : React . Dispatch < any > ) => {
192
+ plugin . call ( 'notification' , 'toast' , `Preparing tx to sign...` )
192
193
const { chainId } = plugin . REACT_API
193
194
const chain = chains [ aaSupportedNetworks [ chainId ] . name ]
194
195
const PUBLIC_NODE_URL = aaSupportedNetworks [ chainId ] . publicNodeUrl
@@ -254,6 +255,7 @@ export const createSmartAccount = async (plugin: RunTab, dispatch: React.Dispatc
254
255
value : 0
255
256
} ]
256
257
} )
258
+ plugin . call ( 'notification' , 'toast' , `Waiting for tx confirmation, can take 5-10 seconds...` )
257
259
await saClient . waitForUserOperationReceipt ( { hash : useropHash } )
258
260
259
261
// To verify creation, check if there is a contract code at this address
@@ -270,6 +272,7 @@ export const createSmartAccount = async (plugin: RunTab, dispatch: React.Dispatc
270
272
const smartAccountsObj = JSON . parse ( smartAccountsStr )
271
273
smartAccountsObj [ chainId ] = plugin . REACT_API . smartAccounts
272
274
localStorage . setItem ( aaLocalStorageKey , JSON . stringify ( smartAccountsObj ) )
275
+ await fillAccountsList ( plugin , dispatch )
273
276
_paq . push ( [ 'trackEvent' , 'udapp' , 'safeSmartAccount' , 'createdSuccessfully' ] )
274
277
return plugin . call ( 'notification' , 'toast' , `Safe account ${ safeAccount . address } created for owner ${ account } ` )
275
278
} catch ( error ) {
0 commit comments