Releases: TxnLab/use-wallet
2.1.1
2.1.0
What's Changed
- Enable dynamic import of wallet libraries by @stefanofa in #100
- Automate release workflow by @drichar in #102
New Contributors
- @stefanofa made their first contribution in #100
Full Changelog: v2.0.0...v2.1.0
2.0.0
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 inuseInitializeProviders
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
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
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
2.0.0-alpha.4
2.0.0-alpha.3
What's Changed
Full Changelog: v2.0.0-alpha.2...v2.0.0-alpha.3
2.0.0-alpha.2
What's Changed
- Fix default providers if none specified by @drichar in #86
providers
property inuseInitializeProviders
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
What's Changed
Full Changelog: v2.0.0-alpha.0...v2.0.0-alpha.1