add dapp-draft icon in deployed contract

pull/4608/head
drafish 8 months ago committed by yann300
parent b24ba89180
commit d270726ff5
  1. 4
      libs/remix-ui/run-tab/src/lib/components/instanceContainerUI.tsx
  2. 3
      libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx
  3. 4
      libs/remix-ui/run-tab/src/lib/run-tab.tsx
  4. 4
      libs/remix-ui/run-tab/src/lib/types/index.ts

@ -94,6 +94,8 @@ export function InstanceContainerUI(props: InstanceContainerProps) {
sendValue={props.sendValue} sendValue={props.sendValue}
getFuncABIInputs={props.getFuncABIInputs} getFuncABIInputs={props.getFuncABIInputs}
plugin={props.plugin} plugin={props.plugin}
exEnvironment={props.exEnvironment}
editInstance={props.editInstance}
/> />
) )
})} })}
@ -141,6 +143,8 @@ export function InstanceContainerUI(props: InstanceContainerProps) {
sendValue={props.sendValue} sendValue={props.sendValue}
getFuncABIInputs={props.getFuncABIInputs} getFuncABIInputs={props.getFuncABIInputs}
plugin={props.plugin} plugin={props.plugin}
exEnvironment={props.exEnvironment}
editInstance={props.editInstance}
/> />
) )
})} })}

@ -294,10 +294,11 @@ export function UniversalDappUI(props: UdappProps) {
</div> </div>
<div className="udapp_cActionsWrapper" data-id="universalDappUiContractActionWrapper"> <div className="udapp_cActionsWrapper" data-id="universalDappUiContractActionWrapper">
<div className="udapp_contractActionsContainer"> <div className="udapp_contractActionsContainer">
<div className="d-flex" data-id="instanceContractBal"> <div className="d-flex justify-content-between" data-id="instanceContractBal">
<label> <label>
<b><FormattedMessage id="udapp.balance" />:</b> {instanceBalance} ETH <b><FormattedMessage id="udapp.balance" />:</b> {instanceBalance} ETH
</label> </label>
{props.exEnvironment === 'injected' && <i className="fas fa-edit btn btn-sm p-0" onClick={() => {props.editInstance(props.instance)}}></i>}
</div> </div>
{ props.isSavedContract && props.instance.savedOn ? ( { props.isSavedContract && props.instance.savedOn ? (
<div className="d-flex" data-id="instanceContractSavedOn"> <div className="d-flex" data-id="instanceContractSavedOn">

@ -324,6 +324,10 @@ export function RunTabUI(props: RunTabProps) {
runTransactions={executeTransactions} runTransactions={executeTransactions}
sendValue={runTab.sendValue} sendValue={runTab.sendValue}
getFuncABIInputs={getFuncABIValues} getFuncABIInputs={getFuncABIValues}
exEnvironment={runTab.selectExEnv}
editInstance={(instance) => {
plugin.call('dapp-draft', 'edit', {address: instance.address, abi: instance.contractData.abi, name: instance.name, network: runTab.networkName})
}}
/> />
</div> </div>
</div> </div>

@ -342,6 +342,8 @@ export interface InstanceContainerProps {
mainnetPrompt: (tx: Tx, network: Network, amount: string, gasEstimation: string, gasFees: (maxFee: string, cb: (txFeeText: string, priceStatus: boolean) => void) => void, determineGasPrice: (cb: (txFeeText: string, gasPriceValue: string, gasPriceStatus: boolean) => void) => void) => JSX.Element, mainnetPrompt: (tx: Tx, network: Network, amount: string, gasEstimation: string, gasFees: (maxFee: string, cb: (txFeeText: string, priceStatus: boolean) => void) => void, determineGasPrice: (cb: (txFeeText: string, gasPriceValue: string, gasPriceStatus: boolean) => void) => void) => JSX.Element,
sendValue: string, sendValue: string,
getFuncABIInputs: (funcABI: FuncABI) => string getFuncABIInputs: (funcABI: FuncABI) => string
exEnvironment: string
editInstance: (instance) => void
plugin: RunTab plugin: RunTab
} }
@ -449,6 +451,8 @@ export interface UdappProps {
funcIndex?: number) => void, funcIndex?: number) => void,
sendValue: string, sendValue: string,
getFuncABIInputs: (funcABI: FuncABI) => string getFuncABIInputs: (funcABI: FuncABI) => string
exEnvironment: string
editInstance: (instance) => void
plugin: RunTab plugin: RunTab
} }

Loading…
Cancel
Save