Skip to content

Conversation

@nahom4
Copy link

@nahom4 nahom4 commented Jan 9, 2026

Description

This PR introduces a comprehensive test suite for validating multi-wallet functionality in the Go SDK. It covers wallet creation, management, storage operations, and transactions using secondary wallets, ensuring robust support for multi-account scenarios.

Key Changes

New Test Suites

  • TestMultiWalletStorageOperations: Verifies the full storage lifecycle (Create Allocation -> Upload -> Download) using a secondary wallet. This confirms the critical fix where WithWallet() is correctly used to sign write markers.
  • TestMultiWalletManagement: Tests core wallet operations including AddWallet, RemoveWallet, concurrent usage, and lookup by both ClientID and PublicKey (verifying the dual-index fix in SDK).
  • TestMultiWalletTransactions: Validates sending tokens between different wallets within the same client instance.
  • TestMultiWalletCreation: Tests wallet creation, serialization, and importantly, mnemonics recovery.

Utils & Infrastructure

  • multi_wallet_utils.go: Added helper functions for loading wallets from the pool, adding them to the SDK, and managing test state.
  • Self-Contained Tests: Fixed previous reliance on external config for mnemonic tests. Tests now generate their own wallets and mnemonics on the fly, ensuring zero valid skips and no setup dependencies.

Verification

All 24 tests across 6 suites are passing with 0 skips.

  • Verified correct wallet lookup by ClientID (for workers) and PublicKey (for signing).
  • Verified correct multiWalletSupportKey propagation in upload flows.

@rikachet1 rikachet1 requested a review from storybehind January 11, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants