Skip to content
Compare
Choose a tag to compare
@github-actions github-actions released this 27 Nov 19:47
· 8 commits to master since this release
501c48f

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

    • Finalized efforts to ensure seamless support for Telegram and other in-app browsers, improving the user experience across mobile platforms.
    • Resolved deep linking issues with mobile wallets.
      (#1966 | commit)
    • Enhanced handling of pre-authorization services for mobile wallets.
      (#1999 | commit)
  • Mobile Wallet Notifications

    • Introduced UI notifications for pending WalletConnect requests, providing users with prompts to confirm actions on their mobile device.
      (#1970 | commit)
      Notification Screenshot

    • 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 helpers LOCAL_STORAGE and SESSION_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

    • Fixed an issue where the WalletConnect modal didn’t detect close events properly.
      (#1994 | commit)
  • Faster Transaction Status Polling

    • Reduced transaction status polling delay from 2 seconds to 1 second for quicker feedback.
      (#1989 | commit)
  • Fixed Prefixed Address Issue

    • Fixed an issue where the signer could not retrieve the correct signerIndex when preparing a payload due to prefixed addresses.
      (#2027 | commit)

📦 Dependency Updates