Skip to content

Commit

Permalink
fix bug useEffect dependencyArray
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-zwets authored and rkalis committed Sep 24, 2024
1 parent ce6d2e3 commit 66da587
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/ContractFunction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const ContractFunction: React.FC<Props> = ({ contractInfo, abi, provider, wallet
setNamedUtxoList(newNamedUtxoList);
}
updateUtxos()
}, [contractInfo])
}, [contractInfo, wallets])

function fillPrivKey(i: number, walletIndex: string) {
const argsCopy = [...functionArgs];
Expand Down
2 changes: 1 addition & 1 deletion src/components/TransactionBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const TransactionBuilder: React.FC<Props> = ({ provider, wallets, contracts, upd
const contractName = selectedContract?.contract.name
const updatedContract = contracts?.find(contractInfo => contractInfo.contract?.name === contractName)
if(updatedContract != selectedContract) setSelectedContract(updatedContract)
}, [contracts])
}, [contracts, wallets])

const contractSelector = (
<Form.Control size="sm" id="artifact-selector" style={{width:"350px", display:"inline-block"}}
Expand Down

0 comments on commit 66da587

Please sign in to comment.