@reown/appkit-react-native 2.0.0-alpha.2 → 2.0.0-alpha.3
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 +64 -66
- package/lib/commonjs/AppKit.js.map +1 -1
- package/lib/commonjs/AppKitContext.js +4 -5
- package/lib/commonjs/AppKitContext.js.map +1 -1
- package/lib/commonjs/connectors/WalletConnectConnector.js +15 -3
- 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/hooks/useRouteTransition.js +83 -0
- package/lib/commonjs/hooks/useRouteTransition.js.map +1 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modal/w3m-account-button/index.js +1 -1
- package/lib/commonjs/modal/w3m-account-button/index.js.map +1 -1
- package/lib/commonjs/modal/w3m-modal/index.js +11 -32
- package/lib/commonjs/modal/w3m-modal/index.js.map +1 -1
- package/lib/commonjs/modal/w3m-modal/styles.js +0 -4
- package/lib/commonjs/modal/w3m-modal/styles.js.map +1 -1
- package/lib/commonjs/modal/w3m-network-button/index.js +1 -1
- package/lib/commonjs/modal/w3m-network-button/index.js.map +1 -1
- package/lib/commonjs/modal/w3m-router/index.js +16 -1
- package/lib/commonjs/modal/w3m-router/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-account-activity/index.js +8 -8
- package/lib/commonjs/partials/w3m-account-activity/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-account-tokens/index.js +5 -5
- 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 +12 -13
- package/lib/commonjs/partials/w3m-connecting-mobile/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-qrcode/index.js +27 -12
- package/lib/commonjs/partials/w3m-connecting-qrcode/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-web/index.js +10 -11
- package/lib/commonjs/partials/w3m-connecting-web/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-header/index.js +7 -15
- package/lib/commonjs/partials/w3m-header/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-information-modal/index.js +34 -32
- package/lib/commonjs/partials/w3m-information-modal/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-information-modal/styles.js +6 -4
- package/lib/commonjs/partials/w3m-information-modal/styles.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 +65 -67
- package/lib/commonjs/partials/w3m-selector-modal/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-selector-modal/styles.js +1 -0
- package/lib/commonjs/partials/w3m-selector-modal/styles.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/utils/HelpersUtil.js.map +1 -1
- package/lib/commonjs/utils/RouterUtil.js +52 -0
- package/lib/commonjs/utils/RouterUtil.js.map +1 -0
- package/lib/commonjs/utils/UiUtil.js +10 -19
- package/lib/commonjs/utils/UiUtil.js.map +1 -1
- 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 +17 -17
- package/lib/commonjs/views/w3m-account-default-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-account-view/index.js +1 -1
- package/lib/commonjs/views/w3m-account-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-all-wallets-view/index.js +4 -4
- package/lib/commonjs/views/w3m-all-wallets-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/components/all-wallet-list.js +1 -1
- package/lib/commonjs/views/w3m-connect-view/components/all-wallet-list.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/components/custom-wallet-list.js +1 -1
- package/lib/commonjs/views/w3m-connect-view/components/custom-wallet-list.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/components/recent-wallet-list.js +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 +8 -8
- package/lib/commonjs/views/w3m-connect-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-external-view/index.js +7 -8
- package/lib/commonjs/views/w3m-connecting-external-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-siwe-view/index.js +6 -11
- package/lib/commonjs/views/w3m-connecting-siwe-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-social-view/index.js +8 -10
- package/lib/commonjs/views/w3m-connecting-social-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-view/index.js +7 -7
- 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 +6 -5
- package/lib/commonjs/views/w3m-network-switch-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-networks-view/index.js +5 -8
- package/lib/commonjs/views/w3m-networks-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-checkout-view/index.js +16 -16
- 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/Header.js +5 -6
- package/lib/commonjs/views/w3m-onramp-view/components/Header.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 +68 -70
- package/lib/commonjs/views/w3m-onramp-view/components/SelectPaymentModal.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/index.js +1 -1
- package/lib/commonjs/views/w3m-onramp-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-swap-preview-view/index.js +1 -14
- package/lib/commonjs/views/w3m-swap-preview-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-swap-preview-view/styles.js +3 -0
- package/lib/commonjs/views/w3m-swap-preview-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-swap-view/components/select-token-view/index.js +4 -3
- package/lib/commonjs/views/w3m-swap-view/components/select-token-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-swap-view/components/select-token-view/styles.js +1 -2
- package/lib/commonjs/views/w3m-swap-view/components/select-token-view/styles.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 +13 -23
- package/lib/commonjs/views/w3m-swap-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-swap-view/styles.js +5 -1
- package/lib/commonjs/views/w3m-swap-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-unsupported-chain-view/index.js +2 -4
- package/lib/commonjs/views/w3m-unsupported-chain-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-compatible-networks-view/index.js +2 -1
- package/lib/commonjs/views/w3m-wallet-compatible-networks-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-receive-view/index.js +2 -2
- package/lib/commonjs/views/w3m-wallet-receive-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-preview-view/components/preview-send-details.js +1 -1
- package/lib/commonjs/views/w3m-wallet-send-preview-view/components/preview-send-details.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-select-token-view/index.js +1 -1
- package/lib/commonjs/views/w3m-wallet-send-select-token-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-view/index.js +4 -12
- package/lib/commonjs/views/w3m-wallet-send-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-view/styles.js +3 -0
- package/lib/commonjs/views/w3m-wallet-send-view/styles.js.map +1 -1
- package/lib/module/AppKit.js +65 -67
- package/lib/module/AppKit.js.map +1 -1
- package/lib/module/AppKitContext.js +2 -3
- package/lib/module/AppKitContext.js.map +1 -1
- package/lib/module/connectors/WalletConnectConnector.js +16 -4
- 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/hooks/useRouteTransition.js +79 -0
- package/lib/module/hooks/useRouteTransition.js.map +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/modal/w3m-account-button/index.js +2 -2
- package/lib/module/modal/w3m-account-button/index.js.map +1 -1
- package/lib/module/modal/w3m-modal/index.js +12 -33
- package/lib/module/modal/w3m-modal/index.js.map +1 -1
- package/lib/module/modal/w3m-modal/styles.js +0 -4
- package/lib/module/modal/w3m-modal/styles.js.map +1 -1
- package/lib/module/modal/w3m-network-button/index.js +2 -2
- package/lib/module/modal/w3m-network-button/index.js.map +1 -1
- package/lib/module/modal/w3m-router/index.js +17 -2
- package/lib/module/modal/w3m-router/index.js.map +1 -1
- package/lib/module/partials/w3m-account-activity/index.js +9 -9
- package/lib/module/partials/w3m-account-activity/index.js.map +1 -1
- package/lib/module/partials/w3m-account-tokens/index.js +6 -6
- 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 +13 -14
- package/lib/module/partials/w3m-connecting-mobile/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-qrcode/index.js +28 -13
- package/lib/module/partials/w3m-connecting-qrcode/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-web/index.js +11 -12
- package/lib/module/partials/w3m-connecting-web/index.js.map +1 -1
- package/lib/module/partials/w3m-header/index.js +8 -16
- package/lib/module/partials/w3m-header/index.js.map +1 -1
- package/lib/module/partials/w3m-information-modal/index.js +33 -31
- package/lib/module/partials/w3m-information-modal/index.js.map +1 -1
- package/lib/module/partials/w3m-information-modal/styles.js +7 -5
- package/lib/module/partials/w3m-information-modal/styles.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 +66 -68
- package/lib/module/partials/w3m-selector-modal/index.js.map +1 -1
- package/lib/module/partials/w3m-selector-modal/styles.js +1 -0
- package/lib/module/partials/w3m-selector-modal/styles.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/utils/RouterUtil.js +48 -0
- package/lib/module/utils/RouterUtil.js.map +1 -0
- package/lib/module/utils/UiUtil.js +12 -20
- package/lib/module/utils/UiUtil.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 +19 -19
- package/lib/module/views/w3m-account-default-view/index.js.map +1 -1
- package/lib/module/views/w3m-account-view/index.js +2 -2
- package/lib/module/views/w3m-account-view/index.js.map +1 -1
- package/lib/module/views/w3m-all-wallets-view/index.js +5 -5
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +8 -8
- package/lib/module/views/w3m-connect-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-external-view/index.js +9 -10
- package/lib/module/views/w3m-connecting-external-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-siwe-view/index.js +8 -13
- package/lib/module/views/w3m-connecting-siwe-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-social-view/index.js +10 -12
- package/lib/module/views/w3m-connecting-social-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-view/index.js +9 -9
- 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 +9 -7
- package/lib/module/views/w3m-network-switch-view/index.js.map +1 -1
- package/lib/module/views/w3m-networks-view/index.js +7 -10
- package/lib/module/views/w3m-networks-view/index.js.map +1 -1
- package/lib/module/views/w3m-onramp-checkout-view/index.js +17 -17
- 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/Header.js +5 -6
- package/lib/module/views/w3m-onramp-view/components/Header.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 +68 -69
- package/lib/module/views/w3m-onramp-view/components/SelectPaymentModal.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/index.js +2 -2
- package/lib/module/views/w3m-onramp-view/index.js.map +1 -1
- package/lib/module/views/w3m-swap-preview-view/index.js +3 -16
- package/lib/module/views/w3m-swap-preview-view/index.js.map +1 -1
- package/lib/module/views/w3m-swap-preview-view/styles.js +3 -0
- package/lib/module/views/w3m-swap-preview-view/styles.js.map +1 -1
- package/lib/module/views/w3m-swap-view/components/select-token-view/index.js +5 -4
- 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/styles.js +1 -2
- package/lib/module/views/w3m-swap-view/components/select-token-view/styles.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 +14 -24
- package/lib/module/views/w3m-swap-view/index.js.map +1 -1
- package/lib/module/views/w3m-swap-view/styles.js +5 -1
- package/lib/module/views/w3m-swap-view/styles.js.map +1 -1
- package/lib/module/views/w3m-unsupported-chain-view/index.js +4 -6
- package/lib/module/views/w3m-unsupported-chain-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-compatible-networks-view/index.js +3 -2
- package/lib/module/views/w3m-wallet-compatible-networks-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-receive-view/index.js +3 -3
- package/lib/module/views/w3m-wallet-receive-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-preview-view/components/preview-send-details.js +2 -2
- package/lib/module/views/w3m-wallet-send-preview-view/components/preview-send-details.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-select-token-view/index.js +2 -2
- package/lib/module/views/w3m-wallet-send-select-token-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-view/index.js +6 -14
- package/lib/module/views/w3m-wallet-send-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-view/styles.js +3 -0
- package/lib/module/views/w3m-wallet-send-view/styles.js.map +1 -1
- package/lib/typescript/AppKit.d.ts +6 -25
- package/lib/typescript/AppKit.d.ts.map +1 -1
- package/lib/typescript/AppKitContext.d.ts +3 -2
- package/lib/typescript/AppKitContext.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/hooks/useRouteTransition.d.ts +16 -0
- package/lib/typescript/hooks/useRouteTransition.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/modal/w3m-account-button/index.d.ts.map +1 -1
- package/lib/typescript/modal/w3m-modal/index.d.ts.map +1 -1
- package/lib/typescript/modal/w3m-modal/styles.d.ts +0 -4
- package/lib/typescript/modal/w3m-modal/styles.d.ts.map +1 -1
- package/lib/typescript/modal/w3m-network-button/index.d.ts.map +1 -1
- package/lib/typescript/modal/w3m-router/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-account-activity/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-account-tokens/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-mobile/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-connecting-qrcode/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-connecting-web/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-header/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-information-modal/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-information-modal/styles.d.ts +2 -0
- package/lib/typescript/partials/w3m-information-modal/styles.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-selector-modal/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-selector-modal/styles.d.ts +1 -0
- package/lib/typescript/partials/w3m-selector-modal/styles.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 +3 -3
- 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/utils/RouterUtil.d.ts +9 -0
- package/lib/typescript/utils/RouterUtil.d.ts.map +1 -0
- package/lib/typescript/utils/UiUtil.d.ts +2 -6
- package/lib/typescript/utils/UiUtil.d.ts.map +1 -1
- package/lib/typescript/views/w3m-account-default-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-account-view/index.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-connecting-external-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connecting-siwe-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connecting-social-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-get-wallet-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-network-switch-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-networks-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-checkout-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/Header.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-preview-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-swap-preview-view/styles.d.ts +3 -0
- package/lib/typescript/views/w3m-swap-preview-view/styles.d.ts.map +1 -1
- package/lib/typescript/views/w3m-swap-view/components/select-token-view/index.d.ts +4 -2
- 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/styles.d.ts +0 -1
- package/lib/typescript/views/w3m-swap-view/components/select-token-view/styles.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/lib/typescript/views/w3m-swap-view/styles.d.ts +5 -1
- package/lib/typescript/views/w3m-swap-view/styles.d.ts.map +1 -1
- package/lib/typescript/views/w3m-unsupported-chain-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-wallet-compatible-networks-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-wallet-receive-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-wallet-send-select-token-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-wallet-send-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-wallet-send-view/styles.d.ts +3 -0
- package/lib/typescript/views/w3m-wallet-send-view/styles.d.ts.map +1 -1
- package/package.json +5 -6
- package/src/AppKit.ts +87 -110
- package/src/AppKitContext.tsx +2 -2
- package/src/connectors/WalletConnectConnector.ts +20 -5
- package/src/hooks/useAppKitEvents.ts +2 -5
- package/src/hooks/useProvider.ts +30 -9
- package/src/hooks/useRouteTransition.ts +95 -0
- package/src/index.ts +1 -0
- package/src/modal/w3m-account-button/index.tsx +3 -2
- package/src/modal/w3m-modal/index.tsx +12 -39
- package/src/modal/w3m-modal/styles.ts +0 -4
- package/src/modal/w3m-network-button/index.tsx +2 -1
- package/src/modal/w3m-router/index.tsx +17 -2
- package/src/partials/w3m-account-activity/index.tsx +9 -8
- package/src/partials/w3m-account-tokens/index.tsx +4 -3
- 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 +13 -14
- package/src/partials/w3m-connecting-qrcode/index.tsx +18 -14
- package/src/partials/w3m-connecting-web/index.tsx +11 -13
- package/src/partials/w3m-header/index.tsx +4 -15
- package/src/partials/w3m-information-modal/index.tsx +28 -32
- package/src/partials/w3m-information-modal/styles.ts +7 -5
- package/src/partials/w3m-placeholder/index.tsx +8 -8
- package/src/partials/w3m-selector-modal/index.tsx +64 -68
- package/src/partials/w3m-selector-modal/styles.ts +1 -0
- 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 +3 -2
- package/src/utils/NetworkUtil.ts +1 -1
- package/src/utils/RouterUtil.ts +50 -0
- package/src/utils/UiUtil.ts +13 -29
- package/src/views/w3m-account-default-view/components/auth-buttons.tsx +2 -2
- package/src/views/w3m-account-default-view/index.tsx +25 -24
- package/src/views/w3m-account-view/index.tsx +2 -1
- package/src/views/w3m-all-wallets-view/index.tsx +6 -11
- package/src/views/w3m-connect-view/components/all-wallet-list.tsx +4 -4
- package/src/views/w3m-connect-view/components/custom-wallet-list.tsx +4 -4
- package/src/views/w3m-connect-view/components/recent-wallet-list.tsx +3 -7
- package/src/views/w3m-connect-view/components/social-login-list.tsx +4 -4
- package/src/views/w3m-connect-view/index.tsx +12 -13
- package/src/views/w3m-connect-view/utils.ts +1 -1
- package/src/views/w3m-connecting-external-view/index.tsx +9 -10
- package/src/views/w3m-connecting-siwe-view/index.tsx +5 -11
- package/src/views/w3m-connecting-social-view/index.tsx +10 -12
- package/src/views/w3m-connecting-view/index.tsx +10 -10
- package/src/views/w3m-get-wallet-view/index.tsx +2 -1
- package/src/views/w3m-network-switch-view/index.tsx +10 -8
- package/src/views/w3m-networks-view/index.tsx +6 -11
- package/src/views/w3m-onramp-checkout-view/index.tsx +17 -16
- 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/Header.tsx +4 -6
- 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 +51 -61
- package/src/views/w3m-onramp-view/index.tsx +8 -4
- package/src/views/w3m-swap-preview-view/index.tsx +4 -23
- package/src/views/w3m-swap-preview-view/styles.ts +3 -0
- package/src/views/w3m-swap-view/components/select-token-view/index.tsx +17 -7
- package/src/views/w3m-swap-view/components/select-token-view/styles.ts +1 -2
- package/src/views/w3m-swap-view/components/select-token-view/utils.ts +2 -1
- package/src/views/w3m-swap-view/index.tsx +12 -26
- package/src/views/w3m-swap-view/styles.ts +5 -1
- package/src/views/w3m-unsupported-chain-view/index.tsx +4 -5
- package/src/views/w3m-wallet-compatible-networks-view/index.tsx +3 -2
- package/src/views/w3m-wallet-receive-view/index.tsx +6 -2
- package/src/views/w3m-wallet-send-preview-view/components/preview-send-details.tsx +2 -2
- package/src/views/w3m-wallet-send-select-token-view/index.tsx +2 -1
- package/src/views/w3m-wallet-send-view/index.tsx +5 -10
- package/src/views/w3m-wallet-send-view/styles.ts +3 -0
- package/lib/commonjs/config/animations.js +0 -9
- package/lib/commonjs/config/animations.js.map +0 -1
- package/lib/commonjs/partials/w3m-otp-code/index.js +0 -89
- package/lib/commonjs/partials/w3m-otp-code/index.js.map +0 -1
- package/lib/commonjs/partials/w3m-otp-code/styles.js +0 -21
- package/lib/commonjs/partials/w3m-otp-code/styles.js.map +0 -1
- package/lib/module/config/animations.js +0 -9
- package/lib/module/config/animations.js.map +0 -1
- package/lib/module/partials/w3m-otp-code/index.js +0 -84
- package/lib/module/partials/w3m-otp-code/index.js.map +0 -1
- package/lib/module/partials/w3m-otp-code/styles.js +0 -17
- package/lib/module/partials/w3m-otp-code/styles.js.map +0 -1
- package/lib/typescript/config/animations.d.ts +0 -2
- package/lib/typescript/config/animations.d.ts.map +0 -1
- package/lib/typescript/partials/w3m-otp-code/index.d.ts +0 -16
- package/lib/typescript/partials/w3m-otp-code/index.d.ts.map +0 -1
- package/lib/typescript/partials/w3m-otp-code/styles.d.ts +0 -14
- package/lib/typescript/partials/w3m-otp-code/styles.d.ts.map +0 -1
- package/src/config/animations.ts +0 -7
- package/src/partials/w3m-otp-code/index.tsx +0 -81
- package/src/partials/w3m-otp-code/styles.ts +0 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Modal from 'react-native
|
|
1
|
+
import { Modal } from 'react-native';
|
|
2
2
|
import {
|
|
3
3
|
FlexView,
|
|
4
4
|
Text,
|
|
@@ -27,38 +27,34 @@ export function InformationModal({
|
|
|
27
27
|
const Theme = useTheme();
|
|
28
28
|
|
|
29
29
|
return (
|
|
30
|
-
<Modal
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
{!!title && (
|
|
49
|
-
<Text variant="paragraph-500" style={styles.title}>
|
|
50
|
-
{title}
|
|
51
|
-
</Text>
|
|
52
|
-
)}
|
|
30
|
+
<Modal visible={visible} transparent animationType="slide" onRequestClose={onClose}>
|
|
31
|
+
<FlexView style={styles.modal}>
|
|
32
|
+
<FlexView
|
|
33
|
+
style={[
|
|
34
|
+
styles.content,
|
|
35
|
+
{
|
|
36
|
+
backgroundColor: Theme['bg-100'],
|
|
37
|
+
borderColor: Theme['gray-glass-015']
|
|
38
|
+
}
|
|
39
|
+
]}
|
|
40
|
+
padding="2xl"
|
|
41
|
+
>
|
|
42
|
+
<IconBox icon={iconName} size="lg" background />
|
|
43
|
+
{!!title && (
|
|
44
|
+
<Text variant="paragraph-500" style={styles.title}>
|
|
45
|
+
{title}
|
|
46
|
+
</Text>
|
|
47
|
+
)}
|
|
53
48
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
49
|
+
{!!description && (
|
|
50
|
+
<Text variant="small-400" color="fg-150" center>
|
|
51
|
+
{description}
|
|
52
|
+
</Text>
|
|
53
|
+
)}
|
|
54
|
+
<Button onPress={onClose} variant="fill" style={styles.button}>
|
|
55
|
+
Got it
|
|
56
|
+
</Button>
|
|
57
|
+
</FlexView>
|
|
62
58
|
</FlexView>
|
|
63
59
|
</Modal>
|
|
64
60
|
);
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { Spacing } from '@reown/appkit-ui-react-native';
|
|
1
|
+
import { BorderRadius, Spacing } from '@reown/appkit-ui-react-native';
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
3
|
|
|
4
4
|
export default StyleSheet.create({
|
|
5
5
|
modal: {
|
|
6
6
|
margin: 0,
|
|
7
|
-
justifyContent: 'flex-end'
|
|
7
|
+
justifyContent: 'flex-end',
|
|
8
|
+
flex: 1
|
|
8
9
|
},
|
|
9
10
|
content: {
|
|
10
|
-
borderTopLeftRadius:
|
|
11
|
-
borderTopRightRadius:
|
|
12
|
-
alignItems: 'center'
|
|
11
|
+
borderTopLeftRadius: BorderRadius.l,
|
|
12
|
+
borderTopRightRadius: BorderRadius.l,
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
borderWidth: StyleSheet.hairlineWidth
|
|
13
15
|
},
|
|
14
16
|
title: {
|
|
15
17
|
marginTop: Spacing.s,
|
|
@@ -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
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useSnapshot } from 'valtio';
|
|
2
|
-
import Modal from 'react-native
|
|
3
|
-
import { FlatList, View } from 'react-native';
|
|
2
|
+
import { FlatList, View, Modal } from 'react-native';
|
|
4
3
|
import {
|
|
5
4
|
FlexView,
|
|
6
5
|
IconBox,
|
|
@@ -13,7 +12,7 @@ import {
|
|
|
13
12
|
useTheme
|
|
14
13
|
} from '@reown/appkit-ui-react-native';
|
|
15
14
|
import styles from './styles';
|
|
16
|
-
import { AssetController, ConnectionsController } from '@reown/appkit-core-react-native';
|
|
15
|
+
import { AssetController, AssetUtil, ConnectionsController } from '@reown/appkit-core-react-native';
|
|
17
16
|
|
|
18
17
|
interface SelectorModalProps {
|
|
19
18
|
title?: string;
|
|
@@ -47,79 +46,76 @@ export function SelectorModal({
|
|
|
47
46
|
const Theme = useTheme();
|
|
48
47
|
const { activeNetwork } = useSnapshot(ConnectionsController.state);
|
|
49
48
|
const { networkImages } = useSnapshot(AssetController.state);
|
|
50
|
-
const networkImage = activeNetwork
|
|
49
|
+
const networkImage = AssetUtil.getNetworkImage(activeNetwork, networkImages);
|
|
51
50
|
|
|
52
51
|
const renderSeparator = () => {
|
|
53
52
|
return <View style={{ height: SEPARATOR_HEIGHT }} />;
|
|
54
53
|
};
|
|
55
54
|
|
|
56
55
|
return (
|
|
57
|
-
<Modal
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
56
|
+
<Modal visible={visible} transparent animationType="slide" onRequestClose={onClose}>
|
|
57
|
+
<View style={styles.modal}>
|
|
58
|
+
<FlexView style={[styles.container, { backgroundColor: Theme['bg-100'] }]}>
|
|
59
|
+
<FlexView
|
|
60
|
+
alignItems="center"
|
|
61
|
+
justifyContent="space-between"
|
|
62
|
+
flexDirection="row"
|
|
63
|
+
style={styles.header}
|
|
64
|
+
>
|
|
65
|
+
<IconLink icon="chevronLeft" onPress={onClose} testID="selector-modal-button-back" />
|
|
66
|
+
{!!title && <Text variant="paragraph-600">{title}</Text>}
|
|
67
|
+
{showNetwork ? (
|
|
68
|
+
networkImage ? (
|
|
69
|
+
<FlexView
|
|
70
|
+
alignItems="center"
|
|
71
|
+
justifyContent="center"
|
|
72
|
+
style={styles.iconPlaceholder}
|
|
73
|
+
>
|
|
74
|
+
<Image source={networkImage} style={styles.networkImage} />
|
|
75
|
+
</FlexView>
|
|
76
|
+
) : (
|
|
77
|
+
<IconBox
|
|
78
|
+
style={styles.iconPlaceholder}
|
|
79
|
+
icon="networkPlaceholder"
|
|
80
|
+
background
|
|
81
|
+
iconColor="fg-200"
|
|
82
|
+
size="sm"
|
|
83
|
+
/>
|
|
84
|
+
)
|
|
81
85
|
) : (
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
icon="networkPlaceholder"
|
|
85
|
-
background
|
|
86
|
-
iconColor="fg-200"
|
|
87
|
-
size="sm"
|
|
88
|
-
/>
|
|
89
|
-
)
|
|
90
|
-
) : (
|
|
91
|
-
<View style={styles.iconPlaceholder} />
|
|
92
|
-
)}
|
|
93
|
-
</FlexView>
|
|
94
|
-
<SearchBar
|
|
95
|
-
onChangeText={onSearch}
|
|
96
|
-
style={styles.searchBar}
|
|
97
|
-
placeholder={searchPlaceholder}
|
|
98
|
-
/>
|
|
99
|
-
{selectedItem && (
|
|
100
|
-
<FlexView style={styles.selectedContainer}>
|
|
101
|
-
{renderItem({ item: selectedItem })}
|
|
102
|
-
<Separator style={styles.separator} color="gray-glass-020" />
|
|
86
|
+
<View style={styles.iconPlaceholder} />
|
|
87
|
+
)}
|
|
103
88
|
</FlexView>
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
89
|
+
<SearchBar
|
|
90
|
+
onChangeText={onSearch}
|
|
91
|
+
style={styles.searchBar}
|
|
92
|
+
placeholder={searchPlaceholder}
|
|
93
|
+
/>
|
|
94
|
+
{selectedItem ? (
|
|
95
|
+
<FlexView style={styles.selectedContainer}>
|
|
96
|
+
{renderItem({ item: selectedItem })}
|
|
97
|
+
<Separator style={styles.separator} color="gray-glass-020" />
|
|
98
|
+
</FlexView>
|
|
99
|
+
) : null}
|
|
100
|
+
<FlatList
|
|
101
|
+
data={items}
|
|
102
|
+
renderItem={renderItem}
|
|
103
|
+
fadingEdgeLength={20}
|
|
104
|
+
contentContainerStyle={styles.listContent}
|
|
105
|
+
ItemSeparatorComponent={renderSeparator}
|
|
106
|
+
keyExtractor={keyExtractor}
|
|
107
|
+
getItemLayout={
|
|
108
|
+
itemHeight
|
|
109
|
+
? (_, index) => ({
|
|
110
|
+
length: itemHeight + SEPARATOR_HEIGHT,
|
|
111
|
+
offset: (itemHeight + SEPARATOR_HEIGHT) * index,
|
|
112
|
+
index
|
|
113
|
+
})
|
|
114
|
+
: undefined
|
|
115
|
+
}
|
|
116
|
+
/>
|
|
117
|
+
</FlexView>
|
|
118
|
+
</View>
|
|
123
119
|
</Modal>
|
|
124
120
|
);
|
|
125
121
|
}
|
|
@@ -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,6 +3,7 @@ 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';
|
|
@@ -64,7 +65,7 @@ export const WcHelpersUtil = {
|
|
|
64
65
|
|
|
65
66
|
applyNamespaceOverrides(
|
|
66
67
|
baseNamespaces: NamespaceConfig,
|
|
67
|
-
overrides?:
|
|
68
|
+
overrides?: UniversalProviderConfigOverride
|
|
68
69
|
): NamespaceConfig {
|
|
69
70
|
if (!overrides) {
|
|
70
71
|
return { ...baseNamespaces };
|
|
@@ -160,7 +161,7 @@ export const WcHelpersUtil = {
|
|
|
160
161
|
|
|
161
162
|
createNamespaces(
|
|
162
163
|
caipNetworks: AppKitNetwork[],
|
|
163
|
-
configOverride?:
|
|
164
|
+
configOverride?: UniversalProviderConfigOverride
|
|
164
165
|
): NamespaceConfig {
|
|
165
166
|
const defaultNamespaces = caipNetworks.reduce<NamespaceConfig>((acc, chain) => {
|
|
166
167
|
const { id, rpcUrls } = chain;
|
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 {
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EventsController,
|
|
3
|
+
OnRampController,
|
|
4
|
+
RouterController,
|
|
5
|
+
SendController,
|
|
6
|
+
SwapController
|
|
7
|
+
} from '@reown/appkit-core-react-native';
|
|
8
|
+
|
|
9
|
+
export const RouterUtil = {
|
|
10
|
+
checkBack() {
|
|
11
|
+
this.checkSwapBack();
|
|
12
|
+
this.checkSendBack();
|
|
13
|
+
this.checkOnRampBack();
|
|
14
|
+
this.checkSocialLoginBack();
|
|
15
|
+
this.checkOnRampBackLoading();
|
|
16
|
+
},
|
|
17
|
+
checkOnRampBackLoading() {
|
|
18
|
+
if (
|
|
19
|
+
RouterController.state.view === 'OnRampLoading' &&
|
|
20
|
+
EventsController.state.data.event === 'BUY_SUBMITTED'
|
|
21
|
+
) {
|
|
22
|
+
// Send event only if the onramp url was already created
|
|
23
|
+
EventsController.sendEvent({ type: 'track', event: 'BUY_CANCEL' });
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
checkSocialLoginBack() {
|
|
27
|
+
if (RouterController.state.view === 'ConnectingSocial') {
|
|
28
|
+
EventsController.sendEvent({
|
|
29
|
+
type: 'track',
|
|
30
|
+
event: 'SOCIAL_LOGIN_CANCELED',
|
|
31
|
+
properties: { provider: RouterController.state.data?.socialProvider! }
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
checkSwapBack() {
|
|
36
|
+
if (RouterController.state.view === 'Swap') {
|
|
37
|
+
SwapController.clearTokens();
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
checkSendBack() {
|
|
41
|
+
if (RouterController.state.view === 'WalletSend') {
|
|
42
|
+
SendController.resetState();
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
checkOnRampBack() {
|
|
46
|
+
if (RouterController.state.view === 'OnRamp') {
|
|
47
|
+
OnRampController.resetState();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|