Skip to content

Conversation

@mohammadalfaiyazbitgo
Copy link
Contributor

  • verify platform built consolidaiton hexs send funds to root address of wallet
  • test case to verify spoofed transactions are caught

TICKET: WP-5727

- verify platform built consolidaiton hexs send funds to root address of
  wallet
- test case to verify spoofed transactions are caught

TICKET: WP-5727
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds verification for consolidation transactions to ensure that platform-built consolidation transaction hexes send funds to the correct wallet root address, preventing potential spoofing attacks.

  • Adds consolidation transaction verification logic to check output addresses against wallet base/root address
  • Implements two comprehensive test cases to verify both spoofed transaction rejection and valid transaction acceptance
  • Enhances security by validating that consolidation transactions only send funds to the intended wallet address

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
modules/sdk-coin-sui/src/sui.ts Adds consolidation verification logic to check output addresses match wallet base address
modules/sdk-coin-sui/test/unit/sui.ts Adds test cases for spoofed transaction detection and valid consolidation verification
Comments suppressed due to low confidence (1)

modules/sdk-coin-sui/test/unit/sui.ts:1

  • The consolidationTx object is duplicated between both test cases with identical data. Consider extracting this into a shared constant or helper function to reduce code duplication and improve maintainability.
import should from 'should';

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@mohammadalfaiyazbitgo mohammadalfaiyazbitgo merged commit e6953f2 into master Sep 2, 2025
11 checks passed
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.

6 participants