Files
TimandGitHub 7f3366c21e feat(mobile): enable connect wallet app option on signer import screen (#7545)
* feat: add appkit dependencies

* feat: add basic appkit config

* feat: add wallet configs for Rabby and Phantom to appKit configuration

* feat: update ImportSigners feature with new wallet connection options and replace Metamask image

- Added new ConnectWalletApp image for wallet connection.
- Removed Metamask image from the project.
- Enhanced ImportSignersContainer to support wallet connection via WalletConnect.
- Updated item descriptions and titles for clarity in the signer import process.
- Introduced new SignerType enum for better type management in signersSlice.

* fix: remove borderRadius from SafeCard component

* refactor: update SignerType to use string literals and clean up imports in ImportSignersContainer

- Replaced SignerType enum with string literals.
- Removed unused import of SignerType in ImportSignersContainer.
- Updated type assignment for wallet connection in ImportSignersContainer to use string literal 'walletconnect'.

* fix: update wallet-related images in mobile assets

Make gradient overlay transparent so it works on both light and dark mode

* refactor: streamline signer connection handling in ImportSignersContainer

- Updated the handling of signer connections to use a more concise approach with a single callback function.
- Removed the previous memoization of items and integrated the item definitions directly into the component.
- Enhanced the connection logic to include biometric checks for the seed signer option.

* fix: update minimum SDK version for Android in app configuration

* refactor: migrate from AsyncStorage to MMKV for improved storage performance

- Removed AsyncStorage dependency and replaced it with MMKV for better efficiency in data handling.
- Updated storage methods in appKit and Storybook configuration to utilize MMKV's API.

* refactor: simplify state management in ImportSignersContainer

- Removed unused selector for existing signer to streamline the connection logic.

* refactor: reorganize component hierarchy in RootLayout for improved readability

- Adjusted the order of providers in RootLayout to enhance clarity and maintainability.
- Moved AppKitProvider to be nested within the Provider for better context management.

* refactor: update type handling in appKit storage methods for improved type safety

- Changed generic type from 'any' to 'unknown' in getEntries, setItem, and getItem methods to enhance type safety.
- Updated parseEntry function to return a tuple with the correct type inference.

* chore: updare yarn.lock

* fix:  revert removal of `@react-native-async-storage/async-storage` dependency

It's needed by appkit

* refactor: replace base64 wallet icons with URLs in appKit configuration

- Removed base64 encoded icons for Phantom and Rabby wallets.
- Updated image URLs to point to hosted images for better performance and maintainability.
- Added new image files for the wallets in the web public images directory.
2026-03-27 16:11:51 +01:00

40 lines
1.4 KiB
JavaScript

// based on https://github.com/expo/config-plugins/issues/123#issuecomment-1746757954
const { AndroidConfig, withAndroidManifest, createRunOncePlugin } = require('expo/config-plugins')
const queries = {
package: [
{ $: { 'android:name': 'io.metamask' } },
{ $: { 'android:name': 'com.debank.rabbymobile' } },
{ $: { 'android:name': 'com.ledger.live' } },
{ $: { 'android:name': 'org.toshi' } },
{ $: { 'android:name': 'com.coinbase.android' } },
{ $: { 'android:name': 'com.okinc.okex.gp' } },
{ $: { 'android:name': 'com.wallet.crypto.trustapp' } },
{ $: { 'android:name': 'vip.mytokenpocket' } },
{ $: { 'android:name': 'app.phantom' } },
{ $: { 'android:name': 'me.rainbow' } },
{ $: { 'android:name': 'io.zerion.android' } },
{ $: { 'android:name': 'so.onekey.app.wallet' } },
{ $: { 'android:name': 'com.bitget.exchange' } },
{ $: { 'android:name': 'io.safepal.wallet' } },
{ $: { 'android:name': 'com.bybit.app' } },
],
}
/**
* @param {import('@expo/config-plugins').ExportedConfig} config
*/
const withAndroidManifestService = (config) => {
return withAndroidManifest(config, (config) => {
config.modResults.manifest = {
...config.modResults.manifest,
queries: [queries],
}
return config
})
}
module.exports = createRunOncePlugin(withAndroidManifestService, 'withAndroidManifestService', '1.0.0')