diff --git a/.changeset/fast-timers-crash.md b/.changeset/fast-timers-crash.md new file mode 100644 index 0000000000..f2be441756 --- /dev/null +++ b/.changeset/fast-timers-crash.md @@ -0,0 +1,5 @@ +--- +"viem": patch +--- + +Resolved type error by explicitly typing `headers` as `HeadersInit` in CCIP. diff --git a/src/utils/ccip.ts b/src/utils/ccip.ts index be5c0acdf5..cac851c13c 100644 --- a/src/utils/ccip.ts +++ b/src/utils/ccip.ts @@ -136,7 +136,7 @@ export async function ccipRequest({ const url = urls[i] const method = url.includes('{data}') ? 'GET' : 'POST' const body = method === 'POST' ? { data, sender } : undefined - const headers = + const headers: HeadersInit = method === 'POST' ? { 'Content-Type': 'application/json' } : {} try {