Skip to content

fix: set block explorer URL after successful transaction#388

Open
pete-watters wants to merge 2 commits intophantom:mainfrom
pete-watters:fix/react-native-demo-explorer-url
Open

fix: set block explorer URL after successful transaction#388
pete-watters wants to merge 2 commits intophantom:mainfrom
pete-watters:fix/react-native-demo-explorer-url

Conversation

@pete-watters
Copy link
Copy Markdown

@pete-watters pete-watters commented Mar 9, 2026

Summary & Motivation

The wallet screen includes a "View on Block Explorer" button that is rendered conditionally when transactionExplorer is set. After a successful transaction, the code sets this to null, so the button never appears.

To fix this, I changed it to set transactionExplorer to the Solscan URL using the transaction signature, consistent with how the constants package defines Solana explorer URLs in NETWORK_CONFIGS.

How I Tested These Changes

I tested this purely using code type checks. result.signature is already used in the success message on the line above — this just passes it to a Solscan URL instead of discarding it.

To manually test it I got the APP running locally and set up a project on the developer portal however I am continually seeing an error that 'The redirect URI 'phantom-rn-demo://phantom-auth-callback' is not whitelisted for this application.

Did you add a changeset?

This change is isolated to the examples so I did not add a changeset - no package code is modified.

Did you update the README files?

I did not, as this is adding a bug fix

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced transaction confirmation flow. The wallet now displays a Solscan blockchain explorer link with the transaction signature after successful transactions, enabling users to immediately access and verify detailed transaction confirmation and on-chain status rather than displaying an empty field.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3f28dccd-ad56-49f7-88ae-9f45691bdc0e

📥 Commits

Reviewing files that changed from the base of the PR and between facd553 and ddaa720.

📒 Files selected for processing (1)
  • examples/react-native-sdk-demo-app/app/wallet.tsx

📝 Walkthrough

Walkthrough

A single file update in the React Native SDK demo app where the transaction explorer URL is now populated with a Solscan link based on the transaction signature after successful transactions, rather than being cleared to null.

Changes

Cohort / File(s) Summary
Transaction Explorer URL Handling
examples/react-native-sdk-demo-app/app/wallet.tsx
Modified transaction success handler to set the explorer URL to a Solscan link using the transaction signature instead of clearing it to null.
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: setting the block explorer URL instead of clearing it after a successful transaction.
Description check ✅ Passed The description follows the template structure with all required sections completed: Summary & Motivation clearly explains the fix, How I Tested These Changes details the testing approach, and responses to changeset and README questions are provided.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@garlobrian52
Copy link
Copy Markdown

@copilot

@garlobrian52 garlobrian52 mentioned this pull request Mar 25, 2026
@garlobrian52 garlobrian52 mentioned this pull request Apr 28, 2026
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