Skip to content

Releases: blocknative/web3-onboard

Optional dappId

08 May 01:44
d547aa6
Compare
Choose a tag to compare

This release makes the dappId in the initialization object an optional parameter, so that Onboard.js can be used without an API key. By including a dappId then you opt in to additional features:

  • App onboarding chart analytics that are accessible via your account dashboard
  • Connection to the Blocknative infrastructure which removes the need for Onboard to poll the provider to keep an accurate balance state as it can just retrieve the balance after it gets notified of a transaction event on the current account.

If a dappId is not included in the initialization object, then "Powered by Blocknative" will be displayed on the bottom of each modal by default. If you would like to hide this branding, you can set an additional initialization parameter hideBranding: true to remove it.

If you have included a dappId but you would still like the Blocknative branding to be displayed, then set hideBranding: false.

Changelog:

  • Enhancement: Update Authereum (#335)
  • Enhancement: Optional dappId (#337)
  • Enhancement: Branding Styling Tweaks (#338)

Fix TypeScript Definitions

04 May 07:00
e5d8fa5
Compare
Choose a tag to compare

This release is mostly to update and fix the TypeScript definitions to be accurate. The bnc-sdk dependency has been updated and Eslint has been added to the codebase.

Changelog:

  • Fix: TypeScript Definitions (#327)
  • Enhancement: Add Eslint and Format (#328)
  • Enhancement: Update bnc-sdk Dependency (#329)
  • Fix: Moment.js Resolution (#331)

WalletConnect Improvements

24 Apr 05:21
75265e1
Compare
Choose a tag to compare

This release adds an enhancement so that the balance subscription works correctly for WalletConnect by creating a provider specifically to request the balance. There is also a fix so that regular web3 requests work correctly with the provider.

A few changes have been made so that Onboard is compatible with Rollup.js builds. The only current exceptions are that Ledger, Trezor and Authereum cannot be included in the Onboard configuration for a successful build. This is due to the node crypto module being needed in the global namespace, which is currently problematic (not possible?) due to Rollup not officially supporting node builtins through their plugin ecosystem and the user created plugins haven't been maintained for years. Hopefully this will change in the future and we will update our recommendations accordingly.

The hardware wallet modules are now fully dynamically imported for smaller bundle sizes served to users 😄

Changelog:

  • Enhancement: Hardware Wallet Dynamic Import (#315)
  • Fix: WalletConnect Version (#320)
  • Enhancement: WalletConnect Balance (#321 )
  • Fix: Wallet Store Reset (#322)

WalletConnect Options

21 Apr 22:04
a6e5273
Compare
Choose a tag to compare

Just a small release to add some more options to the WalletConnect module. You can now pass in a rpc url endpoint and your own bridge url and that will be passed on to the WalletConnect provider when it is instantiated.

Also included is a fix for a bug for the WalletConnect module where it wouldn't show the QR code as Onboard is waiting on the address promise to resolve, but with WalletConnect it hangs. So timeout has been added to makes sure that it always eventually resolves.

Changelog:

  • Enhancement: WalletConnect Options (#311)
  • Fix: WalletConnect Resolve (#312)
  • bump torus

Internal Change

16 Apr 03:24
a8398dc
Compare
Choose a tag to compare

Just a small internal change in this release.

Changelog:

  • Add apiUrl as init option (#306)

Better Typescript Definitions

14 Apr 06:37
1218529
Compare
Choose a tag to compare

This release fixes some of the typescript definitions to be more accurate, specifically the wallet object that the wallet subscription is called with.

Also included is a couple of small fixes. The Ledger wallet module that was causing an error in Electron apps which has been fixed and the wallet check timeout that defines whether a loading spinner will be shown has been extended.

Changelog:

  • Fix: TypeScript Wallet Definition (#299)
  • Fix: Extend loading timeout (#301)
  • Fix: Ledger transport close

Update WalletConnect Dependency

09 Apr 23:58
ab47062
Compare
Choose a tag to compare

This release includes an update to the WalletConnect dependency, which has a reduced bundle size.

Also included is a UI update so that when performing wallet checks, the loading spinner will only show after a delay of 150ms. This prevents the loading spinner from flashing on screen for a brief moment when the user's wallet is in the correct state already, making for a better UX.

"Checking wallet" text has also been added to the loading spinner to better inform the user.

Changelog:

  • Enhancement: Update WalletConnect dependency (#295)
  • Enhancement: Wallet Check Loading (#296)

Performance Enhancements

09 Apr 04:03
4435f43
Compare
Choose a tag to compare

This release includes a few small performance enhancements so that calls to walletSelect and walletCheck` resolve significantly quicker in some scenarios.

Changelog:

  • Enhancement: Remove UI transitions when no UI is shown

Hardware Wallet Sign Message

07 Apr 22:51
6630eb5
Compare
Choose a tag to compare

This release adds the ability to sign messages on Ledger and Trezor wallets:

// using web3.js
const result = await web3.eth.sign('TESTING TESTING 123', address)

// using ethers.js
const result = await signer.signMessage('TESTING TESTING 123')

// using the provider directly
const message = `0x${new Buffer('TESTING TESTING 123').toString('hex')}`
wallet.provider.send(
  {
    jsonrpc: '2.0',
    method: 'eth_sign',
    params: [address, message],
    id: 42
  },
  console.log
)

Changelog:

  • Enhancement: Hardware Sign Message (#288)

imToken Wallet

07 Apr 04:59
077d561
Compare
Choose a tag to compare

This release adds support for imToken wallet. The imToken provider does not support eth_balance rpc calls, so if you would like the balance subscription to work as it does on other wallets you will need to pass in an optional rpcUrl into the wallet initialization object:

const config = {
  // ...other config options
  walletSelect: {
    wallets: [
      { walletName: 'imToken', rpcUrl: '<RPC_ENDPOINT>' }
    ]
  }
}

const onboard = Onboard(config)

If you don't pass in a rpcUrl the wallet will function as normal, but the balance subscription will never get updated as it will have no way of getting access to the wallet's balance.

Also included in this release is a change to the Trust wallet module to allow the same functionality for wallet balance as the Trust wallet provider also doesn't allow eth_balance rpc calls. So you can now pass in an rpcUrl to the Trust wallet initialization object for balance updates:

const config = {
  // ...other config options
  walletSelect: {
    wallets: [
      { walletName: 'trust', rpcUrl: '<RPC_ENDPOINT>' }
    ]
  }
}

const onboard = Onboard(config)

NOTE: When you pass in the rpcUrl it will be for the network that your app is running on, so when the balance subscription is called, the balance value will reflect the balance of that address on the network that your app is running on not necessarily the network that the user's wallet is connected to.

Changelog:

  • Feature: imtoken wallet (#284)
  • Enhancement: Trust Balance (#286)