Skip to content

Improve TypeScript Type Definitions for Transaction Objects #444

@manjik-rumsan

Description

@manjik-rumsan

Area: Type Safety, Wallet Module
Labels: good-first-issue, typescript, refactor, wallet

📝 Description

Our wallet library currently handles transaction objects for both Stellar and EVM flows, but many of these objects either lack strong TypeScript types or rely on overly generic structures such as any. This can lead to inconsistent usage, unclear data contracts between modules, and hidden runtime errors.

This task requires defining clear, well-structured TypeScript interfaces for all transaction-related objects in the following files:

  • libs/wallet/src/stellar/connectedWallet.ts
  • libs/wallet/src/evm/connectedWallet.ts

You should review how transaction objects are created, transformed, and consumed within these files, and then introduce strongly typed interfaces or types. The goal is to ensure that:

  • All transaction objects have predictable shapes
  • Function inputs/outputs use these types
  • Shared patterns (e.g., common transaction fields) are standardized
  • Any external library types (e.g., from stellar-sdk or ethers) are correctly referenced or wrapped when needed

🎯 Expected Outcome

  • New or updated TypeScript interfaces/types for transaction objects
  • Updated functions to use the new types
  • Removal of any unnecessary any or implicit types
  • Improved type safety and IDE autocomplete throughout the wallet module

📁 Files to Review

libs/
 └── wallet/
      └── src/
           ├── stellar/connectedWallet.ts
           └── evm/connectedWallet.ts

Acceptance Criteria

  • Clear TypeScript interfaces/types are defined for all transaction-related objects
  • All functions use these types explicitly
  • No TypeScript errors introduced
  • PR includes brief comments or descriptions explaining new types

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions