Minor fixes

pull/2260/head
David Disu 2 years ago
parent 69c06852c9
commit cf4fecbca9
  1. 2
      libs/remix-core-plugin/src/lib/constants/uups.ts
  2. 2
      libs/remix-core-plugin/src/lib/openzeppelin-proxy.ts
  3. 2
      libs/remix-ui/run-tab/src/lib/components/deployButton.tsx
  4. 8
      libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx

File diff suppressed because one or more lines are too long

@ -18,7 +18,7 @@ export class OpenZeppelinProxy extends Plugin {
async isConcerned(ast: ContractAST = {} as ContractAST) {
// check in the AST if it's an upgradable contract
if (ast.nodes && ast.nodes.find(node => node.absolutePath === UUPS)) {
if (ast.nodes && ast.nodes.find(node => node.absolutePath && node.absolutePath.includes(UUPS))) {
this.kind = 'UUPS'
return true
}

@ -12,7 +12,7 @@ export function DeployButton (props: DeployButtonProps) {
return (
<>
{ props.deployOptions && (props.deployOptions || []).length > 0 ?
<Dropdown as={ButtonGroup} autoClose="outside">
<Dropdown as={ButtonGroup}>
<button onClick={props.handleActionClick} title={props.buttonOptions.title} className={`udapp_instanceButton ${props.buttonOptions.widthClass} btn btn-sm ${props.buttonOptions.classList}`} data-id={props.buttonOptions.dataId}>{ props.deployOptions[props.selectedIndex] ? props.deployOptions[props.selectedIndex].title : 'Deploy' }</button>
<Dropdown.Toggle split id="dropdown-split-basic" className={`btn btn-sm dropdown-toggle dropdown-toggle-split ${props.buttonOptions.classList}`} style={{ maxWidth: 25, minWidth: 0, height: 32 }} />
<Dropdown.Menu className="deploy-items border-0">

@ -183,7 +183,7 @@ export function UniversalDappUI (props: UdappProps) {
const renderData = (item, parent, key: string | number, keyPath: string) => {
const data = extractDataDefault(item, parent)
const children = (data.children || []).map((child) => {
const children = (data.children || []).map((child, index) => {
return (
renderData(child.value, data, child.key, keyPath + '/' + child.key)
)
@ -236,7 +236,7 @@ export function UniversalDappUI (props: UdappProps) {
const lookupOnly = funcABI.stateMutability === 'view' || funcABI.stateMutability === 'pure' || isConstant
const inputs = props.getFuncABIInputs(funcABI)
return <>
return <div key={index}>
<ContractGUI
funcABI={funcABI}
clickCallBack={(valArray: { name: string, type: string }[], inputsValues: string) => {
@ -254,14 +254,14 @@ export function UniversalDappUI (props: UdappProps) {
const funcIndex = index.toString()
const response = props.instance.decodedResponse[key]
return key === funcIndex ? Object.keys(response || {}).map((innerkey) => {
return key === funcIndex ? Object.keys(response || {}).map((innerkey, index) => {
return renderData(props.instance.decodedResponse[key][innerkey], response, innerkey, innerkey)
}) : null
})
}
</TreeView>
</div>
</>
</div>
})
}
</div>

Loading…
Cancel
Save