Skip to content

Conversation

@savvar9991
Copy link

Summary

This PR makes the contract testing flow more stable and user-friendly when submitting contracts for NFT badge verification.

Changes

  • Added safe timeout handling for long-running or stuck transactions:
    • Prevents infinite “testing/waiting” state
    • Shows a clear message: “Transaction taking too long. Please try again.”
  • Hardened TestSuiteResult event parsing:
    • Aggregates all relevant logs into a single result list
    • Adds null/shape guards for args, testResults and assertResults
    • Prevents runtime errors on unexpected/partial logs
  • Slightly improved state management around testing status and messages

Rationale

Previously, malformed or partial logs could cause a runtime error during parsing, and long-running transactions could leave the UI in a “stuck” state. This led to confusing UX and unnecessary repeated submissions. The new guards and timeout logic make the flow resilient while keeping the existing behavior for valid events.

Refactor imports, remove unused styles, and update NFT ownership logic.
@cb-heimdall
Copy link
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

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