Skip to content

Commit

Permalink
create more than one
Browse files Browse the repository at this point in the history
  • Loading branch information
Aniket-Engg committed Jan 14, 2025
1 parent 82a95c1 commit 58466f4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion libs/remix-ui/run-tab/src/lib/actions/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,14 @@ export const createSmartAccount = async (plugin: RunTab, dispatch: React.Dispatc
transport: custom(window.ethereum!),
})

const salt = 0
let salt
const safeAddresses: string[] = Object.keys(plugin.REACT_API.smartAccounts)
if(safeAddresses.length) {
const lastSafeAddress: string = safeAddresses[safeAddresses.length - 1]
const lastSmartAccount: SmartAccount = plugin.REACT_API.smartAccounts[lastSafeAddress]
salt = lastSmartAccount.salt + 1
} else salt = 0

const safeAccount = await toSafeSmartAccount({
client: walletClient,
entryPoint: {
Expand Down

0 comments on commit 58466f4

Please sign in to comment.