@reown/appkit-react-native 0.0.0-feat-multichain-20250801190527 → 0.0.0-feat-multichain-20250805142032
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/AppKit.js.map +1 -1
- package/lib/commonjs/connectors/WalletConnectConnector.js +13 -1
- package/lib/commonjs/connectors/WalletConnectConnector.js.map +1 -1
- package/lib/commonjs/hooks/useAppKitEvents.js.map +1 -1
- package/lib/commonjs/hooks/useProvider.js +29 -10
- package/lib/commonjs/hooks/useProvider.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-account-activity/index.js +5 -5
- package/lib/commonjs/partials/w3m-account-activity/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-account-tokens/index.js +4 -4
- package/lib/commonjs/partials/w3m-account-tokens/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-account-wallet-features/index.js +5 -5
- package/lib/commonjs/partials/w3m-account-wallet-features/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-all-wallets-search/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-body/index.js +2 -2
- package/lib/commonjs/partials/w3m-connecting-body/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-mobile/index.js +6 -6
- package/lib/commonjs/partials/w3m-connecting-mobile/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-qrcode/index.js +23 -3
- package/lib/commonjs/partials/w3m-connecting-qrcode/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-web/index.js +4 -4
- package/lib/commonjs/partials/w3m-connecting-web/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-placeholder/index.js +5 -5
- package/lib/commonjs/partials/w3m-placeholder/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-selector-modal/index.js +2 -2
- package/lib/commonjs/partials/w3m-selector-modal/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-send-input-token/index.js +2 -2
- package/lib/commonjs/partials/w3m-send-input-token/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-swap-input/index.js +2 -2
- package/lib/commonjs/partials/w3m-swap-input/index.js.map +1 -1
- package/lib/commonjs/types.js +6 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/commonjs/views/w3m-account-default-view/components/auth-buttons.js +2 -2
- package/lib/commonjs/views/w3m-account-default-view/components/auth-buttons.js.map +1 -1
- package/lib/commonjs/views/w3m-account-default-view/index.js +15 -15
- package/lib/commonjs/views/w3m-account-default-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-all-wallets-view/index.js +1 -1
- package/lib/commonjs/views/w3m-all-wallets-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/components/recent-wallet-list.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/components/social-login-list.js +4 -4
- package/lib/commonjs/views/w3m-connect-view/components/social-login-list.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/index.js +7 -7
- package/lib/commonjs/views/w3m-connect-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-external-view/index.js +2 -2
- package/lib/commonjs/views/w3m-connecting-external-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-social-view/index.js +2 -2
- package/lib/commonjs/views/w3m-connecting-social-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-get-wallet-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-network-switch-view/index.js +2 -2
- package/lib/commonjs/views/w3m-network-switch-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-checkout-view/index.js +15 -15
- package/lib/commonjs/views/w3m-onramp-checkout-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-settings-view/components/Country.js +4 -4
- package/lib/commonjs/views/w3m-onramp-settings-view/components/Country.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-settings-view/index.js +4 -4
- package/lib/commonjs/views/w3m-onramp-settings-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-settings-view/utils.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-transaction-view/index.js +5 -5
- package/lib/commonjs/views/w3m-onramp-transaction-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/components/Currency.js +2 -2
- package/lib/commonjs/views/w3m-onramp-view/components/Currency.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/components/CurrencyInput.js +2 -2
- package/lib/commonjs/views/w3m-onramp-view/components/CurrencyInput.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/components/PaymentButton.js +4 -4
- package/lib/commonjs/views/w3m-onramp-view/components/PaymentButton.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/components/PaymentMethod.js +2 -2
- package/lib/commonjs/views/w3m-onramp-view/components/PaymentMethod.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/components/Quote.js +4 -4
- package/lib/commonjs/views/w3m-onramp-view/components/Quote.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/components/SelectPaymentModal.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-swap-view/components/select-token-view/utils.js.map +1 -1
- package/lib/commonjs/views/w3m-swap-view/index.js +3 -3
- package/lib/commonjs/views/w3m-swap-view/index.js.map +1 -1
- package/lib/module/AppKit.js.map +1 -1
- package/lib/module/connectors/WalletConnectConnector.js +13 -1
- package/lib/module/connectors/WalletConnectConnector.js.map +1 -1
- package/lib/module/hooks/useAppKitEvents.js.map +1 -1
- package/lib/module/hooks/useProvider.js +30 -10
- package/lib/module/hooks/useProvider.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/partials/w3m-account-activity/index.js +5 -5
- package/lib/module/partials/w3m-account-activity/index.js.map +1 -1
- package/lib/module/partials/w3m-account-tokens/index.js +4 -4
- package/lib/module/partials/w3m-account-tokens/index.js.map +1 -1
- package/lib/module/partials/w3m-account-wallet-features/index.js +5 -5
- package/lib/module/partials/w3m-account-wallet-features/index.js.map +1 -1
- package/lib/module/partials/w3m-all-wallets-list/index.js.map +1 -1
- package/lib/module/partials/w3m-all-wallets-search/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-body/index.js +2 -2
- package/lib/module/partials/w3m-connecting-body/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-mobile/index.js +6 -6
- package/lib/module/partials/w3m-connecting-mobile/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-qrcode/index.js +24 -4
- package/lib/module/partials/w3m-connecting-qrcode/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-web/index.js +4 -4
- package/lib/module/partials/w3m-connecting-web/index.js.map +1 -1
- package/lib/module/partials/w3m-placeholder/index.js +5 -5
- package/lib/module/partials/w3m-placeholder/index.js.map +1 -1
- package/lib/module/partials/w3m-selector-modal/index.js +2 -2
- package/lib/module/partials/w3m-selector-modal/index.js.map +1 -1
- package/lib/module/partials/w3m-send-input-token/index.js +2 -2
- package/lib/module/partials/w3m-send-input-token/index.js.map +1 -1
- package/lib/module/partials/w3m-swap-input/index.js +2 -2
- package/lib/module/partials/w3m-swap-input/index.js.map +1 -1
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/utils/HelpersUtil.js.map +1 -1
- package/lib/module/utils/NetworkUtil.js.map +1 -1
- package/lib/module/views/w3m-account-default-view/components/auth-buttons.js +2 -2
- package/lib/module/views/w3m-account-default-view/components/auth-buttons.js.map +1 -1
- package/lib/module/views/w3m-account-default-view/index.js +15 -15
- package/lib/module/views/w3m-account-default-view/index.js.map +1 -1
- package/lib/module/views/w3m-all-wallets-view/index.js +1 -1
- package/lib/module/views/w3m-all-wallets-view/index.js.map +1 -1
- package/lib/module/views/w3m-connect-view/components/all-wallet-list.js.map +1 -1
- package/lib/module/views/w3m-connect-view/components/custom-wallet-list.js.map +1 -1
- package/lib/module/views/w3m-connect-view/components/recent-wallet-list.js.map +1 -1
- package/lib/module/views/w3m-connect-view/components/social-login-list.js +4 -4
- package/lib/module/views/w3m-connect-view/components/social-login-list.js.map +1 -1
- package/lib/module/views/w3m-connect-view/index.js +7 -7
- package/lib/module/views/w3m-connect-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-external-view/index.js +2 -2
- package/lib/module/views/w3m-connecting-external-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-social-view/index.js +2 -2
- package/lib/module/views/w3m-connecting-social-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-view/index.js.map +1 -1
- package/lib/module/views/w3m-get-wallet-view/index.js.map +1 -1
- package/lib/module/views/w3m-network-switch-view/index.js +2 -2
- package/lib/module/views/w3m-network-switch-view/index.js.map +1 -1
- package/lib/module/views/w3m-onramp-checkout-view/index.js +15 -15
- package/lib/module/views/w3m-onramp-checkout-view/index.js.map +1 -1
- package/lib/module/views/w3m-onramp-settings-view/components/Country.js +4 -4
- package/lib/module/views/w3m-onramp-settings-view/components/Country.js.map +1 -1
- package/lib/module/views/w3m-onramp-settings-view/index.js +4 -4
- package/lib/module/views/w3m-onramp-settings-view/index.js.map +1 -1
- package/lib/module/views/w3m-onramp-settings-view/utils.js.map +1 -1
- package/lib/module/views/w3m-onramp-transaction-view/index.js +5 -5
- package/lib/module/views/w3m-onramp-transaction-view/index.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/components/Currency.js +2 -2
- package/lib/module/views/w3m-onramp-view/components/Currency.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/components/CurrencyInput.js +2 -2
- package/lib/module/views/w3m-onramp-view/components/CurrencyInput.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/components/PaymentButton.js +4 -4
- package/lib/module/views/w3m-onramp-view/components/PaymentButton.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/components/PaymentMethod.js +2 -2
- package/lib/module/views/w3m-onramp-view/components/PaymentMethod.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/components/Quote.js +4 -4
- package/lib/module/views/w3m-onramp-view/components/Quote.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/components/SelectPaymentModal.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/index.js.map +1 -1
- package/lib/module/views/w3m-swap-view/components/select-token-view/index.js.map +1 -1
- package/lib/module/views/w3m-swap-view/components/select-token-view/utils.js.map +1 -1
- package/lib/module/views/w3m-swap-view/index.js +3 -3
- package/lib/module/views/w3m-swap-view/index.js.map +1 -1
- package/lib/typescript/AppKit.d.ts +2 -25
- package/lib/typescript/AppKit.d.ts.map +1 -1
- package/lib/typescript/connectors/WalletConnectConnector.d.ts +1 -1
- package/lib/typescript/connectors/WalletConnectConnector.d.ts.map +1 -1
- package/lib/typescript/hooks/useAppKitEvents.d.ts +4 -3
- package/lib/typescript/hooks/useAppKitEvents.d.ts.map +1 -1
- package/lib/typescript/hooks/useProvider.d.ts +28 -1
- package/lib/typescript/hooks/useProvider.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-all-wallets-list/index.d.ts +1 -1
- package/lib/typescript/partials/w3m-all-wallets-list/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-all-wallets-search/index.d.ts +1 -1
- package/lib/typescript/partials/w3m-all-wallets-search/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-connecting-header/index.d.ts +1 -1
- package/lib/typescript/partials/w3m-connecting-header/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-connecting-qrcode/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-swap-input/index.d.ts +1 -1
- package/lib/typescript/partials/w3m-swap-input/index.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +156 -0
- package/lib/typescript/types.d.ts.map +1 -0
- package/lib/typescript/utils/HelpersUtil.d.ts +1 -2
- package/lib/typescript/utils/HelpersUtil.d.ts.map +1 -1
- package/lib/typescript/utils/NetworkUtil.d.ts +1 -2
- package/lib/typescript/utils/NetworkUtil.d.ts.map +1 -1
- package/lib/typescript/views/w3m-all-wallets-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/components/all-wallet-list.d.ts +1 -1
- package/lib/typescript/views/w3m-connect-view/components/all-wallet-list.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/components/custom-wallet-list.d.ts +1 -1
- package/lib/typescript/views/w3m-connect-view/components/custom-wallet-list.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/components/recent-wallet-list.d.ts +1 -1
- package/lib/typescript/views/w3m-connect-view/components/recent-wallet-list.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/utils.d.ts +1 -1
- package/lib/typescript/views/w3m-connect-view/utils.d.ts.map +1 -1
- package/lib/typescript/views/w3m-get-wallet-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-settings-view/components/Country.d.ts +1 -1
- package/lib/typescript/views/w3m-onramp-settings-view/components/Country.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-settings-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-settings-view/utils.d.ts +1 -1
- package/lib/typescript/views/w3m-onramp-settings-view/utils.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-view/components/Currency.d.ts +1 -1
- package/lib/typescript/views/w3m-onramp-view/components/Currency.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-view/components/PaymentMethod.d.ts +1 -1
- package/lib/typescript/views/w3m-onramp-view/components/PaymentMethod.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-view/components/Quote.d.ts +1 -1
- package/lib/typescript/views/w3m-onramp-view/components/Quote.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-view/components/SelectPaymentModal.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-view/utils.d.ts +1 -1
- package/lib/typescript/views/w3m-onramp-view/utils.d.ts.map +1 -1
- package/lib/typescript/views/w3m-swap-view/components/select-token-view/index.d.ts +1 -1
- package/lib/typescript/views/w3m-swap-view/components/select-token-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-swap-view/components/select-token-view/utils.d.ts +1 -1
- package/lib/typescript/views/w3m-swap-view/components/select-token-view/utils.d.ts.map +1 -1
- package/lib/typescript/views/w3m-swap-view/index.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/AppKit.ts +3 -35
- package/src/connectors/WalletConnectConnector.ts +17 -2
- package/src/hooks/useAppKitEvents.ts +2 -5
- package/src/hooks/useProvider.ts +30 -9
- package/src/index.ts +1 -0
- package/src/partials/w3m-account-activity/index.tsx +5 -5
- package/src/partials/w3m-account-tokens/index.tsx +2 -2
- package/src/partials/w3m-account-wallet-features/index.tsx +6 -6
- package/src/partials/w3m-all-wallets-list/index.tsx +2 -2
- package/src/partials/w3m-all-wallets-search/index.tsx +2 -6
- package/src/partials/w3m-connecting-body/index.tsx +2 -2
- package/src/partials/w3m-connecting-header/index.tsx +1 -1
- package/src/partials/w3m-connecting-mobile/index.tsx +6 -6
- package/src/partials/w3m-connecting-qrcode/index.tsx +14 -4
- package/src/partials/w3m-connecting-web/index.tsx +4 -4
- package/src/partials/w3m-placeholder/index.tsx +8 -8
- package/src/partials/w3m-selector-modal/index.tsx +2 -2
- package/src/partials/w3m-send-input-token/index.tsx +2 -2
- package/src/partials/w3m-swap-input/index.tsx +3 -4
- package/src/types.ts +187 -0
- package/src/utils/HelpersUtil.ts +1 -1
- package/src/utils/NetworkUtil.ts +1 -1
- package/src/views/w3m-account-default-view/components/auth-buttons.tsx +2 -2
- package/src/views/w3m-account-default-view/index.tsx +20 -20
- package/src/views/w3m-all-wallets-view/index.tsx +2 -7
- package/src/views/w3m-connect-view/components/all-wallet-list.tsx +2 -2
- package/src/views/w3m-connect-view/components/custom-wallet-list.tsx +1 -1
- package/src/views/w3m-connect-view/components/recent-wallet-list.tsx +2 -6
- package/src/views/w3m-connect-view/components/social-login-list.tsx +4 -4
- package/src/views/w3m-connect-view/index.tsx +10 -11
- package/src/views/w3m-connect-view/utils.ts +1 -1
- package/src/views/w3m-connecting-external-view/index.tsx +2 -2
- package/src/views/w3m-connecting-social-view/index.tsx +2 -2
- package/src/views/w3m-connecting-view/index.tsx +1 -1
- package/src/views/w3m-get-wallet-view/index.tsx +2 -1
- package/src/views/w3m-network-switch-view/index.tsx +2 -2
- package/src/views/w3m-onramp-checkout-view/index.tsx +15 -15
- package/src/views/w3m-onramp-settings-view/components/Country.tsx +6 -4
- package/src/views/w3m-onramp-settings-view/index.tsx +6 -9
- package/src/views/w3m-onramp-settings-view/utils.ts +2 -5
- package/src/views/w3m-onramp-transaction-view/index.tsx +6 -6
- package/src/views/w3m-onramp-view/components/Currency.tsx +3 -3
- package/src/views/w3m-onramp-view/components/CurrencyInput.tsx +2 -2
- package/src/views/w3m-onramp-view/components/PaymentButton.tsx +4 -4
- package/src/views/w3m-onramp-view/components/PaymentMethod.tsx +4 -3
- package/src/views/w3m-onramp-view/components/Quote.tsx +4 -5
- package/src/views/w3m-onramp-view/components/SelectPaymentModal.tsx +2 -5
- package/src/views/w3m-onramp-view/index.tsx +5 -2
- package/src/views/w3m-swap-view/components/select-token-view/index.tsx +3 -3
- package/src/views/w3m-swap-view/components/select-token-view/utils.ts +2 -1
- package/src/views/w3m-swap-view/index.tsx +5 -6
|
@@ -32,20 +32,20 @@ export function Placeholder({
|
|
|
32
32
|
}: Props) {
|
|
33
33
|
return (
|
|
34
34
|
<FlexView alignItems="center" justifyContent="center" style={[styles.container, style]}>
|
|
35
|
-
{icon
|
|
35
|
+
{icon ? (
|
|
36
36
|
<IconBox icon={icon} size="xl" iconColor={iconColor} background style={styles.icon} />
|
|
37
|
-
)}
|
|
38
|
-
{title
|
|
37
|
+
) : null}
|
|
38
|
+
{title ? (
|
|
39
39
|
<Text variant="paragraph-500" style={styles.title}>
|
|
40
40
|
{title}
|
|
41
41
|
</Text>
|
|
42
|
-
)}
|
|
43
|
-
{description
|
|
42
|
+
) : null}
|
|
43
|
+
{description ? (
|
|
44
44
|
<Text variant="small-400" color="fg-200" center>
|
|
45
45
|
{description}
|
|
46
46
|
</Text>
|
|
47
|
-
)}
|
|
48
|
-
{actionPress
|
|
47
|
+
) : null}
|
|
48
|
+
{actionPress ? (
|
|
49
49
|
<Button
|
|
50
50
|
style={styles.button}
|
|
51
51
|
iconLeft={actionIcon}
|
|
@@ -55,7 +55,7 @@ export function Placeholder({
|
|
|
55
55
|
>
|
|
56
56
|
{actionTitle ?? ''}
|
|
57
57
|
</Button>
|
|
58
|
-
)}
|
|
58
|
+
) : null}
|
|
59
59
|
</FlexView>
|
|
60
60
|
);
|
|
61
61
|
}
|
|
@@ -91,12 +91,12 @@ export function SelectorModal({
|
|
|
91
91
|
style={styles.searchBar}
|
|
92
92
|
placeholder={searchPlaceholder}
|
|
93
93
|
/>
|
|
94
|
-
{selectedItem
|
|
94
|
+
{selectedItem ? (
|
|
95
95
|
<FlexView style={styles.selectedContainer}>
|
|
96
96
|
{renderItem({ item: selectedItem })}
|
|
97
97
|
<Separator style={styles.separator} color="gray-glass-020" />
|
|
98
98
|
</FlexView>
|
|
99
|
-
)}
|
|
99
|
+
) : null}
|
|
100
100
|
<FlatList
|
|
101
101
|
data={items}
|
|
102
102
|
renderItem={renderItem}
|
|
@@ -94,7 +94,7 @@ export function SendInputToken({
|
|
|
94
94
|
chevron
|
|
95
95
|
/>
|
|
96
96
|
</FlexView>
|
|
97
|
-
{token
|
|
97
|
+
{token ? (
|
|
98
98
|
<FlexView
|
|
99
99
|
flexDirection="row"
|
|
100
100
|
alignItems="center"
|
|
@@ -111,7 +111,7 @@ export function SendInputToken({
|
|
|
111
111
|
<Link onPress={onMaxPress}>Max</Link>
|
|
112
112
|
</FlexView>
|
|
113
113
|
</FlexView>
|
|
114
|
-
)}
|
|
114
|
+
) : null}
|
|
115
115
|
</FlexView>
|
|
116
116
|
);
|
|
117
117
|
}
|
|
@@ -10,10 +10,9 @@ import {
|
|
|
10
10
|
UiUtil,
|
|
11
11
|
Link
|
|
12
12
|
} from '@reown/appkit-ui-react-native';
|
|
13
|
-
import { type SwapTokenWithBalance } from '@reown/appkit-core-react-native';
|
|
14
13
|
|
|
15
14
|
import styles from './styles';
|
|
16
|
-
import { NumberUtil } from '@reown/appkit-common-react-native';
|
|
15
|
+
import { NumberUtil, type SwapTokenWithBalance } from '@reown/appkit-common-react-native';
|
|
17
16
|
|
|
18
17
|
export interface SwapInputProps {
|
|
19
18
|
token?: SwapTokenWithBalance;
|
|
@@ -142,7 +141,7 @@ export function SwapInput({
|
|
|
142
141
|
? `~$${UiUtil.formatNumberToLocalString(marketValue, 6)}`
|
|
143
142
|
: ''}
|
|
144
143
|
</Text>
|
|
145
|
-
{showMax
|
|
144
|
+
{showMax ? (
|
|
146
145
|
<FlexView flexDirection="row" alignItems="center" justifyContent="center">
|
|
147
146
|
<Text
|
|
148
147
|
variant="small-400"
|
|
@@ -153,7 +152,7 @@ export function SwapInput({
|
|
|
153
152
|
</Text>
|
|
154
153
|
<Link onPress={handleMaxPress}>Max</Link>
|
|
155
154
|
</FlexView>
|
|
156
|
-
)}
|
|
155
|
+
) : null}
|
|
157
156
|
</FlexView>
|
|
158
157
|
) : null}
|
|
159
158
|
</>
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { type OptionsControllerState } from '@reown/appkit-core-react-native';
|
|
2
|
+
import {
|
|
3
|
+
type Features,
|
|
4
|
+
type UniversalProviderConfigOverride,
|
|
5
|
+
type WalletConnector,
|
|
6
|
+
type BlockchainAdapter,
|
|
7
|
+
type Metadata,
|
|
8
|
+
type Network,
|
|
9
|
+
type Storage,
|
|
10
|
+
type AppKitSIWEClient,
|
|
11
|
+
type ThemeMode,
|
|
12
|
+
type ThemeVariables,
|
|
13
|
+
type Tokens
|
|
14
|
+
} from '@reown/appkit-common-react-native';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Configuration interface for initializing the AppKit instance.
|
|
18
|
+
* This interface defines all the required and optional parameters needed to set up
|
|
19
|
+
* the AppKit with blockchain adapters, networks, storage, and various customization options.
|
|
20
|
+
*
|
|
21
|
+
* @see {@link https://docs.reown.com/appkit/react-native/core/options | AppKit Options Documentation}
|
|
22
|
+
*/
|
|
23
|
+
export interface AppKitConfig {
|
|
24
|
+
/**
|
|
25
|
+
* The WalletConnect project ID required for establishing connections.
|
|
26
|
+
* This is obtained from the https://dashboard.reown.com/
|
|
27
|
+
* @see {@link https://docs.reown.com/appkit/react-native/core/options#projectid | Project ID Documentation}
|
|
28
|
+
*/
|
|
29
|
+
projectId: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Metadata information about your application.
|
|
33
|
+
* This is displayed to users during the connection process.
|
|
34
|
+
*
|
|
35
|
+
* @see {@link https://docs.reown.com/appkit/react-native/core/options#metadata | Metadata Documentation}
|
|
36
|
+
*/
|
|
37
|
+
metadata: Metadata;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Array of blockchain adapters that handle different blockchain networks.
|
|
41
|
+
* Each adapter must implement the BlockchainAdapter interface and support
|
|
42
|
+
* a specific chain namespace (eip155, solana, etc.).
|
|
43
|
+
* @see {@link https://docs.reown.com/appkit/react-native/core/options#adapters | Adapters Documentation}
|
|
44
|
+
* @example [new EthersAdapter(), new SolanaAdapter()]
|
|
45
|
+
*/
|
|
46
|
+
adapters: BlockchainAdapter[];
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Array of supported networks that your application can connect to.
|
|
50
|
+
* Each network should have a corresponding adapter in the adapters array.
|
|
51
|
+
* @see {@link https://docs.reown.com/appkit/react-native/core/options#networks | Networks Documentation}
|
|
52
|
+
* @example [ethereum, polygon, solana]
|
|
53
|
+
*/
|
|
54
|
+
networks: Network[];
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Storage implementation for persisting connection state, preferences, and session data.
|
|
58
|
+
* Must implement the Storage interface with async methods for data persistence.
|
|
59
|
+
*/
|
|
60
|
+
storage: Storage;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Optional array of custom wallet connectors beyond the default WalletConnect connector.
|
|
64
|
+
* Useful for adding support for specific wallets like Coinbase, Phantom, etc.
|
|
65
|
+
* @example [new CoinbaseConnector(), new PhantomConnector()]
|
|
66
|
+
*/
|
|
67
|
+
extraConnectors?: WalletConnector[];
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Optional clipboard client for handling copy operations in different environments.
|
|
71
|
+
* Useful for customizing how addresses and other data are copied to clipboard.
|
|
72
|
+
*
|
|
73
|
+
* @see {@link https://docs.reown.com/appkit/react-native/core/options#clipboardclient | Clipboard Client Documentation}
|
|
74
|
+
*/
|
|
75
|
+
clipboardClient?: OptionsControllerState['clipboardClient'];
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Optional array of wallet IDs to include in the wallet selection list.
|
|
79
|
+
* If provided, only these wallets will be shown to users.
|
|
80
|
+
*
|
|
81
|
+
* @see {@link https://docs.reown.com/appkit/react-native/core/options#includewalletids | Include Wallet IDs Documentation}
|
|
82
|
+
* @example ["1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369", "4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0"]
|
|
83
|
+
*/
|
|
84
|
+
includeWalletIds?: OptionsControllerState['includeWalletIds'];
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Optional array of wallet IDs to exclude from the wallet selection list.
|
|
88
|
+
* These wallets will not be shown to users even if they're available.
|
|
89
|
+
*
|
|
90
|
+
* @see {@link https://docs.reown.com/appkit/react-native/core/options#excludewalletids | Exclude Wallet IDs Documentation}
|
|
91
|
+
* @example ["1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369", "4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0"]
|
|
92
|
+
*/
|
|
93
|
+
excludeWalletIds?: OptionsControllerState['excludeWalletIds'];
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Optional array of wallet IDs to feature at the top of the wallet selection list.
|
|
97
|
+
* These wallets will appear prominently for better user experience.
|
|
98
|
+
*
|
|
99
|
+
* @see {@link https://docs.reown.com/appkit/react-native/core/options#featuredwalletids | Featured Wallet IDs Documentation}
|
|
100
|
+
* @example ["1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369", "4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0"]
|
|
101
|
+
*/
|
|
102
|
+
featuredWalletIds?: OptionsControllerState['featuredWalletIds'];
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Optional array of custom wallet configurations.
|
|
106
|
+
* Allows you to add custom wallets with specific metadata and behavior.
|
|
107
|
+
*
|
|
108
|
+
* @see {@link https://docs.reown.com/appkit/react-native/core/options#customwallets | Custom Wallets Documentation}
|
|
109
|
+
*/
|
|
110
|
+
customWallets?: OptionsControllerState['customWallets'];
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Optional token configurations for different networks.
|
|
114
|
+
* Used for displaying token balances and information in the UI.
|
|
115
|
+
* @see {@link https://docs.reown.com/appkit/react-native/core/options#tokens | Tokens Documentation}
|
|
116
|
+
* @example { "eip155:1": { address: "0x..." } }
|
|
117
|
+
*/
|
|
118
|
+
tokens?: Tokens;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Optional flag to enable analytics tracking.
|
|
122
|
+
* When enabled, AppKit will send usage analytics events.
|
|
123
|
+
*
|
|
124
|
+
* @see {@link https://docs.reown.com/appkit/react-native/core/options#enableanalytics | Enable Analytics Documentation}
|
|
125
|
+
* @default false
|
|
126
|
+
*/
|
|
127
|
+
enableAnalytics?: OptionsControllerState['enableAnalytics'];
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Optional flag to enable debug mode.
|
|
131
|
+
* When enabled, additional logging and debugging information will be output.
|
|
132
|
+
*
|
|
133
|
+
* @see {@link https://docs.reown.com/appkit/react-native/core/options#debug | Debug Documentation}
|
|
134
|
+
* @default false
|
|
135
|
+
*/
|
|
136
|
+
debug?: OptionsControllerState['debug'];
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Optional theme mode for the AppKit UI.
|
|
140
|
+
* Controls whether the interface uses light or dark theme.
|
|
141
|
+
* @default "dark"
|
|
142
|
+
* @see {@link https://docs.reown.com/appkit/react-native/core/theming#thememode | Theme Mode Documentation}
|
|
143
|
+
* @example "light" | "dark"
|
|
144
|
+
*/
|
|
145
|
+
themeMode?: ThemeMode;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Optional theme variables for customizing the AppKit UI appearance.
|
|
149
|
+
* Allows you to override default colors and styling.
|
|
150
|
+
*
|
|
151
|
+
* @see {@link https://docs.reown.com/appkit/react-native/core/theming#themevariables | Theme Variables Documentation}
|
|
152
|
+
* @example { accent: "#3B82F6" }
|
|
153
|
+
*/
|
|
154
|
+
themeVariables?: ThemeVariables;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Optional SIWE (Sign-In with Ethereum) configuration.
|
|
158
|
+
* Enables authentication flow using Ethereum signatures.
|
|
159
|
+
* Must implement the AppKitSIWEClient interface.
|
|
160
|
+
*
|
|
161
|
+
* @see {@link https://docs.reown.com/appkit/react-native/core/siwe | SIWE Documentation}
|
|
162
|
+
*/
|
|
163
|
+
siweConfig?: AppKitSIWEClient;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Optional default network to use when no specific network is selected.
|
|
167
|
+
* This network will be used as the initial active network.
|
|
168
|
+
*
|
|
169
|
+
* @see {@link https://docs.reown.com/appkit/react-native/core/options#defaultnetwork | Default Network Documentation}
|
|
170
|
+
*/
|
|
171
|
+
defaultNetwork?: Network;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Optional features configuration to enable/disable specific AppKit functionality.
|
|
175
|
+
* Controls which features are available in the UI and API.
|
|
176
|
+
*
|
|
177
|
+
* @see {@link https://docs.reown.com/appkit/react-native/core/options#features | Features Documentation}
|
|
178
|
+
* @example { onramp: true, swap: false }
|
|
179
|
+
*/
|
|
180
|
+
features?: Features;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Optional configuration override for the Universal Provider.
|
|
184
|
+
* Allows customization of WalletConnect's Universal Provider behavior.
|
|
185
|
+
*/
|
|
186
|
+
universalProviderConfigOverride?: UniversalProviderConfigOverride;
|
|
187
|
+
}
|
package/src/utils/HelpersUtil.ts
CHANGED
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
type AppKitNetwork,
|
|
4
4
|
type CaipNetworkId,
|
|
5
5
|
type ChainNamespace,
|
|
6
|
+
type UniversalProviderConfigOverride,
|
|
6
7
|
solana,
|
|
7
8
|
solanaDevnet
|
|
8
9
|
} from '@reown/appkit-common-react-native';
|
|
9
|
-
import type { UniversalProviderConfigOverride } from '@reown/appkit-core-react-native';
|
|
10
10
|
|
|
11
11
|
export const DEFAULT_METHODS = {
|
|
12
12
|
solana: [
|
package/src/utils/NetworkUtil.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
type AppKitNetwork,
|
|
3
3
|
type CaipNetworkId,
|
|
4
|
+
type CaipNamespaces,
|
|
4
5
|
ConstantsUtil,
|
|
5
6
|
type Network
|
|
6
7
|
} from '@reown/appkit-common-react-native';
|
|
7
|
-
import type { CaipNamespaces } from '@reown/appkit-core-react-native';
|
|
8
8
|
|
|
9
9
|
export const NetworkUtil = {
|
|
10
10
|
formatNetwork(network: Network, projectId: string): AppKitNetwork {
|
|
@@ -21,7 +21,7 @@ export function AuthButtons({
|
|
|
21
21
|
return (
|
|
22
22
|
<>
|
|
23
23
|
<UpgradeWalletButton onPress={onUpgradePress} style={styles.upgradeButton} />
|
|
24
|
-
{socialProvider
|
|
24
|
+
{socialProvider ? (
|
|
25
25
|
<ListSocial
|
|
26
26
|
logo={socialProvider}
|
|
27
27
|
logoHeight={32}
|
|
@@ -34,7 +34,7 @@ export function AuthButtons({
|
|
|
34
34
|
{text}
|
|
35
35
|
</Text>
|
|
36
36
|
</ListSocial>
|
|
37
|
-
)}
|
|
37
|
+
) : null}
|
|
38
38
|
</>
|
|
39
39
|
);
|
|
40
40
|
}
|
|
@@ -183,9 +183,9 @@ export function AccountDefaultView() {
|
|
|
183
183
|
|
|
184
184
|
return (
|
|
185
185
|
<>
|
|
186
|
-
{showBack
|
|
186
|
+
{showBack ? (
|
|
187
187
|
<IconLink icon="chevronLeft" style={styles.backIcon} onPress={RouterController.goBack} />
|
|
188
|
-
)}
|
|
188
|
+
) : null}
|
|
189
189
|
<IconLink
|
|
190
190
|
icon="close"
|
|
191
191
|
style={styles.closeIcon}
|
|
@@ -211,7 +211,7 @@ export function AccountDefaultView() {
|
|
|
211
211
|
truncate: 'middle'
|
|
212
212
|
})}
|
|
213
213
|
</Text>
|
|
214
|
-
{showCopy
|
|
214
|
+
{showCopy ? (
|
|
215
215
|
<IconLink
|
|
216
216
|
icon="copy"
|
|
217
217
|
size="md"
|
|
@@ -219,14 +219,14 @@ export function AccountDefaultView() {
|
|
|
219
219
|
onPress={onCopyAddress}
|
|
220
220
|
style={styles.copyButton}
|
|
221
221
|
/>
|
|
222
|
-
)}
|
|
222
|
+
) : null}
|
|
223
223
|
</FlexView>
|
|
224
|
-
{showBalance
|
|
224
|
+
{showBalance ? (
|
|
225
225
|
<Text variant="paragraph-400" color="fg-200">
|
|
226
226
|
{CoreHelperUtil.formatBalance(balance.amount, balance.symbol, 6)}
|
|
227
227
|
</Text>
|
|
228
|
-
)}
|
|
229
|
-
{showExplorer
|
|
228
|
+
) : null}
|
|
229
|
+
{showExplorer ? (
|
|
230
230
|
<Button
|
|
231
231
|
size="sm"
|
|
232
232
|
variant="shade"
|
|
@@ -237,9 +237,9 @@ export function AccountDefaultView() {
|
|
|
237
237
|
>
|
|
238
238
|
Block Explorer
|
|
239
239
|
</Button>
|
|
240
|
-
)}
|
|
240
|
+
) : null}
|
|
241
241
|
<FlexView margin={['s', '0', '0', '0']}>
|
|
242
|
-
{isAuth
|
|
242
|
+
{isAuth ? (
|
|
243
243
|
<AuthButtons
|
|
244
244
|
onUpgradePress={onUpgradePress}
|
|
245
245
|
socialProvider={connection?.properties?.provider}
|
|
@@ -252,7 +252,7 @@ export function AccountDefaultView() {
|
|
|
252
252
|
truncate: 'end'
|
|
253
253
|
})}
|
|
254
254
|
/>
|
|
255
|
-
)}
|
|
255
|
+
) : null}
|
|
256
256
|
<ListItem
|
|
257
257
|
chevron
|
|
258
258
|
icon="networkPlaceholder"
|
|
@@ -268,7 +268,7 @@ export function AccountDefaultView() {
|
|
|
268
268
|
{activeNetwork?.name}
|
|
269
269
|
</Text>
|
|
270
270
|
</ListItem>
|
|
271
|
-
{showBuy
|
|
271
|
+
{showBuy ? (
|
|
272
272
|
<ListItem
|
|
273
273
|
chevron
|
|
274
274
|
icon="card"
|
|
@@ -280,8 +280,8 @@ export function AccountDefaultView() {
|
|
|
280
280
|
>
|
|
281
281
|
<Text color="fg-100">Buy crypto</Text>
|
|
282
282
|
</ListItem>
|
|
283
|
-
)}
|
|
284
|
-
{showSend
|
|
283
|
+
) : null}
|
|
284
|
+
{showSend ? (
|
|
285
285
|
<ListItem
|
|
286
286
|
chevron
|
|
287
287
|
icon="paperplane"
|
|
@@ -293,8 +293,8 @@ export function AccountDefaultView() {
|
|
|
293
293
|
>
|
|
294
294
|
<Text color="fg-100">Send</Text>
|
|
295
295
|
</ListItem>
|
|
296
|
-
)}
|
|
297
|
-
{showSwaps
|
|
296
|
+
) : null}
|
|
297
|
+
{showSwaps ? (
|
|
298
298
|
<ListItem
|
|
299
299
|
chevron
|
|
300
300
|
icon="recycleHorizontal"
|
|
@@ -306,8 +306,8 @@ export function AccountDefaultView() {
|
|
|
306
306
|
>
|
|
307
307
|
<Text color="fg-100">Swap</Text>
|
|
308
308
|
</ListItem>
|
|
309
|
-
)}
|
|
310
|
-
{showActivity
|
|
309
|
+
) : null}
|
|
310
|
+
{showActivity ? (
|
|
311
311
|
<ListItem
|
|
312
312
|
chevron
|
|
313
313
|
icon="clock"
|
|
@@ -319,8 +319,8 @@ export function AccountDefaultView() {
|
|
|
319
319
|
>
|
|
320
320
|
<Text color="fg-100">Activity</Text>
|
|
321
321
|
</ListItem>
|
|
322
|
-
)}
|
|
323
|
-
{showSwitchAccountType
|
|
322
|
+
) : null}
|
|
323
|
+
{showSwitchAccountType ? (
|
|
324
324
|
<ListItem
|
|
325
325
|
chevron
|
|
326
326
|
icon="swapHorizontal"
|
|
@@ -335,7 +335,7 @@ export function AccountDefaultView() {
|
|
|
335
335
|
accountType === 'eoa' ? 'smart account' : 'EOA'
|
|
336
336
|
}`}</Text>
|
|
337
337
|
</ListItem>
|
|
338
|
-
)}
|
|
338
|
+
) : null}
|
|
339
339
|
<ListItem
|
|
340
340
|
icon="disconnect"
|
|
341
341
|
onPress={onDisconnect}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
EventsController,
|
|
5
|
-
RouterController,
|
|
6
|
-
type WcWallet
|
|
7
|
-
} from '@reown/appkit-core-react-native';
|
|
2
|
+
import { WcController, EventsController, RouterController } from '@reown/appkit-core-react-native';
|
|
3
|
+
import { type WcWallet, ConstantsUtil } from '@reown/appkit-common-react-native';
|
|
8
4
|
import { FlexView, IconLink, SearchBar, Spacing, useTheme } from '@reown/appkit-ui-react-native';
|
|
9
|
-
import { ConstantsUtil } from '@reown/appkit-common-react-native';
|
|
10
5
|
|
|
11
6
|
import styles from './styles';
|
|
12
7
|
import { useDebounceCallback } from '../../hooks/useDebounceCallback';
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
ApiController,
|
|
5
5
|
AssetUtil,
|
|
6
6
|
WcController,
|
|
7
|
-
type WcControllerState
|
|
8
|
-
type WcWallet
|
|
7
|
+
type WcControllerState
|
|
9
8
|
} from '@reown/appkit-core-react-native';
|
|
9
|
+
import { type WcWallet } from '@reown/appkit-common-react-native';
|
|
10
10
|
import { ListItemLoader, ListWallet } from '@reown/appkit-ui-react-native';
|
|
11
11
|
import { UiUtil } from '../../../utils/UiUtil';
|
|
12
12
|
import { filterOutRecentWallets } from '../utils';
|
|
@@ -2,13 +2,13 @@ import { useSnapshot } from 'valtio';
|
|
|
2
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import {
|
|
4
4
|
OptionsController,
|
|
5
|
-
type CustomWallet,
|
|
6
5
|
type OptionsControllerState,
|
|
7
6
|
ApiController,
|
|
8
7
|
WcController,
|
|
9
8
|
type WcControllerState,
|
|
10
9
|
AssetUtil
|
|
11
10
|
} from '@reown/appkit-core-react-native';
|
|
11
|
+
import { type CustomWallet } from '@reown/appkit-common-react-native';
|
|
12
12
|
import { ListWallet } from '@reown/appkit-ui-react-native';
|
|
13
13
|
import { filterOutRecentWallets } from '../utils';
|
|
14
14
|
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { useSnapshot } from 'valtio';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
AssetUtil,
|
|
5
|
-
type WcWallet,
|
|
6
|
-
WcController
|
|
7
|
-
} from '@reown/appkit-core-react-native';
|
|
2
|
+
import { ApiController, AssetUtil, WcController } from '@reown/appkit-core-react-native';
|
|
3
|
+
import { type WcWallet } from '@reown/appkit-common-react-native';
|
|
8
4
|
import { ListWallet } from '@reown/appkit-ui-react-native';
|
|
9
5
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
10
6
|
|
|
@@ -40,13 +40,13 @@ export function SocialLoginList({ options, disabled }: SocialLoginListProps) {
|
|
|
40
40
|
|
|
41
41
|
return (
|
|
42
42
|
<FlexView padding={['xs', 's', '0', 's']}>
|
|
43
|
-
{topSocial
|
|
43
|
+
{topSocial ? (
|
|
44
44
|
<ListSocial logo={topSocial} disabled={disabled} onPress={() => onItemPress(topSocial)}>
|
|
45
45
|
<Text style={styles.topDescription} color={disabled ? 'fg-300' : 'fg-100'}>
|
|
46
46
|
{`Continue with ${StringUtil.capitalize(topSocial)}`}
|
|
47
47
|
</Text>
|
|
48
48
|
</ListSocial>
|
|
49
|
-
)}
|
|
49
|
+
) : null}
|
|
50
50
|
<FlexView flexDirection="row" justifyContent="space-between" margin={['xs', '0', '0', '0']}>
|
|
51
51
|
{bottomSocials?.map((social: SocialProvider, index) => (
|
|
52
52
|
<LogoSelect
|
|
@@ -61,14 +61,14 @@ export function SocialLoginList({ options, disabled }: SocialLoginListProps) {
|
|
|
61
61
|
]}
|
|
62
62
|
/>
|
|
63
63
|
))}
|
|
64
|
-
{showMoreButton
|
|
64
|
+
{showMoreButton ? (
|
|
65
65
|
<LogoSelect
|
|
66
66
|
logo="more"
|
|
67
67
|
disabled={disabled}
|
|
68
68
|
style={[styles.socialItem, styles.socialItemLast]}
|
|
69
69
|
onPress={onMorePress}
|
|
70
70
|
/>
|
|
71
|
-
)}
|
|
71
|
+
) : null}
|
|
72
72
|
</FlexView>
|
|
73
73
|
</FlexView>
|
|
74
74
|
);
|
|
@@ -5,11 +5,10 @@ import {
|
|
|
5
5
|
EventUtil,
|
|
6
6
|
EventsController,
|
|
7
7
|
OptionsController,
|
|
8
|
-
RouterController
|
|
9
|
-
type WcWallet
|
|
8
|
+
RouterController
|
|
10
9
|
} from '@reown/appkit-core-react-native';
|
|
10
|
+
import { type WcWallet, ConstantsUtil } from '@reown/appkit-common-react-native';
|
|
11
11
|
import { FlexView, Icon, ListItem, Separator, Text } from '@reown/appkit-ui-react-native';
|
|
12
|
-
import { ConstantsUtil } from '@reown/appkit-common-react-native';
|
|
13
12
|
import { useCustomDimensions } from '../../hooks/useCustomDimensions';
|
|
14
13
|
import { Placeholder } from '../../partials/w3m-placeholder';
|
|
15
14
|
import { CustomWalletList } from './components/custom-wallet-list';
|
|
@@ -59,22 +58,22 @@ export function ConnectView() {
|
|
|
59
58
|
return (
|
|
60
59
|
<ScrollView style={{ paddingHorizontal: padding }} bounces={false}>
|
|
61
60
|
<FlexView padding={['xs', '0', '2xl', '0']}>
|
|
62
|
-
{isSocialEnabled
|
|
61
|
+
{isSocialEnabled ? (
|
|
63
62
|
<>
|
|
64
63
|
<SocialLoginList options={features?.socials} />
|
|
65
64
|
<Separator text="or" style={styles.socialSeparator} />
|
|
66
65
|
</>
|
|
67
|
-
)}
|
|
66
|
+
) : null}
|
|
68
67
|
|
|
69
68
|
<FlexView padding={['0', 's', 'xs', 's']}>
|
|
70
|
-
{showConnectWalletsButton
|
|
69
|
+
{showConnectWalletsButton ? (
|
|
71
70
|
<ListItem contentStyle={styles.connectWalletButton} onPress={onViewAllPress}>
|
|
72
71
|
<Icon name="wallet" size="lg" />
|
|
73
72
|
<Text variant="paragraph-500">Continue with a wallet</Text>
|
|
74
73
|
<View style={styles.connectWalletEmpty} />
|
|
75
74
|
</ListItem>
|
|
76
|
-
)}
|
|
77
|
-
{showLoadingError
|
|
75
|
+
) : null}
|
|
76
|
+
{showLoadingError ? (
|
|
78
77
|
<FlexView alignItems="center" justifyContent="center" margin={['l', '0', '0', '0']}>
|
|
79
78
|
<Placeholder
|
|
80
79
|
icon="warningCircle"
|
|
@@ -87,15 +86,15 @@ export function ConnectView() {
|
|
|
87
86
|
/>
|
|
88
87
|
<Separator style={styles.socialSeparator} />
|
|
89
88
|
</FlexView>
|
|
90
|
-
)}
|
|
91
|
-
{showList
|
|
89
|
+
) : null}
|
|
90
|
+
{showList ? (
|
|
92
91
|
<>
|
|
93
92
|
<RecentWalletList itemStyle={styles.item} onWalletPress={onWalletPress} />
|
|
94
93
|
<AllWalletList itemStyle={styles.item} onWalletPress={onWalletPress} />
|
|
95
94
|
<CustomWalletList itemStyle={styles.item} onWalletPress={onWalletPress} />
|
|
96
95
|
<AllWalletsButton itemStyle={styles.item} onPress={onViewAllPress} />
|
|
97
96
|
</>
|
|
98
|
-
)}
|
|
97
|
+
) : null}
|
|
99
98
|
</FlexView>
|
|
100
99
|
</FlexView>
|
|
101
100
|
</ScrollView>
|
|
@@ -92,7 +92,7 @@ export function ConnectingExternalView() {
|
|
|
92
92
|
imageSrc={AssetUtil.getWalletImage(data?.wallet)}
|
|
93
93
|
imageHeaders={ApiController._getApiHeaders()}
|
|
94
94
|
/>
|
|
95
|
-
{errorType
|
|
95
|
+
{errorType ? (
|
|
96
96
|
<IconBox
|
|
97
97
|
icon={'close'}
|
|
98
98
|
border
|
|
@@ -102,7 +102,7 @@ export function ConnectingExternalView() {
|
|
|
102
102
|
iconColor="error-100"
|
|
103
103
|
style={styles.errorIcon}
|
|
104
104
|
/>
|
|
105
|
-
)}
|
|
105
|
+
) : null}
|
|
106
106
|
</LoadingThumbnail>
|
|
107
107
|
<ConnectingBody title={bodyMessage.title} description={bodyMessage.description} />
|
|
108
108
|
{errorType !== 'not_installed' && (
|
|
@@ -76,7 +76,7 @@ export function ConnectingSocialView() {
|
|
|
76
76
|
>
|
|
77
77
|
<LoadingThumbnail paused={!!error}>
|
|
78
78
|
<Logo logo={data?.socialProvider ?? 'more'} height={72} width={72} />
|
|
79
|
-
{error
|
|
79
|
+
{error ? (
|
|
80
80
|
<IconBox
|
|
81
81
|
icon={'close'}
|
|
82
82
|
border
|
|
@@ -86,7 +86,7 @@ export function ConnectingSocialView() {
|
|
|
86
86
|
iconColor="error-100"
|
|
87
87
|
style={styles.errorIcon}
|
|
88
88
|
/>
|
|
89
|
-
)}
|
|
89
|
+
) : null}
|
|
90
90
|
</LoadingThumbnail>
|
|
91
91
|
<Text style={styles.continueText} variant="paragraph-500">
|
|
92
92
|
Continue with {StringUtil.capitalize(data?.socialProvider ?? 'Login')}
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
CoreHelperUtil,
|
|
7
7
|
RouterController,
|
|
8
8
|
SnackController,
|
|
9
|
-
type Platform,
|
|
10
9
|
OptionsController,
|
|
11
10
|
ApiController,
|
|
12
11
|
EventsController
|
|
@@ -17,6 +16,7 @@ import { ConnectingMobile } from '../../partials/w3m-connecting-mobile';
|
|
|
17
16
|
import { ConnectingWeb } from '../../partials/w3m-connecting-web';
|
|
18
17
|
import { ConnectingHeader } from '../../partials/w3m-connecting-header';
|
|
19
18
|
import { UiUtil } from '../../utils/UiUtil';
|
|
19
|
+
import { type Platform } from '@reown/appkit-common-react-native';
|
|
20
20
|
|
|
21
21
|
export function ConnectingView() {
|
|
22
22
|
const { connect } = useInternalAppKit();
|