Skip to content

Commit

Permalink
fix: include ABI files in dist
Browse files Browse the repository at this point in the history
Typescript resolveJsonModule won't emit `require`d JSON files (only `import`ed)
ones.
  • Loading branch information
silasbw committed Mar 24, 2023
1 parent a1143c0 commit 2192dba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/resolve-social-connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { OdisUtils } from '@celo/identity'
import { AuthSigner, ServiceContext } from '@celo/identity/lib/odis/query'

import { NameResolver, NameResolutionResults, ResolutionKind } from './types'
import * as FederatedAttestations from './abis/FederatedAttestations.json'

const DEFAULT_NETWORK_TIMEOUT = 5_000

Expand All @@ -18,7 +19,7 @@ export class ResolveSocialConnect implements NameResolver {
private networkTimeout: number

static readonly FederatedAttestationsContractAbi: AbiItem[] =
require('./abis/FederatedAttestations.json').abi
FederatedAttestations.abi as AbiItem[]

// https://github.com/celo-org/SocialConnect/blob/main/protocol.md#smart-contract-addresses
static readonly AlfajoresFederatedAttestationsProxyContractAddress: Address =
Expand Down

0 comments on commit 2192dba

Please sign in to comment.