Skip to content

Add "Show on Device" option to Get Address for all chains in sandbox #16

@0xMillz

Description

@0xMillz

Overview

The sandbox developer tools currently expose a "Show on Device" option only for Ethereum in the Get Address flow. When enabled, this displays the derived address on the hardware device screen for user verification—a useful security feature for confirming the correct address before use.

All other chains (Bitcoin, Cosmos, Litecoin, Dogecoin, Ripple, THORChain) hardcode showDisplay: false in their Get Address tools and do not offer this option to users. The underlying HD wallet APIs already support showDisplay for these chains, so this is purely a UI/UX gap in the sandbox.

References and additional details

Current implementation (Ethereum only):

  • examples/sandbox/developerTools.ts — Ethereum Get Address tool (lines ~276–310) includes a "Show on Device" select input and passes showDisplay from user selection to wallet.ethGetAddress().

Chains to update:

  • Bitcoin (btc-address) — uses btcGetAddress, supports showDisplay in packages/hdwallet-core/src/bitcoin.ts
  • Cosmos (cosmos-address) — uses cosmosGetAddress, supports showDisplay in packages/hdwallet-core/src/cosmos.ts
  • Litecoin (ltc-address) — uses btcGetAddress with coin: 'Litecoin', supports showDisplay
  • Dogecoin (doge-address) — uses btcGetAddress with coin: 'Dogecoin', supports showDisplay
  • Ripple (ripple-address) — uses rippleGetAddress, supports showDisplay in packages/hdwallet-core/src/ripple.ts
  • THORChain (thorchain-address) — uses thorchainGetAddress, supports showDisplay in packages/hdwallet-core/src/thorchain.ts

Pattern to follow: Add an input to each Get Address tool matching Ethereum's:

{
  id: '<chain>-addr-display',
  label: 'Show on Device',
  type: 'select',
  options: [
    { value: 'false', label: 'No' },
    { value: 'true', label: 'Yes' }
  ]
}

Then read the value and pass showDisplay: ($('#<chain>-addr-display') as any).val() === 'true' to the respective getAddress call.

Acceptance Criteria

  • Bitcoin Get Address includes "Show on Device" (Yes/No) option
  • Cosmos Get Address includes "Show on Device" (Yes/No) option
  • Litecoin Get Address includes "Show on Device" (Yes/No) option
  • Dogecoin Get Address includes "Show on Device" (Yes/No) option
  • Ripple Get Address includes "Show on Device" (Yes/No) option
  • THORChain Get Address includes "Show on Device" (Yes/No) option
  • When "Yes" is selected, the address is displayed on the hardware device screen
  • Result output includes whether the address was shown on device (consistent with Ethereum: Shown on device: Yes/No)

Need By Date

N/A

Screenshots/Mockups

N/A — UI change mirrors existing Ethereum Get Address behavior.

Estimated effort

1 hour

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions