Skip to content

Conversation

@Adamj1232
Copy link
Contributor

@Adamj1232 Adamj1232 commented Jan 20, 2023

Description

This PR introduces a containerElement configuration prop for HW wallets use the Account Select and Entry modal in the case of KeepKey.
This prop works in the same way that the other container element props work by allowing the passage of a DOM ID and then appending the Account Select / Entry modal to that prop.
Each HW wallet init will have this separately configurable on module initialization (KeepKey, Keystone, Trezor & Dcent).

Example:

  const trezorOptions = {
    email: '[email protected]',
    appUrl: 'https://www.blocknative.com',
    containerElement: '#sample-container-el'
  }
  const trezor = trezorModule(trezorOptions)

This PR also introduces a configuration for connect modal to disable close on background click and hide the close button. This is required for using W3O as a login modal per this request.

export type ConnectModalOptions = {
  showSidebar?: boolean
  /**
   * Disabled close of the connect modal with background click and
   * hides the close button forcing an action from the connect modal
   */
  disableClose?: boolean
}

Checklist

  • The version field in package.json of the package you have made changes in is incremented following semantic versioning and using alpha release tagging
  • The box that allows repo maintainers to update this PR is checked
  • I tested locally to make sure this feature/fix works
  • I have run yarn file-check, yarn type-check & yarn build to confirm there are not any associated errors
  • This PR passes the Circle CI checks

@vercel
Copy link

vercel bot commented Jan 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
web3-onboard-docs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 25, 2023 at 10:16PM (UTC)

@Adamj1232 Adamj1232 changed the title Feature: HW Account Select and Entry Modal container element props and Disable Connect Modal close config Feature: HD Account Select and Entry Modal container element props and Disable Connect Modal close config Jan 20, 2023
@Adamj1232 Adamj1232 changed the title Feature: HD Account Select and Entry Modal container element props and Disable Connect Modal close config Feature: HW Account Select and Entry Modal container element props and Disable Connect Modal close config Jan 23, 2023
@Adamj1232 Adamj1232 merged commit 52d894e into v2-web3-onboard-develop Jan 25, 2023
This was referenced Jan 25, 2023
@Adamj1232 Adamj1232 deleted the feature/hw_containerEl branch January 26, 2023 20:24
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