Skip to content

Commit

Permalink
feat: save code
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennisic committed Nov 9, 2023
1 parent ba827f8 commit 31300ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const commonFirst = () => {
} else {
inputs.value = sendAbis[0]?.inputs;
outputs.value = sendAbis[0]?.outputs
payable.value = sendAbis[0]?.stateMutability === 'payable'
payable.value = sendAbis[0]?.stateMutability === 'payable'
}
buttonInfo.value = 'Transact'
} else if (sendAbis.length <= 0 && callAbis.length > 0) {
Expand All @@ -109,7 +109,7 @@ const commonFirst = () => {
} else {
inputs.value = callAbis[0]?.inputs;
outputs.value = callAbis[0]?.outputs;
payable.value = callAbis[0]?.stateMutability === 'payable'
payable.value = callAbis[0]?.stateMutability === 'payable' || callAbis[0]?.stateMutability === 'pure'
}
buttonInfo.value = 'Call'
} else {
Expand Down Expand Up @@ -229,7 +229,7 @@ onMounted(() => {
if (item.type === "function") {
if (!item.stateMutability || item.stateMutability === 'nonpayable' || item.stateMutability === 'payable') {
sendAbis.push(item)
} else if (item.stateMutability === 'view' || item.stateMutability === 'constant') {
} else if (item.stateMutability === 'view' || item.stateMutability === 'constant' || item.stateMutability === 'pure') {
callAbis.push(item)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ const setAbiInfo = (abiInfo: any, mapKey: string, setType: string) => {
abiInfoData.map((item: any) => {
if (item.type === 'constructor' && setType !== 'method') {
setConstructorParams(item);
} else if (item.type === 'function') {
} else if (item.type === 'function' && item.stateMutability != 'pure') {
setFunctionParams(item, mapKey);
}
})
Expand Down

0 comments on commit 31300ab

Please sign in to comment.