Skip to content

Commit 40ba8de

Browse files
committed
icon to create
1 parent 91044ee commit 40ba8de

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

apps/remix-dapp/src/locales/en/udapp.json

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"udapp.deleteVmStateDesc3": "Do you want to continue?",
5959
"udapp.delete": "Delete",
6060
"udapp.injectedTitle": "Unfortunately it's not possible to create an account using injected provider. Please create the account directly from your provider (i.e metamask or other of the same type).",
61+
"udapp.createSmartAccount": "Create safe smart account",
6162
"udapp.createNewAccount": "Create a new account",
6263
"udapp.web3Title": "Creating an account is possible only in Personal mode. Please go to Settings to enable it.",
6364
"udapp.defaultTitle": "Unfortunately it's not possible to create an account using an external wallet ({selectExEnv}).",

apps/remix-ide/src/app/tabs/locales/en/udapp.json

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"udapp.deleteVmStateDesc3": "Do you want to continue?",
5959
"udapp.delete": "Delete",
6060
"udapp.injectedTitle": "Unfortunately it's not possible to create an account using injected provider. Please create the account directly from your provider (i.e metamask or other of the same type).",
61+
"udapp.createSmartAccount": "Create safe smart account",
6162
"udapp.createNewAccount": "Create new account",
6263
"udapp.web3Title": "Creating an account is possible only in Personal mode. Please go to Settings to enable it.",
6364
"udapp.defaultTitle": "Unfortunately it's not possible to create an account using an external wallet ({selectExEnv}).",

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

+12-6
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 } = props
13+
const { selectExEnv, personalMode, networkName} = props
1414
const accounts = Object.keys(loadedAccounts)
1515
const [plusOpt, setPlusOpt] = useState({
1616
classList: '',
@@ -29,10 +29,16 @@ export function AccountUI(props: AccountProps) {
2929
useEffect(() => {
3030
props.setAccount('')
3131
if (selectExEnv && selectExEnv.startsWith('injected')) {
32-
setPlusOpt({
33-
classList: 'udapp_disableMouseEvents',
34-
title: intl.formatMessage({ id: 'udapp.injectedTitle' })
35-
})
32+
if (networkName.includes('Sepolia')) {
33+
setPlusOpt({
34+
classList: '',
35+
title: intl.formatMessage({ id: 'udapp.createSmartAccount' })
36+
})
37+
} else
38+
setPlusOpt({
39+
classList: 'udapp_disableMouseEvents',
40+
title: intl.formatMessage({ id: 'udapp.injectedTitle' })
41+
})
3642
} else {
3743
switch (selectExEnv) {
3844
case 'vm-cancun':
@@ -91,7 +97,7 @@ export function AccountUI(props: AccountProps) {
9197
})
9298
}
9399
}
94-
}, [selectExEnv, personalMode])
100+
}, [selectExEnv, personalMode, networkName])
95101

96102
const newAccount = () => {
97103
props.createNewBlockchainAccount(passphraseCreationPrompt())

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

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export function SettingsUI(props: SettingsProps) {
3535
modal={props.modal}
3636
signMessageWithAddress={props.signMessageWithAddress}
3737
passphrase={props.passphrase}
38+
networkName={props.networkName}
3839
/>
3940
<GasLimitUI gasLimit={props.gasLimit} setGasFee={props.setGasFee} />
4041
<ValueUI setUnit={props.setUnit} sendValue={props.sendValue} sendUnit={props.sendUnit} setSendValue={props.setSendValue} />

libs/remix-ui/run-tab/src/lib/types/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@ export interface AccountProps {
197197
tooltip: (toasterMsg: string) => void,
198198
modal: (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void, okBtnClass?: string, cancelBtnClass?: string) => void,
199199
signMessageWithAddress: (account: string, message: string, modalContent: (hash: string, data: string) => JSX.Element, passphrase?: string) => void,
200-
passphrase: string
200+
passphrase: string,
201+
networkName: string
201202
}
202203

203204
export interface GasPriceProps {

0 commit comments

Comments
 (0)