Skip to content

Commit

Permalink
fix: modify webhook network map to include all supported networks (#463)
Browse files Browse the repository at this point in the history
* fix: modify webhook network map to include all supported networks

* Version
  • Loading branch information
vahnag authored Oct 25, 2024
1 parent 779c1b7 commit 09dfb61
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 21 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

### Minor Changes

## 3.4.6

### Minor Changes

- Fixed webhook network parsing in `getAllWebhooks` method for all supported networks.

## 3.4.5

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alchemy-sdk",
"version": "3.4.5",
"version": "3.4.6",
"description": "Extended Ethers.js SDK for Alchemy APIs",
"author": "Alchemy",
"license": "MIT",
Expand Down
21 changes: 2 additions & 19 deletions src/api/notify-namespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -637,25 +637,8 @@ export class NotifyNamespace {
*
* @internal
*/
const WEBHOOK_NETWORK_TO_NETWORK: { [key: string]: Network } = {
ETH_MAINNET: Network.ETH_MAINNET,
ETH_GOERLI: Network.ETH_GOERLI,
ETH_SEPOLIA: Network.ETH_SEPOLIA,
MATIC_MAINNET: Network.MATIC_MAINNET,
MATIC_MUMBAI: Network.MATIC_MUMBAI,
MATIC_AMOY: Network.MATIC_AMOY,
ARB_MAINNET: Network.ARB_MAINNET,
ARB_GOERLI: Network.ARB_GOERLI,
ARB_SEPOLIA: Network.ARB_SEPOLIA,
OPT_MAINNET: Network.OPT_MAINNET,
OPT_GOERLI: Network.OPT_GOERLI,
OPT_SEPOLIA: Network.OPT_SEPOLIA,
BASE_MAINNET: Network.BASE_MAINNET,
BASE_GOERLI: Network.BASE_GOERLI,
BASE_SEPOLIA: Network.BASE_SEPOLIA,
ZKSYNC_MAINNET: Network.ZKSYNC_MAINNET,
ZKSYNC_SEPOLIA: Network.ZKSYNC_SEPOLIA
};
const WEBHOOK_NETWORK_TO_NETWORK: { [key: string]: Network } =
Object.fromEntries(Object.entries(Network));

/** Mapping of the SDK's network representation the webhook API's network representation. */
const NETWORK_TO_WEBHOOK_NETWORK: Map<Network, string> = Object.keys(
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file is autogenerated by injectVersion.js. Any changes will be
// overwritten on commit!
export const VERSION = '3.4.5';
export const VERSION = '3.4.6';

0 comments on commit 09dfb61

Please sign in to comment.