Skip to content

Commit

Permalink
feat: beefy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsains committed Dec 9, 2024
1 parent 733a1a7 commit c93b46a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/adapters-library/src/scripts/deleteAdapterMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,28 @@ export function deleteAdapterMetadata(
products,
chains,
}: { protocols: string; products: string; chains: string }) => {

console.log('Starting deletion process...')
console.log('Protocols:', protocols)
console.log('Products:', products)
console.log('Chains:', chains)

const filterProtocolIds = multiProtocolFilter(protocols)!
if (!protocols || filterProtocolIds && filterProtocolIds.length !== 1) {
if (
!protocols ||
(filterProtocolIds && filterProtocolIds.length !== 1)
) {
throw new Error('One protocol must be supplied at a time')
}
const protocolId = filterProtocolIds.pop()!

const filterProductIds = products?.split(',')
if (!products || filterProductIds && filterProductIds.length !== 1) {
if (!products || (filterProductIds && filterProductIds.length !== 1)) {
throw new Error('One product must be supplied at a time')
}
const productId = filterProductIds?.pop()!

const filterChainIds = multiChainFilter(chains)!
if (!chains || filterChainIds && filterChainIds.length !== 1) {
if (!chains || (filterChainIds && filterChainIds.length !== 1)) {
throw new Error('One chain must be supplied at a time')
}
const chainId = filterChainIds.pop()!
Expand Down

0 comments on commit c93b46a

Please sign in to comment.