Merge pull request #4608 from drafish/dapp-draft

add dapp-draft icon in deployed contract
pull/4678/head
yann300 7 months ago committed by GitHub
commit 0592510806
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  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}
getFuncABIInputs={props.getFuncABIInputs}
plugin={props.plugin}
exEnvironment={props.exEnvironment}
editInstance={props.editInstance}
/>
)
})}
@ -141,6 +143,8 @@ export function InstanceContainerUI(props: InstanceContainerProps) {
sendValue={props.sendValue}
getFuncABIInputs={props.getFuncABIInputs}
plugin={props.plugin}
exEnvironment={props.exEnvironment}
editInstance={props.editInstance}
/>
)
})}

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

@ -324,6 +324,10 @@ export function RunTabUI(props: RunTabProps) {
runTransactions={executeTransactions}
sendValue={runTab.sendValue}
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>

@ -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,
sendValue: string,
getFuncABIInputs: (funcABI: FuncABI) => string
exEnvironment: string
editInstance: (instance) => void
plugin: RunTab
}
@ -449,6 +451,8 @@ export interface UdappProps {
funcIndex?: number) => void,
sendValue: string,
getFuncABIInputs: (funcABI: FuncABI) => string
exEnvironment: string
editInstance: (instance) => void
plugin: RunTab
}

Loading…
Cancel
Save