Skip to content

Fix multiple SDK issues - #253

Merged
meshackyaro merged 1 commit into
trustflow-protocol:mainfrom
Queenode:fix-issues
Aug 31, 2026
Merged

Fix multiple SDK issues#253
meshackyaro merged 1 commit into
trustflow-protocol:mainfrom
Queenode:fix-issues

Conversation

@Queenode

Copy link
Copy Markdown
Contributor

Description

This Pull Request resolves 4 outstanding issues in the TrustFlow SDK:

  • Closes Add "DOM" to tsconfig.json's lib array for browser-facing wallet/signing modules #119: Add "DOM" to tsconfig.json's lib array

    • Updated tsconfig.json to include "DOM" in compilerOptions.lib. This resolves the tsc --noEmit build failures caused by missing global window declarations in browser-facing wallet modules (Freighter, Albedo).
  • Closes Wire up or remove the unused SDKLogger in src/utils/logger.ts #99: Wire up/remove unused SDKLogger

    • Replaced swallowed errors and bare console.error calls with the structured SDKLogger.
    • Implemented the logger inside src/escrow/monitor.ts and src/escrow/dispute.ts to improve structured observability.
  • Closes Add unit tests for src/wallet/freighter.ts, albedo.ts and connect.ts #115: Add unit tests for wallet module

    • Implemented full test coverage in tests/wallet.test.ts.
    • Added tests to cover the retrieval of the Freighter and Albedo wallets with mocked global.window states.
    • Added test flows for success and failure conditions on wallet connections.
  • Closes Add unit tests for src/contract/build.ts, invoke.ts, read.ts and simulate.ts #114: Add unit tests for contract module

    • Created tests/contract.test.ts to provide test coverage for the src/contract modules.
    • Tested the argument builders buildCreateEscrowArgs and buildReleaseArgs.
    • Mocked the @stellar/stellar-sdk modules (Address, Contract, TransactionBuilder, etc.) to securely test simulateContractCall, invokeContract, and readContractState flows.
    • Fixed a few TypeScript typing errors uncovered inside read.ts and simulate.ts using correct Transaction types.

Verification

  • Compilation passes cleanly (npx tsc --noEmit).
  • All Jest test suites pass.
  • Coverage criteria have been achieved for the targeted contract/ and wallet/ directories.

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@Queenode Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants