From cc1e765ae80af18decf7771b3100a0e23ed39294 Mon Sep 17 00:00:00 2001 From: Wieedze Date: Tue, 28 Apr 2026 11:50:35 +0200 Subject: [PATCH] fix(safe-tx): typecheck errors blocking webapp build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two strict-mode TS errors surfaced by the webapp's Pages build job after the merge to main: 1. direct-sign.ts: encodeFunctionData was imported but never used — executeSafeTx routes through walletClient.writeContract which handles the encoding internally. tsconfig has noUnusedLocals so the import blocked the build. 2. usePendingSafeTxs.ts (in webapp) imported StsTxRecord directly from @intuition-fee-proxy/safe-tx but the type only existed under the namespaced `modes` export. Re-exports StsTxRecord (and the other api-kit types — ApiKitClient, ApiKitClientOptions, StsConfirmation) at the top level so consumers can import them ergonomically. Both fixes are no-runtime-impact — pure import / re-export plumbing. Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/safe-tx/src/index.ts | 6 ++++++ packages/safe-tx/src/modes/direct-sign.ts | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/safe-tx/src/index.ts b/packages/safe-tx/src/index.ts index 9f3c39b..4ff03e4 100644 --- a/packages/safe-tx/src/index.ts +++ b/packages/safe-tx/src/index.ts @@ -15,3 +15,9 @@ export type { SafeTxRequest, SignedSafeTx, } from './modes/direct-sign.js' +export type { + ApiKitClient, + ApiKitClientOptions, + StsConfirmation, + StsTxRecord, +} from './modes/api-kit.js' diff --git a/packages/safe-tx/src/modes/direct-sign.ts b/packages/safe-tx/src/modes/direct-sign.ts index fbacd24..89bb8c3 100644 --- a/packages/safe-tx/src/modes/direct-sign.ts +++ b/packages/safe-tx/src/modes/direct-sign.ts @@ -1,5 +1,4 @@ import { - encodeFunctionData, hashTypedData, pad, type Address,