Skip to content

Commit

Permalink
refactor: Automatically select contracts after compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Glacier-Luo committed Apr 14, 2023
1 parent 6418629 commit 7d7426c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/core/src/components/DeployAndCall/Deploy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ const Deploy = () => {
}
});

useEffect(()=>{
if(compiledOptions.length > 0){
methods.setValue('contract', compiledOptions[0]?.value);
}
}, [compiledOptions]);

const {watch, setValue} = methods;
const environment = watch('environment');
const selectAccount = watch('account');
Expand Down

1 comment on commit 7d7426c

@vercel
Copy link

@vercel vercel bot commented on 7d7426c Apr 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.