Skip to content

Releases: blocknative/web3-onboard

Hardware Wallets

20 Feb 00:33
0c3f01a
Compare
Choose a tag to compare

This release sees the addition of wallet modules for both Trezor and Ledger hardware wallets making it super simple to add hardware wallets as an option for Dapp users.

To add hardware wallets, simply add the following to your Onboard configuration object:

const onboardConfig = {
  // ...other config options
  walletSelect: {
    wallets: [
      // ...other wallets
      {
        walletName: "trezor",
        appUrl: '<YOUR_APP_URL>', // required for Trezor manifest
        email: '<YOUR_CONTACT_EMAIL>', // required for Trezor manifest
        rpcUrl: '<RPC_URL>'
      },
      {
        walletName: "ledger",
        rpcUrl: '<RPC_URL>'
      }
    ]
  },
  walletCheck: [
    { checkName: "connect" },
    { checkName: "accounts" },
    { checkName: "network" },
  ]
}

const onboard = Onboard(onboardConfig)

Details regarding the Trezor Manifest can be found here

There are some differences to note between Ledger and Trezor devices and how they operate within Onboard:

  • Ledger wallets can only load one address at a time and is noticeably slower when loading each account. There also isn't an included UI that guides the user to get the device ready to be connected. To solve this Onboard will display a wallet check modal that instructs the user:
    - to plug in their Ledger
    - to unlock their Ledger via the pin code
    - to have the Ethereum app open on their device
    - that Onboard is going to load their accounts and shows a spinner for indication of loading status

  • Both Ledger and Trezor lack UI's that allow the user to select which account they would like to use. An "accounts" wallet check module has been added to provide a UI that allows users to select an account they would like to use and also allows them the load/generate more accounts to select from. This module needs to be included in your wallet check array if you would like it to be a part of your onboarding flow:

const onboardConfig = {
  // ...other config options
  walletCheck: [
    { checkName: "connect" },
    { checkName: "accounts" }, // add new accounts module to onboarding
    { checkName: "network" },
  ]
}

This modal will only show if the user has selected a wallet of type "hardware" and will only show the first time the wallet check sequence is run.

A new method has also been added to the API called accountSelect. This method can be called at any time that you would like to show the account select modal. So you could hook up a button on your dapp's UI that calls this method:

<button onclick="onboard.accountSelect()">Switch Account</button>
  • Ledger wallets have two different derivation paths that accounts can be accessed/generated from, a "legacy" path and also a "Ledger Live" path that matches the BIP44 standard. Onboard will default to initially loading the first account from each path and then loading 5 accounts from each path when the "load more" button is clicked in the accounts modal. Trezor wallets only use the BIP44 standard path, so 1 account will be initially generated, and then an additional 10 accounts will be loaded when the "load more" button is clicked. More details on the ledger paths can be found here

Changelog:

  • Feature: Hardware Wallet Support (#208)
  • fix: add "jsonrpc: '2.0'" to sendAsync methods (#210)
  • Fix icon heights (#212)

MetaMask Mobile

18 Feb 23:40
2ea71ed
Compare
Choose a tag to compare

This release adds MetaMask as a valid mobile wallet and also includes a few minor bug fixes.

Changelog:

  • Add Metamask mobile support (#198)
  • Fix: Auto Wallet Select (#204)
  • Add key to wallet buttons (#205)
  • Only add scroll on mobile devices (#206)

Authereum Updates

07 Feb 04:48
f521451
Compare
Choose a tag to compare

This release updates to the latest Authereum SDK, passes the correct Authereum url property depending which network Onboard is configured with and also enables Authereum internal notifications with an option to disable them via a disableNotifications initialization property.

Thanks to @TomAFrench and @miguelmota for their contributions!

Changelog:

  • update authereum url depending on network (#195)
  • Made disabling Authereum notifications optional (#196)
  • Update authereum version (#186)

Minor bug fixes / improvements

05 Feb 06:22
5194d9e
Compare
Choose a tag to compare

Just a couple of small bug fixes and improvements in this release. The WalletConnect disconnect functionality works correctly now and resets the state. There was an error caused by calling unubscribe on a svelte store multiple times which has now been fixed. Lastly a url as been added to the Torus wallet module.

Changelog:

  • Improve disconnect for wallet connect (#189)
  • Remove unsubscribe call, isn't needed and errors due to being called multiple times (#190)
  • Add Torus URL (#191)
  • Refine the wallet reset functionality (#193)

Tor.us Wallet

29 Jan 05:06
6586f48
Compare
Choose a tag to compare

This release adds Tor.us wallet to the list supported wallets in Onboard. Check out the wallet module docs for more info on how to initialize it.

Also included in this release is a small fix that makes sure the address subscription callback is only called with an undefined value if a user logs out of their wallet.

Changelog:

  • feat: add Torus wallet (#161)
  • Make sure address sub is called only when changed (#184)
  • Add error for incorrect walletName parameter (#183)

Reset Wallet

21 Jan 03:46
0707d4c
Compare
Choose a tag to compare

This release adds a feature where you can reset the internal wallet state and disconnect from a wallet instance by calling onboard.walletReset().

The WalletConnect module was also modified to ensure that it is disconnecting properly when either the user disconnects from the session on their mobile device, or if the walletReset function was called.

Additionally the font-family is now correctly being inherited so that only one css over-ride is necessary to change the font.

Changelog:

  • Ensure all elements inherit font-family (#174)
  • Feature: Wallet Reset Function (#176)
  • Fix: WalletConnect Close (#178)

Status Wallet

20 Jan 03:52
0707d4c
Compare
Choose a tag to compare

This release sees the addition of Status IM wallet to list of included wallets.

A url parameter has also been added to the wallet object for SDK/embedded wallets to make it easier to display the wallets UI to user.

There is a small bug fix, where Onboard was recognizing chromebook laptops as a mobile device, which is now fixed.

Changelog:

  • Add url to wallet object (#164)
  • Cleanup unused code (#165)
  • Add Status IM (#166)
  • Better validation for chromebook desktop (#169)
  • Move all wallet icons in to wallet-icon folder (#171)

Bug Fixes

20 Dec 01:16
d8f4045
Compare
Choose a tag to compare

Just a couple of small bug fixes in this release.

Changelog:

  • Make sure balance subscription is only called when value changes (#157)
  • Show correct dialog when no wallet installed (#158)

Customize Wallet Label and Icons

12 Dec 05:33
81f52fb
Compare
Choose a tag to compare

This release has a couple of small features and a couple of small bugfixes. You can now customize the icon and the label for each wallet button, allowing a more flexible wallet select modal. Onboard now detects the OS of the user's device, allowing for wallets to be shown (or not shown) for specific operating systems.

Changelog:

  • Allow label and icon overrides for wallet modules (#153)
  • Added feature to set os exclusions for wallets (#151)
  • Fix incorrect resolve (#152)
  • Inherit font-family (#150)

Update SDK dependency

05 Dec 05:26
4e67ae5
Compare
Choose a tag to compare

A small release to update bnc-sdk.

Changelog:

  • Update sdk version (#144)