Skip to content

Commit

Permalink
reset parameters if ABI changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gsteenkamp89 authored and daywiss committed Feb 19, 2024
1 parent f91acb7 commit 3eeea1e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,15 @@ function updateMethod(methodName: string) {
}
function updateAbi(newAbi: string) {
abi.value = newAbi;
methods.value = [];
if (newAbi === abi.value) {
return;
}
try {
abi.value = newAbi;
methods.value = getABIWriteFunctions(abi.value);
isAbiValid.value = true;
updateMethod(methods.value[0].name);
parameters.value = [];
} catch (error) {
handleFail();
abiError.value = 'Error extracting write methods.';
Expand Down

0 comments on commit 3eeea1e

Please sign in to comment.