Skip to content

Commit

Permalink
Merge branch 'develop' into OS-1109/update-commons-contracts-to-use-c…
Browse files Browse the repository at this point in the history
…ommons-config
  • Loading branch information
clauBv23 committed Mar 12, 2024
2 parents b2b900b + bb86a7b commit 4fd653e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion configs/src/networks/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ export function addRpcUrlToNetwork(
) {
// add the api key to the network urls
for (const network of Object.values(SupportedNetworks)) {
if (network == SupportedNetworks.LOCAL) {
if (
network == SupportedNetworks.LOCAL ||
network == SupportedNetworks.BASE_GOERLI
) {
networks[network].url = networksRpcUrl[network];
} else {
networks[network].url = `${networksRpcUrl[network]}${apiKey}`;
Expand Down
6 changes: 4 additions & 2 deletions configs/src/test/unit/networks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,15 @@ describe('Deployments', () => {
it('should add the rpc url to the networks', () => {
const apiKey: string = 'TEST_API_KEY';
addRpcUrlToNetwork(apiKey, networksAlchemyRpcUrl);
console.log(networks);

Object.values(SupportedNetworks).map(network => {
if (network === SupportedNetworks.LOCAL) {
expect(networks[network].url).toBe(
networksAlchemyRpcUrl[SupportedNetworks.LOCAL]
);
} else if (network === SupportedNetworks.BASE_GOERLI) {
expect(networks[network].url).toBe(
networksAlchemyRpcUrl[SupportedNetworks.BASE_GOERLI]
);
} else {
expect(networks[network].url).toBe(
`${networksAlchemyRpcUrl[network]}${apiKey}`
Expand Down

0 comments on commit 4fd653e

Please sign in to comment.