Skip to content

Releases: TxnLab/use-wallet

2.1.1

11 Aug 14:12
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.1.0...v2.1.1

2.1.0

07 Aug 07:59
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.0.0...v2.1.0

2.0.0

27 Jun 22:31
Compare
Choose a tag to compare

What's Changed

  • Add unit tests by @drichar in #61
  • Update initializeProviders to be async by @drichar in #64
  • Update README by @drichar in #65, #80
  • Improved initializeProviders API by @drichar in #66
  • Fix infinite render loop in useInitializeProviders by @drichar in #82
  • WalletConnect 2.0 support by @drichar in #83
  • Fix "No matching export" error for WalletConnect peer dependencies by @drichar in #85
  • Fix default providers if none specified by @drichar in #86
  • providers property in useInitializeProviders hook defaults to empty array by @drichar in 96dc625
  • Replace @walletconnect/sign-client with @web3modal/sign-html by @drichar in #87
  • Debug mode by @drichar in #89
  • Static imports are required by @drichar in #90

Breaking Changes

This introduces breaking changes for some provider configuration patterns which are no longer supported. See the updated README for more details and code examples.

Peer dependencies must be statically imported

Wallet provider peer dependencies (SDK/client libraries) are no longer dynamically imported behind the scenes. The modules must be statically imported and passed to the clientStatic property when initializing the provider.

If a provider has an SDK, it must be initialized with an object where the id and clientStatic properties are required. Passing just the PROVIDER_ID.* string enum will fail. Defly, Pera, Daffi, WalletConnect, and MyAlgo must be initialized this way.

Default provider configuration

You can no longer call useInitializeProviders with no arguments or an empty array for providers to initialize a "default" provider configuration. All providers you wish to support must be explicitly defined.

initializeProviders function no longer exported

The function used to initialize providers in use-wallet 1.x is no longer exported by the library. Make sure you're using the useInitializeProviders hook or manually constructing the wallet providers map that gets passed to the WalletProvider.

Install

npm install @txnlab/use-wallet

Full Changelog: v1.3.3...v2.0.0

2.0.0-rc.1

27 Jun 16:44
Compare
Choose a tag to compare
2.0.0-rc.1 Pre-release
Pre-release

What's Changed

  • chore(deps): update dependency gh-pages to v5 by @renovate in #76
  • TXN-1413: Remove unused dependencies, fix warnings by @drichar in #91
  • chore(deps): update all non-major dependencies by @renovate in #62
  • chore(deps): update dependency @testing-library/react to v14 by @renovate in #74
  • chore(deps): update dependency babel-loader to v9 by @renovate in #75
  • TXN-1414: Refactor InitParams type, tidy up provider class imports by @drichar in #92
  • TXN-1408: Switch to @walletconnect/modal-sign-html by @drichar in #93

Install

npm install @txnlab/use-wallet@next

Breaking Changes

@walletconnect/modal-sign-html

The deprecated @web3modal/sign-html package will no longer work. It should be uninstalled and @walletconnect/modal-sign-html must be installed.

npm uninstall @web3modal/sign-html
npm install @walletconnect/modal-sign-html
- import { Web3ModalSign } from '@web3modal/sign-html'
+ import { WalletConnectModalSign } from '@walletconnect/modal-sign-html'
const providers = useInitializeProviders({
  providers: [
    {
      id: PROVIDER_ID.WALLETCONNECT,
-     clientStatic: Web3ModalSign,
+     clientStatic: WalletConnectModalSign,
      clientOptions: {
        projectId: '<YOUR_PROJECT_ID>',
        metadata: {
          name: 'Example Dapp',
          description: 'Example Dapp',
          url: '#',
          icons: ['https://walletconnect.com/walletconnect-logo.png']
        }
      }
    }
    // other providers...
  ]
})

algosdk@latest

It's recommended that you upgrade to the latest algosdk version. If your app uses TypeScript and you're importing the SDK statically by setting algosdkStatic, you will see a type error if you're not on the latest version.

npm install algosdk@latest

New Contributors

Full Changelog: v2.0.0-alpha.5...v2.0.0-rc.1

2.0.0-alpha.5

26 Jun 17:34
Compare
Choose a tag to compare
2.0.0-alpha.5 Pre-release
Pre-release

What's Changed

Breaking Changes

This introduces breaking changes for some provider configuration patterns which are no longer supported. See the updated README for more details and code examples.

Peer dependencies must be statically imported

Wallet provider peer dependencies (SDK/client libraries) are no longer dynamically imported behind the scenes. The modules must be statically imported and passed to the clientStatic property when initializing the provider.

If a provider has an SDK, it must be initialized with an object where the id and clientStatic properties are required. Passing just the PROVIDER_ID.* string enum will fail. Defly, Pera, Daffi, WalletConnect, and MyAlgo must be initialized this way.

Default provider configuration

You can no longer call useInitializeProviders with no arguments or an empty array for providers to initialize a "default" provider configuration. All providers you wish to support must be explicitly defined.

initializeProviders function no longer exported

The function used to initialize providers in use-wallet 1.x is no longer exported by the library. Make sure you're using the useInitializeProviders hook or manually constructing the wallet providers map that gets passed to the WalletProvider.

Full Changelog: v2.0.0-alpha.4...v2.0.0-alpha.5

1.3.3

24 Jun 17:36
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.3.2...v1.3.3

2.0.0-alpha.4

23 Jun 08:54
Compare
Choose a tag to compare
2.0.0-alpha.4 Pre-release
Pre-release

What's Changed

Full Changelog: v2.0.0-alpha.3...v2.0.0-alpha.4

2.0.0-alpha.3

22 Jun 23:42
Compare
Choose a tag to compare
2.0.0-alpha.3 Pre-release
Pre-release

What's Changed

  • Replace @walletconnect/sign-client with @web3modal/sign-html by @drichar in #87

Full Changelog: v2.0.0-alpha.2...v2.0.0-alpha.3

2.0.0-alpha.2

22 Jun 03:39
Compare
Choose a tag to compare
2.0.0-alpha.2 Pre-release
Pre-release

What's Changed

  • Fix default providers if none specified by @drichar in #86
  • providers property in useInitializeProviders hook defaults to empty array by @drichar in 96dc625

Full Changelog: v2.0.0-alpha.1...v2.0.0-alpha.2

2.0.0-alpha.1

21 Jun 19:14
Compare
Choose a tag to compare
2.0.0-alpha.1 Pre-release
Pre-release

What's Changed

  • Fix "No matching export" error for WalletConnect peer dependencies by @drichar in #85

Full Changelog: v2.0.0-alpha.0...v2.0.0-alpha.1