Skip to content

17.0.0

Choose a tag to compare

@github-actions github-actions released this 24 Feb 21:05
37195e4

@metamask/connect-evm 0.5.0

Changed

  • BREAKING Standardize chainId to use Hex format throughout the public API (#150)
    • connect(), connectAndSign(), and connectWith() now expect chainIds as hex strings instead of decimal numbers
    • connect() now returns { accounts, chainId: Hex } instead of { accounts, chainId: number }
    • switchChain() now expects chainId: Hex instead of chainId: number | Hex
    • createEVMClient() param option api.supportedNetworks now expects hex chain IDs as keys (e.g., '0x1') instead of CAIP chain IDs
    • Event handler types for connectAndSign and connectWith now use Hex for chainId
  • BREAKING getInfuraRpcUrls now returns a rpc url map keyed by hex chain ID rather than CAIP Chain ID (#152)
  • The debug option param used by createEVMClient() now enables console debug logs of the underlying MultichainClient instance (#149)
  • update connect() and createEVMClient() typings to be more accurate (#153)
  • update switchChain() to return Promise<void> (#153)
  • Make ConnectEvm rely on wallet_sessionChanged events from ConnectMultichain rather than explicit connect/disconnect events (#157)
  • Chain add/switch deeplink now calls openSimpleDeeplinkIfNeeded() instead of openDeeplinkIfNeeded() to align with @metamask/connect-multichain changes (#176)

Fixed

  • Fix display_uri and wallet_sessionChanged events not firing after disconnect and reconnect in headless mode (#170)

@metamask/connect-multichain 0.6.0

Added

  • When ConnectMultichain.connect() is called while a connection is already pending, the user is re-prompted with the pending connection deeplink. (#176)

Changed

  • BREAKING createMultichainClient() now returns a singleton. Any incoming constructor params on subsequent calls to createMultichainClient() will be applied to the existing singleton instance except for the dapp, storage, and ui.factory param options. (#157)
  • BREAKING ConnectMultichain.openDeeplinkIfNeeded() is renamed to openSimpleDeeplinkIfNeeded() (#176)
  • ConnectMultichain.connect() now throws an 'Existing connection is pending. Please check your MetaMask Mobile app to continue.' error if there is already an pending connection attempt. Previously it would abort that ongoing connection in favor of a new one. (#157)
  • ConnectMultichain.connect() adds newly requested scopes and accounts onto any existing permissions rather than fully replacing them. (#157)
  • ConnectMultichain.disconnect() accepts an optional array of scopes. When provided, only those scopes will be revoked from the existing permissions. If no scopes remain after a partial revoke, then the underly connection is fully discarded. If no scopes are specified ()[]), then all scopes will be removed. By default all scopes will be removed. (#157)

Fixed

  • ConnectMultichain now waits 10 seconds (rather than 2 minutes) when attempting to resume a pending connection on initial instantiation via createMultichainClient() (#175)
  • Fix beforeunload event listener not being properly removed on disconnect due to .bind() creating different function references, causing a listener leak on each connect/disconnect cycle (#170)
  • Rename StoreAdapterWeb.DB_NAME from mmsdk to mmconnect to prevent IndexedDB collisions when the legacy MetaMask SDK and MM Connect run in the same browser context (#177)
  • Clean up stale MWP session from KVStore on connection rejection so subsequent QR code connection attempts are not blocked (#180)
  • Fix bug with JSON-RPC requests where previously used id value could be re-used causing the wallet to ignore the request when a dapp was refreshed/reloaded. (#183)

@metamask/connect-solana 0.2.0

Added

  • Add node.js builds #169

Changed

  • BREAKING: Automatically register as MetaMask to Solana Wallet Standard registry upon instantiation - with option to skip auto-registration #178 (#179)

@metamask/browser-playground 0.3.0

Added

  • Add disconnect buttons to cards (#157)
  • Add data-testid attributes to Solana components (#174)
  • Add data-testid attributes to Legacy EVM and Wagmi disconnect buttons (#174)

Changed

  • Patch @solana/wallet-adapter-react to work with android native browser (#174)
  • Remove manual registration of connect-solana (#178)
  • Bump workspace dependencies:
    • @metamask/connect-evm@0.5.0
    • @metamask/connect-multichain@0.6.0
    • @metamask/connect-solana@0.2.0

Removed

  • Remove the explicit ActiveProviderStorage pattern. Now all providers (cards) are "Active" even without user input to connect to a specific ecosystem (#157)

Fixed

  • Fixes EVM Provider setChainId and setAccounts to also use the connect event (#157)
  • Multichain Card and button properly reflect initial instantiation connecting status (#157)

@metamask/react-native-playground 0.1.2

Changed

  • Add Metro bundler configuration with Node.js module shims to support APK bundling (#182)
  • Enable unstable_transformImportMeta in Babel config for import.meta support in dependencies (#182)
  • Set explicit Android package identifier for APK builds (#182)
  • Add dotenv and readable-stream as dev dependencies for Metro config (#182)
  • Bump workspace dependencies:
    • @metamask/connect-evm@0.5.0
    • @metamask/connect-multichain@0.6.0

Fixed

  • Make sure Multichain UI card is rendered after Multichain connection established by aligning the SDKProvider with the browser playground's event-emitter pattern, broken after merging in Connect Multichain Singleton PR which caused the React Native SDKProvider's transport.onNotification callback to be silently dropped, preventing session and status updates from ever reaching the UI (#181)
  • Fix JSON parse error on startup by replacing createSyncStoragePersister with createAsyncStoragePersister for React Native's async AsyncStorage API (#182)
  • Fix Connect (Multichain) button not rendering by correcting useSDK() destructuring (state -> status: state) (#182)