Skip to content

feat: add react native playground#205

Open
decofe wants to merge 2 commits intomainfrom
alex/react-native-playground
Open

feat: add react native playground#205
decofe wants to merge 2 commits intomainfrom
alex/react-native-playground

Conversation

@decofe
Copy link
Copy Markdown
Member

@decofe decofe commented Apr 14, 2026

Adds a React Native (Expo) playground at playgrounds/react-native/ for testing the accounts/react-native SDK surface.

Covers connect, balance, send transaction, sign message, and disconnect — mirrors the wagmi playground's scope.

  • App.tsx — single-file playground using Provider.create with secureStorage and expo-linking redirect
  • app.json — Expo config with accounts-playground URL scheme
  • Root dev:react-native script added

Prompted by: Alex

Co-authored-by: Alex Risch <23103150+alexrisch@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d88bf-e2d8-748c-b781-ad8449c23f0d
@socket-security
Copy link
Copy Markdown

socket-security bot commented Apr 14, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedexpo-status-bar@​55.0.57310082100100
Addedexpo-linking@​55.0.137610080100100
Addedreact-native-safe-area-context@​5.6.21001007888100
Addedreact-native-get-random-values@​1.11.01001008081100
Addedreact-native@​0.83.49110099100100
Addedreact-native-screens@​4.23.099100100100100

View full report

Fixed pklayground
Added auth
Added signing and funding
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 14, 2026

Open in StackBlitz

npm i https://pkg.pr.new/tempoxyz/accounts@205

commit: 6133627

@github-actions
Copy link
Copy Markdown
Contributor

Worker Preview
Playground https://71733bc2-accounts-playground.porto.workers.dev

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 14, 2026

Open in StackBlitz

npm i https://pkg.pr.new/tempoxyz/accounts@205

commit: 6133627

@github-actions
Copy link
Copy Markdown
Contributor

Worker Preview
Wagmi https://400c63da-accounts-wagmi.porto.workers.dev

Comment on lines +21 to +31
chains: [chain],
host: 'https://wallet.tempo.xyz',
redirectUri,
secureStorage: secureStorage(),
authorizeAccessKey: () => ({
expiry: Math.floor(Date.now() / 1000) + 60 * 5,
limits: [{
token: tokens.pathUSD,
limit: parseUnits('5', 6),
}],
}),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would be worth looking into how we can remove things here. E.g. do we need chains, host, secureStorage? we should rely on defaults.

Comment on lines +53 to +56
params: [{
capabilities: { method: 'login' },
chainId: Hex.fromNumber(chain.id),
}],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Idt we need params at all

Suggested change
params: [{
capabilities: { method: 'login' },
chainId: Hex.fromNumber(chain.id),
}],

Comment on lines +59 to +69
if (result.accounts.length === 0)
result = await provider.request({
method: 'wallet_connect',
params: [{
capabilities: {
method: 'register',
name: 'Accounts RN Playground',
},
chainId: Hex.fromNumber(chain.id),
}],
})
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Idt we need this

Suggested change
if (result.accounts.length === 0)
result = await provider.request({
method: 'wallet_connect',
params: [{
capabilities: {
method: 'register',
name: 'Accounts RN Playground',
},
chainId: Hex.fromNumber(chain.id),
}],
})

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.

3 participants