Skip to content

Commit 51a7fa1

Browse files
committed
lint fix and toaster
1 parent 3998441 commit 51a7fa1

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

libs/remix-ui/run-tab/src/lib/actions/account.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { custom, createWalletClient } from "viem"
88
import { sepolia } from "viem/chains"
99
import { entryPoint07Address } from "viem/account-abstraction"
1010
import { toAccount } from "viem/accounts"
11-
const { toSafeSmartAccount } = require("permissionless/accounts")
11+
const { toSafeSmartAccount } = require("permissionless/accounts") /* eslint-disable-line @typescript-eslint/no-var-requires */
1212

1313
export const updateAccountBalances = async (plugin: RunTab, dispatch: React.Dispatch<any>) => {
1414
const accounts = plugin.REACT_API.accounts.loadedAccounts
@@ -97,26 +97,27 @@ export const createSmartAccount = async (plugin: RunTab, dispatch: React.Dispatc
9797

9898
// @ts-ignore
9999
const [account] = await window.ethereum!.request({ method: 'eth_requestAccounts' })
100-
console.log('account---accounts->', account)
101-
100+
console.log('account---accounts->', account)
101+
102102
const walletClient = createWalletClient({
103103
account,
104104
chain: sepolia,
105105
transport: custom(window.ethereum!),
106106
})
107107

108108
const safeAccount = await toSafeSmartAccount({
109-
client: walletClient,
110-
entryPoint: {
111-
address: entryPoint07Address,
112-
version: "0.7",
113-
},
114-
owners: [toAccount(account)],
115-
// saltNonce: 0n, // optional
116-
version: "1.4.1"
109+
client: walletClient,
110+
entryPoint: {
111+
address: entryPoint07Address,
112+
version: "0.7",
113+
},
114+
owners: [toAccount(account)],
115+
// saltNonce: 0n, // optional
116+
version: "1.4.1"
117117
})
118118

119119
console.log('safeAccount----->', safeAccount.address)
120+
return plugin.call('notification', 'toast', `Safe account ${safeAccount.address} created for owner ${account}`)
120121
}
121122

122123
export const signMessageWithAddress = (plugin: RunTab, dispatch: React.Dispatch<any>, account: string, message: string, modalContent: (hash: string, data: string) => JSX.Element, passphrase?: string) => {

libs/remix-ui/run-tab/src/lib/components/account.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const _paq = window._paq = window._paq || []
1010

1111
export function AccountUI(props: AccountProps) {
1212
const { selectedAccount, loadedAccounts } = props.accounts
13-
const { selectExEnv, personalMode, networkName} = props
13+
const { selectExEnv, personalMode, networkName } = props
1414
const accounts = Object.keys(loadedAccounts)
1515
const [plusOpt, setPlusOpt] = useState({
1616
classList: '',

0 commit comments

Comments
 (0)