This release introduces exciting new features and important bug fixes to FCL 🎉. Highlights include improved mobile support, transaction error handling, and session persistence.
Please upgrade to the latest version to get access to the latest improvements by running the following command:
npm update @onflow/fcl
✨ New Features
-
Full Telegram In-App Browser Support
-
Mobile Wallet Notifications
-
Introduced UI notifications for pending WalletConnect requests, providing users with prompts to confirm actions on their mobile device.
(#1970 | commit)
-
Added a
walletconnect.disableNotifications
configuration option to turn off the notification UI if not required.
(#1970 | commit)If developers wish to disable these notifications, they can use the following snippet:
import {config} from "@onflow/fcl" config().put("walletconnect.disableNotifications", true)
-
-
Session Persistence
-
FCL now uses
localStorage
by default, with utility helpersLOCAL_STORAGE
andSESSION_STORAGE
added for customization.
(#2001 | commit)End users will no longer have to re-authenticate themselves with apps after switching tabs or closing browser windows. Developers do not need to make any changes to their application to realize these user experience benefits, as long as they have not set a custom
fcl.storage
configuration key.If developers do not want to include session persistence in their app, they may configure it as follows:
import {config, SESSION_STORAGE} from '@onflow/fcl' config().put("fcl.storage", SESSION_STORAGE)
-
-
Improved Error Handling
-
Added a new
TransactionError
type to handle failed transactions more effectively.
(#1893 | commit)Developers can use these error objects to more accurately handle and present transaction execution errors to end users as follows:
import {mutate, TransactionError} from '@onflow/fcl' mutate({...}).catch(e => { if (e instanceof TransactionError) { console.log({ code: e.code, type: e.type, message: e.message }) // e.g. { code: 1101, type: "CADENCE_RUNTIME_ERROR", message: "[Error Code: 1101] Cadence..." } })
-
⚙️ Other Improvements
-
WalletConnect Modal Behavior
-
Faster Transaction Status Polling
-
Fixed Prefixed Address Issue
📦 Dependency Updates
- Updated dependencies:
- @onflow/[email protected]
- @onflow/[email protected]
- @onflow/[email protected]
- @onflow/[email protected]
- @onflow/[email protected]
- @onflow/[email protected]
- @onflow/[email protected]
- @onflow/[email protected]
- @onflow/[email protected]
- @onflow/[email protected]
- @onflow/[email protected]
- @onflow/[email protected]
- @onflow/[email protected]
- @onflow/[email protected]