icon to create

aniket-engg 1 month ago committed by Aniket
parent 2b9a1e3fe2
commit b411171183
  1. 1
      apps/remix-dapp/src/locales/en/udapp.json
  2. 1
      apps/remix-ide/src/app/tabs/locales/en/udapp.json
  3. 18
      libs/remix-ui/run-tab/src/lib/components/account.tsx
  4. 1
      libs/remix-ui/run-tab/src/lib/components/settingsUI.tsx
  5. 3
      libs/remix-ui/run-tab/src/lib/types/index.ts

@ -61,6 +61,7 @@
"udapp.reset": "Reset",
"udapp.delete": "Delete",
"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).",
"udapp.createSmartAccount": "Create safe smart account",
"udapp.createNewAccount": "Create a new account",
"udapp.web3Title": "Creating an account is possible only in Personal mode. Please go to Settings to enable it.",
"udapp.defaultTitle": "Unfortunately it's not possible to create an account using an external wallet ({selectExEnv}).",

@ -61,6 +61,7 @@
"udapp.reset": "Reset",
"udapp.delete": "Delete",
"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).",
"udapp.createSmartAccount": "Create safe smart account",
"udapp.createNewAccount": "Create new account",
"udapp.web3Title": "Creating an account is possible only in Personal mode. Please go to Settings to enable it.",
"udapp.defaultTitle": "Unfortunately it's not possible to create an account using an external wallet ({selectExEnv}).",

@ -10,7 +10,7 @@ const _paq = window._paq = window._paq || []
export function AccountUI(props: AccountProps) {
const { selectedAccount, loadedAccounts } = props.accounts
const { selectExEnv, personalMode } = props
const { selectExEnv, personalMode, networkName} = props
const accounts = Object.keys(loadedAccounts)
const [plusOpt, setPlusOpt] = useState({
classList: '',
@ -29,10 +29,16 @@ export function AccountUI(props: AccountProps) {
useEffect(() => {
props.setAccount('')
if (selectExEnv && selectExEnv.startsWith('injected')) {
setPlusOpt({
classList: 'udapp_disableMouseEvents',
title: intl.formatMessage({ id: 'udapp.injectedTitle' })
})
if (networkName.includes('Sepolia')) {
setPlusOpt({
classList: '',
title: intl.formatMessage({ id: 'udapp.createSmartAccount' })
})
} else
setPlusOpt({
classList: 'udapp_disableMouseEvents',
title: intl.formatMessage({ id: 'udapp.injectedTitle' })
})
} else {
switch (selectExEnv) {
case 'vm-cancun':
@ -91,7 +97,7 @@ export function AccountUI(props: AccountProps) {
})
}
}
}, [selectExEnv, personalMode])
}, [selectExEnv, personalMode, networkName])
const newAccount = () => {
props.createNewBlockchainAccount(passphraseCreationPrompt())

@ -35,6 +35,7 @@ export function SettingsUI(props: SettingsProps) {
modal={props.modal}
signMessageWithAddress={props.signMessageWithAddress}
passphrase={props.passphrase}
networkName={props.networkName}
/>
<GasLimitUI gasLimit={props.gasLimit} setGasFee={props.setGasFee} />
<ValueUI setUnit={props.setUnit} sendValue={props.sendValue} sendUnit={props.sendUnit} setSendValue={props.setSendValue} />

@ -197,7 +197,8 @@ export interface AccountProps {
tooltip: (toasterMsg: string) => void,
modal: (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void, okBtnClass?: string, cancelBtnClass?: string) => void,
signMessageWithAddress: (account: string, message: string, modalContent: (hash: string, data: string) => JSX.Element, passphrase?: string) => void,
passphrase: string
passphrase: string,
networkName: string
}
export interface GasPriceProps {

Loading…
Cancel
Save