Skip to content

Commit

Permalink
chore(js-ts): Convert app/util/test/ganache-contract-address-registry…
Browse files Browse the repository at this point in the history
….js to TypeScript (#11406)

Converted the file to TypeScript and removed return types from methods.

[This Devin
run](https://preview.devin.ai/devin/6894e270d7384f76931ae901e99f132e)
was requested by Jeffrey.


If you have any feedback, you can leave comments in the PR and I'll
address them in the app!

---------

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Kylan Hurt <[email protected]>
Co-authored-by: Jonathan Ferreira <[email protected]>
Co-authored-by: Cal Leung <[email protected]>
Co-authored-by: EtherWizard33 <[email protected]>
  • Loading branch information
5 people authored Oct 10, 2024
1 parent 22c83cd commit 5e1eaf7
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 @@ -3,15 +3,15 @@
* a local blockchain instance ran by Ganache.
*/
class GanacheContractAddressRegistry {
#addresses = {};
#addresses: Record<string, string> = {};

/**
* Store new contract address in key:value pair.
*
* @param contractName
* @param contractAddress
*/
storeNewContractAddress(contractName, contractAddress) {
storeNewContractAddress(contractName: string, contractAddress: string) {
this.#addresses[contractName] = contractAddress;
}

Expand All @@ -20,7 +20,7 @@ class GanacheContractAddressRegistry {
*
* @param contractName
*/
getContractAddress(contractName) {
getContractAddress(contractName: string) {
return this.#addresses[contractName];
}
}
Expand Down
2 changes: 1 addition & 1 deletion locales/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3429,4 +3429,4 @@
"network": "Network",
"rpc_url": "RPC URL"
}
}
}

0 comments on commit 5e1eaf7

Please sign in to comment.