show chain id

pull/4599/head^2
aniket-engg 9 months ago committed by Aniket
parent 6631beacb5
commit 532abddf8b
  1. 2
      apps/remix-ide/src/app/tabs/locales/en/udapp.json
  2. 5
      libs/remix-ui/run-tab/src/lib/components/instanceContainerUI.tsx

@ -72,7 +72,7 @@
"udapp.savedContracts": "Pinned Contracts",
"udapp.tooltipTextPinnedContracts": "List of pinned contracts for selected network",
"udapp.NoSavedInstanceText": "No contracts pinned yet. Pinned contracts stays after reloading Remix IDE.",
"udapp.NoSavedInstanceText": "No contracts pinned yet. Pinned contracts stay after reloading Remix IDE.",
"udapp.tooltipTextDelete": "Delete pinned contract",
"udapp.tooltipTextUnpin": "Unpin contract",
"udapp.savedOn": "Pinned On",

@ -8,6 +8,7 @@ import { UniversalDappUI } from './universalDappUI'
export function InstanceContainerUI(props: InstanceContainerProps) {
const { instanceList } = props.instances
const enableSave = useRef(false)
const chainId = useRef()
useEffect(() => {
const fetchSavedContracts = async () => {
@ -19,6 +20,7 @@ export function InstanceContainerUI(props: InstanceContainerProps) {
await props.plugin.call('udapp', 'clearAllSavedInstances')
const savedContracts = JSON.parse(allSavedContracts)
const { network } = await props.plugin.call('blockchain', 'getCurrentNetworkStatus')
chainId.current = network.id
if (savedContracts && savedContracts[network.id]) {
const instances = savedContracts[network.id]
for (const inst of instances)
@ -40,7 +42,8 @@ export function InstanceContainerUI(props: InstanceContainerProps) {
<div className="d-flex justify-content-between align-items-center pl-2">
<CustomTooltip placement="top-start" tooltipClasses="text-nowrap" tooltipId="deployAndRunPinnedContractsTooltip" tooltipText={<FormattedMessage id="udapp.tooltipTextPinnedContracts" />}>
<label className="udapp_deployedContracts">
<FormattedMessage id="udapp.savedContracts" />
<FormattedMessage id="udapp.savedContracts" />
<span style={{fontSize: '0.75rem'}}> (chain id: {chainId.current})</span>
</label>
</CustomTooltip>
</div>) : null }

Loading…
Cancel
Save