web3-onboard

Client library to onboard users to web3 apps

MIT License

Downloads
95.9K
Stars
844
Committers
174
web3-onboard - WalletConnect Update

Published by aaronbarnardsound over 4 years ago

Just a small release to update the WalletConnect dependency to the latest version which adds Trust wallet to the mobile to mobile connection screen among other things. Link the latest WalletConnect release notes here

Changelog:

  • Update WalletConnect dependency (#387)
web3-onboard - WalletConnect Mobile

Published by aaronbarnardsound over 4 years ago

This release updates to the latest WalletConnect version, adding mobile to mobile connection. The xDai network has also been added as a valid network.

Changelog:

  • Feature: Update WalletConnect (#380)
  • Fix: Wallet Subscription (#381)
  • Fix: Hardware Wallet Reset (#383)
  • Feature: xDai Network (#385)
web3-onboard - Various Fixes

Published by aaronbarnardsound over 4 years ago

This release just has a few small fixes. One notable change is the z-index property has been removed from all of the modals as it made the onboard connect modal appear in front of the Torus login modal. If you would like to restore the z-index setting from previous releases, then you can add the following to your css:

.bn-onboard-custom.bn-onboard-modal {
  z-index: 99;
}

Changelog:

  • Fix: Interface Type Mistake (#370)
  • Fix: Wallet Validation (#374)
  • Enhancement: Authereum Popup Option (#375)
  • Fix: Modal z-index (#376)
web3-onboard - Authereum Options

Published by aaronbarnardsound over 4 years ago

This release has a couple of small changes. First the Authereum wallet module now exposes all of the Authereum initialization options, notably the new apiKey option.

The other included change is to add a class to a centered position button in the wallet select and wallet check modals so that it can be easily targeted for custom styling.

Changelog:

  • Feature: Expose all Authereum init options (#366)
  • Fix: Button Class (#368)
web3-onboard - Ledger Fix

Published by aaronbarnardsound over 4 years ago

Just a small release to fix a bug that affected Ledger hardware wallets when trying to connect to the Ledger Live path.

Changelog:

  • Fix: Ledger Live Transport (#363)
web3-onboard - Authereum Update

Published by aaronbarnardsound over 4 years ago

A small release that updates the Authereum dependency to allow Authereum to work in Rollup builds and to fix a small memory leak when the Authereum instance is destroyed.

Changelog:

  • Enhancement: Update Authereum Dependency (#360)
web3-onboard - Fortmatic Dashboard

Published by aaronbarnardsound over 4 years ago

Just a small release to add the dashboard function to the Fortmatic wallet module and to fix the Coinbase wallet logo not rendering correctly.

Changelog:

  • Enhancement: Add Fortmatic Dashboard (#356)
  • Fix: Coinbase Logo
web3-onboard - Assorted Fixes

Published by aaronbarnardsound over 4 years ago

This release just has a few small fixes and enhancements.

In Electron apps, selecting Ledger wallet would leave the UI hanging if the device wasn't connected and unlocked. A fix was added so that the Ledger transport is initialized at a later time allowing it to be selected without having it connected.

The wallet check modals weren't able to be customized due to some incorrect validation logic. That has now been fixed so that you can now customize the following in the wallet check initialization objects:

import Onboard from 'bnc-onboard'

const onboard = Onboard({
  walletCheck: [
    { 
       checkName: 'connect',
       heading: 'Your Custom Heading',
       description: 'Your custom description',
       icon: 'Your custom icon string',
       html: '<p>Some extra custom markup that will be displayed under the description</p>' ,
       button: {
         text: 'Custom button text',
         onclick: () => alert('You clicked the custom button')
       }
    },
    { checkName: 'network' },
    { checkName: 'balance', minimumBalance: '100000' },
  ]
})

Changelog:

  • Fix: Ledger Transport (#350)
  • Fix: Wallet Check Customization (#351)
  • Fix: Ledger Transport Disconnect (#352)
  • Enhancement: Modal Button Styles (#353)
  • Fix: Add Extra Wallet Check Customization (#354)
web3-onboard - WalletLink

Published by aaronbarnardsound over 4 years ago

This release adds WalletLink to the list of wallet modules that Onboard supports out of the box. To add wallet link to your app, just add the following wallet initialization object to your Onboard config wallets array:

//... other config options
walletSelect: {
  wallets: [
    { walletName: 'walletLink', rpcUrl: '<RPC_URL>' }
  ]
}

Also included in this release is the Trezor Connect library has been updated to v8 which includes a fix that will allow it to work in Electron apps.

Changelog:

  • Enhancement: Update SDK (#341)
  • Enhancement: Trezor Connect Update (#343)
  • Feature: WalletLink (#344)
web3-onboard - Optional dappId

Published by aaronbarnardsound over 4 years ago

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)
web3-onboard - Fix TypeScript Definitions

Published by aaronbarnardsound over 4 years ago

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)
web3-onboard - WalletConnect Improvements

Published by aaronbarnardsound over 4 years ago

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)
web3-onboard - WalletConnect Options

Published by aaronbarnardsound over 4 years ago

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
web3-onboard - Internal Change

Published by aaronbarnardsound over 4 years ago

Just a small internal change in this release.

Changelog:

  • Add apiUrl as init option (#306)
web3-onboard - Better Typescript Definitions

Published by aaronbarnardsound over 4 years ago

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
web3-onboard - Update WalletConnect Dependency

Published by aaronbarnardsound over 4 years ago

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)
web3-onboard - Performance Enhancements

Published by aaronbarnardsound over 4 years ago

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
web3-onboard - Hardware Wallet Sign Message

Published by aaronbarnardsound over 4 years ago

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)
web3-onboard - imToken Wallet

Published by aaronbarnardsound over 4 years ago

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)
web3-onboard - Dashboard Function

Published by aaronbarnardsound over 4 years ago

The wallet object that the wallet subscription callback is called with now has a dashboard parameter instead of the url parameter. The url parameter was a String that is used to open a new window that would load the dashboard for SDK wallets. To make this more flexible we have changed this to dashboard and to a Function type so that if a SDK wallet has a function on the instance that will load the dashboard in the same window, then that can be called.

So if you are utilizing the url parameter in you code currently, you will need to make the following changes:

// you might have a button that when clicked runs this onclick function...
// current code using url parameter
function onclick() {
  if (wallet.type === 'sdk') {
    wallet.url && window.open(wallet.url)
  }
}

// new code using dashboard parameter
function onclick() {
  if (wallet.type === 'sdk') {
    wallet.dashboard && wallet.dashboard()
  }
}

Also included in this release are a couple of small bug fixes via updates to both the Authereum and Unilogin dependencies.

Changelog:

  • make state not updated after interval cancelled (#275)
  • Update authereum and use destroy method (#277)
  • Enhancement: Wallet Settings (#280)
  • Update UniLogin (#281)