Skip to content

Commit

Permalink
refactor: strengthen adapter type definitions (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanofa authored Jul 19, 2024
1 parent cfcbeff commit 64a211d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/stupid-zoos-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@folks-finance/xchain-sdk": patch
---

Enforced the return type of adapters id to make it explicit that the returned array always has at least one element
6 changes: 3 additions & 3 deletions src/common/constants/adapter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AdapterType } from "../types/message.js";

export const TOKEN_ADAPTERS = [AdapterType.WORMHOLE_CCTP, AdapterType.CCIP_TOKEN];
export const DATA_ADAPTERS = [AdapterType.WORMHOLE_DATA, AdapterType.CCIP_DATA];
export const HUB_ADAPTERS = [AdapterType.HUB];
export const TOKEN_ADAPTERS = [AdapterType.WORMHOLE_CCTP, AdapterType.CCIP_TOKEN] as const;
export const DATA_ADAPTERS = [AdapterType.WORMHOLE_DATA, AdapterType.CCIP_DATA] as const;
export const HUB_ADAPTERS = [AdapterType.HUB] as const;

0 comments on commit 64a211d

Please sign in to comment.