Skip to content

Commit d02c4a9

Browse files
improve: syntax revisions (#349)
* improve: syntax revisions Signed-off-by: james-a-morris <[email protected]> * chore: bump version Signed-off-by: james-a-morris <[email protected]> --------- Signed-off-by: james-a-morris <[email protected]>
1 parent 8f57bb5 commit d02c4a9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@across-protocol/contracts-v2",
3-
"version": "2.4.2",
3+
"version": "2.4.3",
44
"author": "UMA Team",
55
"license": "AGPL-3.0-only",
66
"repository": {

src/DeploymentUtils.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ export function getDeployedBlockNumber(contractName: string, networkId: number):
2424

2525
// Returns the chainId and contract name for a given contract address.
2626
export function getContractInfoFromAddress(contractAddress: string): { chainId: Number; contractName: string } {
27-
let returnValue: { chainId: number; contractName: string }[] = [];
27+
const returnValue: { chainId: number; contractName: string }[] = [];
2828

2929
Object.keys(deployments).forEach((_chainId) =>
3030
Object.keys(deployments[_chainId]).forEach((_contractName) => {
31-
if (deployments[_chainId][_contractName].address == contractAddress)
31+
if (deployments[_chainId][_contractName].address === contractAddress)
3232
returnValue.push({ chainId: Number(_chainId), contractName: _contractName });
3333
})
3434
);
35-
if (returnValue.length == 0) throw new Error(`Contract ${contractAddress} not found in deployments.json`);
35+
if (returnValue.length === 0) throw new Error(`Contract ${contractAddress} not found in deployments.json`);
3636
if (returnValue.length > 1) throw new Error(`Multiple deployments found for ${contractAddress}`);
3737
return returnValue[0];
3838
}

0 commit comments

Comments
 (0)