This repository was archived by the owner on Dec 11, 2024. It is now read-only.
v4.0.0 Release
Breaking changes
The Name
@celo-tools/use-contractkit became @celo/react-celo
The previous name had 3 issues we believe the new one addresses
- The library was often confused with @celo/contractkit.
useimplied it was just a react hook (no UI or Modal)contractkitimplied it was primarily about @celo/contractkit.
MiniContractKit
@celo/ContractKit@2.0.0 or later is required as useCelo now uses and returns a MiniContractKit instead of ContractKit. By not loading the wrappers and ABIs for all celo core contracts this cut the size of files imported from celo packages in half: From 73k gzipped to 36k gzipped.
Minor Breaking Changes
Networkis no longer an enum and so can’t be used a type
Backwards Compatible changes
useContractKitwas renamed touseCelo, but the alias still exists. It will be removed in v5ContractKitProviderwas renamed toCeloProvider, but the alias still exists. It will be removed in v5
New Features
- New UI
- New Theming API
- Search for Wallet
Networkname can now be any string (other chains can be used more easily)- On Mobile Browsers Link to MetamaskMobile now Opens dapp automatically
Minor New Features
- Add
supportsFeeCurrencyto connectors to show which actually will update feeCurrency - Add an optional
contractsCacheprop for dApps that were usingkit.contracts8973256 - Provide a way to see the version of react-celo used by a dapp
Bug Fixes
- Wallet Connections that don’t support paying for gas in other currencies no longer misleadingly allow setting feeCurrency.
- fix wallet connect android timeout issues
- Cancelling a connection request from the wallet should directly close QR code and show feedback
- In desktop browsers, misleading QR code modal description and action when selecting Valora
- Fix: Ledger Connector Failing to change networks
- Fix: Wallet-Connect-Connector sometimes failing initialisation
- Fix: Unable submit/sign transaction with Valora on iOS
Environment
- Add support for for react 18 https://github.com/celo-org/use-contractkit/pull/180/files#r871839105
- Now targets es6 in tsConfig
Dependency Changes
- Removes
react-loader-spinner - Removes
unstated-next - Replace
qrcode.reactwithqrcode - Adds
react-helmet - Upgrades
react-modal