Skip to content

Commit

Permalink
fix: cow-shed types (#224)
Browse files Browse the repository at this point in the history
# Summary

CoW-shed was using absolute imports in some places which causes the
generated types to not find the the proper imports.

Changed it to relative.

# Testing

In this lib all tests were passing as before.
The issue was when importing it on watch-tower.

I built it with `yalc`, published locally and installed onto
watch-tower.

After that the build was successful.
  • Loading branch information
alfetopito authored Nov 7, 2024
1 parent e157f7d commit cbfb6a4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
24 changes: 12 additions & 12 deletions src/cow-shed/CoWShedHooks.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
import {
EcdsaSigningScheme,
hashTypedData,
isTypedDataSigner,
SigningScheme,
TypedDataTypes,
} from '@cowprotocol/contracts'
import type { Signer } from '@ethersproject/abstract-signer'
import { TypedDataDomain } from 'ethers'
import {
arrayify,
defaultAbiCoder,
Expand All @@ -6,19 +15,10 @@ import {
solidityKeccak256,
splitSignature,
} from 'ethers/lib/utils'
import { COW_SHED_FACTORY, COW_SHED_IMPLEMENTATION, SupportedChainId } from 'src/common'
import { COW_SHED_712_TYPES, ICoWShedCall, ICoWShedOptions } from './types'
import { COW_SHED_PROXY_INIT_CODE } from './proxyInitCode'
import type { Signer } from '@ethersproject/abstract-signer'
import { COW_SHED_FACTORY, COW_SHED_IMPLEMENTATION, SupportedChainId } from '../common'
import { getCoWShedFactoryInterface } from './contracts'
import { TypedDataDomain } from 'ethers'
import {
EcdsaSigningScheme,
hashTypedData,
isTypedDataSigner,
SigningScheme,
TypedDataTypes,
} from '@cowprotocol/contracts'
import { COW_SHED_PROXY_INIT_CODE } from './proxyInitCode'
import { COW_SHED_712_TYPES, ICoWShedCall, ICoWShedOptions } from './types'

export class CowShedHooks {
constructor(private chainId: SupportedChainId, private customOptions?: ICoWShedOptions) {}
Expand Down
6 changes: 3 additions & 3 deletions src/cow-shed/contracts.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CoWShedInterface } from 'src/common/generated/CoWShed'
import { CoWShed__factory, CoWShedFactory__factory } from 'src/common/generated'
import { CoWShedFactoryInterface } from 'src/common/generated/CoWShedFactory'
import { CoWShed__factory, CoWShedFactory__factory } from '../common/generated'
import { CoWShedInterface } from '../common/generated/CoWShed'
import { CoWShedFactoryInterface } from '../common/generated/CoWShedFactory'

let cowShedInterfaceCache: CoWShedInterface | undefined
let cowShedFactoryInterface: CoWShedFactoryInterface | undefined
Expand Down

0 comments on commit cbfb6a4

Please sign in to comment.