@cfxlabsinc/b2b-services
    Preparing search index...
    CachedTransaction: Omit<
        Transaction,
        | "amount"
        | "sourceAmount"
        | "targetAmount"
        | "fees"
        | "preBalance"
        | "postBalance"
        | "walletAddress"
        | "otherWallet"
        | "createdAt"
        | "updatedAt",
    > & {
        amount: string;
        createdAt: string;
        fees?: string;
        otherWallet?: Omit<NonNullable<Transaction["otherWallet"]>, "address"> & {
            address: string;
        };
        postBalance?: string;
        preBalance?: string;
        sourceAmount?: string;
        targetAmount?: string;
        updatedAt: string;
        walletAddress: string
        | null;
    }

    L2 round-trips through JSON, so a Transaction's Date fields arrive as strings and its BigNumber / Address-branded fields lose their runtime shape on cross-process / post-L1 reads. Store a JSON-safe projection and rehydrate on read.

    Non-JSON-native fields enumerated field-by-field:

    • amount (BigNumber, required), sourceAmount? / targetAmount? / fees? / preBalance? / postBalance? (BigNumber, optional) → string
    • walletAddress (Address | null) → string | null (preserves the REWARD null; we deliberately do NOT coerce to "" like the old dashboard serializer)
    • otherWallet.address (Address) → string
    • createdAt / updatedAt (Date, both required) → ISO string

    Everything else (card, deviceLocation, subType, customer/entity ids and names, currency, etc.) is JSON-safe and rides the spread unchanged.