@reown/appkit-react-native 2.0.0-alpha.1 → 2.0.0-alpha.2
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 +236 -61
- package/lib/commonjs/AppKit.js.map +1 -1
- package/lib/commonjs/AppKitContext.js +8 -6
- package/lib/commonjs/AppKitContext.js.map +1 -1
- package/lib/commonjs/config/animations.js.map +1 -1
- package/lib/commonjs/connectors/WalletConnectConnector.js +97 -9
- package/lib/commonjs/connectors/WalletConnectConnector.js.map +1 -1
- package/lib/commonjs/hooks/useAccount.js +2 -1
- package/lib/commonjs/hooks/useAccount.js.map +1 -1
- package/lib/commonjs/hooks/useAppKit.js.map +1 -1
- package/lib/commonjs/hooks/useAppKitEvents.js.map +1 -1
- package/lib/commonjs/hooks/useCustomDimensions.js.map +1 -1
- package/lib/commonjs/hooks/useDebounceCallback.js.map +1 -1
- package/lib/commonjs/hooks/useKeyboard.js.map +1 -1
- package/lib/commonjs/hooks/useProvider.js.map +1 -1
- package/lib/commonjs/hooks/useTimeout.js.map +1 -1
- package/lib/commonjs/hooks/useWalletInfo.js.map +1 -1
- package/lib/commonjs/index.js +8 -64
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modal/w3m-account-button/index.js +21 -20
- package/lib/commonjs/modal/w3m-account-button/index.js.map +1 -1
- package/lib/commonjs/modal/w3m-button/index.js +4 -3
- package/lib/commonjs/modal/w3m-button/index.js.map +1 -1
- package/lib/commonjs/modal/w3m-connect-button/index.js +13 -10
- package/lib/commonjs/modal/w3m-connect-button/index.js.map +1 -1
- package/lib/commonjs/modal/w3m-modal/index.js +34 -80
- package/lib/commonjs/modal/w3m-modal/index.js.map +1 -1
- package/lib/commonjs/modal/w3m-modal/styles.js.map +1 -1
- package/lib/commonjs/modal/w3m-network-button/index.js +23 -14
- package/lib/commonjs/modal/w3m-network-button/index.js.map +1 -1
- package/lib/commonjs/modal/w3m-router/index.js +5 -31
- package/lib/commonjs/modal/w3m-router/index.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/partials/w3m-account-activity/index.js +83 -70
- package/lib/commonjs/partials/w3m-account-activity/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-account-activity/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-account-activity/utils.js.map +1 -1
- package/lib/commonjs/partials/w3m-account-tokens/index.js +56 -38
- package/lib/commonjs/partials/w3m-account-tokens/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-account-wallet-features/index.js +80 -70
- package/lib/commonjs/partials/w3m-account-wallet-features/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-account-wallet-features/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-all-wallets-list/index.js +29 -26
- package/lib/commonjs/partials/w3m-all-wallets-list/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-all-wallets-list/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-all-wallets-search/index.js +27 -26
- package/lib/commonjs/partials/w3m-all-wallets-search/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-all-wallets-search/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-body/index.js +14 -10
- package/lib/commonjs/partials/w3m-connecting-body/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-body/utils.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-header/index.js +9 -7
- package/lib/commonjs/partials/w3m-connecting-header/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-mobile/components/StoreLink.js +17 -13
- package/lib/commonjs/partials/w3m-connecting-mobile/components/StoreLink.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-mobile/index.js +49 -43
- package/lib/commonjs/partials/w3m-connecting-mobile/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-mobile/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-qrcode/index.js +27 -21
- package/lib/commonjs/partials/w3m-connecting-qrcode/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-qrcode/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-web/index.js +40 -34
- package/lib/commonjs/partials/w3m-connecting-web/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-web/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-header/index.js +24 -38
- package/lib/commonjs/partials/w3m-header/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-header/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-information-modal/index.js +29 -23
- package/lib/commonjs/partials/w3m-information-modal/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-information-modal/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-otp-code/index.js +45 -35
- package/lib/commonjs/partials/w3m-otp-code/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-otp-code/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-placeholder/index.js +27 -22
- package/lib/commonjs/partials/w3m-placeholder/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-selector-modal/index.js +68 -58
- package/lib/commonjs/partials/w3m-selector-modal/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-selector-modal/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-send-input-address/index.js +27 -35
- package/lib/commonjs/partials/w3m-send-input-address/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-send-input-address/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-send-input-token/index.js +71 -60
- package/lib/commonjs/partials/w3m-send-input-token/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-send-input-token/styles.js +3 -0
- package/lib/commonjs/partials/w3m-send-input-token/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-send-input-token/utils.js +2 -2
- package/lib/commonjs/partials/w3m-send-input-token/utils.js.map +1 -1
- package/lib/commonjs/partials/w3m-snackbar/index.js +10 -13
- package/lib/commonjs/partials/w3m-snackbar/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-snackbar/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-swap-details/index.js +130 -104
- package/lib/commonjs/partials/w3m-swap-details/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-swap-details/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-swap-details/utils.js.map +1 -1
- package/lib/commonjs/partials/w3m-swap-input/index.js +97 -68
- package/lib/commonjs/partials/w3m-swap-input/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-swap-input/styles.js +3 -0
- package/lib/commonjs/partials/w3m-swap-input/styles.js.map +1 -1
- package/lib/commonjs/utils/HelpersUtil.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js +6 -8
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/UiUtil.js +7 -4
- package/lib/commonjs/utils/UiUtil.js.map +1 -1
- package/lib/commonjs/views/w3m-account-default-view/components/auth-buttons.js +21 -25
- package/lib/commonjs/views/w3m-account-default-view/components/auth-buttons.js.map +1 -1
- package/lib/commonjs/views/w3m-account-default-view/components/upgrade-wallet-button.js +27 -22
- package/lib/commonjs/views/w3m-account-default-view/components/upgrade-wallet-button.js.map +1 -1
- package/lib/commonjs/views/w3m-account-default-view/index.js +215 -181
- package/lib/commonjs/views/w3m-account-default-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-account-default-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-account-view/index.js +54 -48
- package/lib/commonjs/views/w3m-account-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-account-view/styles.js +0 -5
- package/lib/commonjs/views/w3m-account-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-all-wallets-view/index.js +27 -23
- package/lib/commonjs/views/w3m-all-wallets-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-all-wallets-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-socials-view/index.js +20 -23
- package/lib/commonjs/views/w3m-connect-socials-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-socials-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/components/all-wallet-list.js +11 -10
- package/lib/commonjs/views/w3m-connect-view/components/all-wallet-list.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/components/all-wallets-button.js +3 -6
- package/lib/commonjs/views/w3m-connect-view/components/all-wallets-button.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/components/custom-wallet-list.js +8 -7
- 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 +5 -6
- 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 +44 -37
- package/lib/commonjs/views/w3m-connect-view/components/social-login-list.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/index.js +65 -93
- package/lib/commonjs/views/w3m-connect-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/utils.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-external-view/index.js +62 -55
- package/lib/commonjs/views/w3m-connecting-external-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-external-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-siwe-view/index.js +150 -0
- package/lib/commonjs/views/w3m-connecting-siwe-view/index.js.map +1 -0
- package/lib/commonjs/views/{w3m-upgrade-to-smart-account-view → w3m-connecting-siwe-view}/styles.js +11 -11
- package/lib/commonjs/views/w3m-connecting-siwe-view/styles.js.map +1 -0
- package/lib/commonjs/views/w3m-connecting-social-view/index.js +64 -81
- package/lib/commonjs/views/w3m-connecting-social-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-social-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-view/index.js +14 -30
- package/lib/commonjs/views/w3m-connecting-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-get-wallet-view/index.js +15 -13
- package/lib/commonjs/views/w3m-get-wallet-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-get-wallet-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-network-switch-view/index.js +64 -54
- package/lib/commonjs/views/w3m-network-switch-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-network-switch-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-networks-view/index.js +65 -49
- package/lib/commonjs/views/w3m-networks-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-networks-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-checkout-view/index.js +187 -141
- package/lib/commonjs/views/w3m-onramp-checkout-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-loading-view/index.js +45 -39
- package/lib/commonjs/views/w3m-onramp-loading-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-loading-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-settings-view/components/Country.js +36 -29
- package/lib/commonjs/views/w3m-onramp-settings-view/components/Country.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-settings-view/index.js +82 -64
- package/lib/commonjs/views/w3m-onramp-settings-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-settings-view/styles.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 +95 -74
- package/lib/commonjs/views/w3m-onramp-transaction-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-transaction-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/components/Currency.js +40 -30
- package/lib/commonjs/views/w3m-onramp-view/components/Currency.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/components/CurrencyInput.js +69 -57
- package/lib/commonjs/views/w3m-onramp-view/components/CurrencyInput.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/components/Header.js +22 -19
- package/lib/commonjs/views/w3m-onramp-view/components/Header.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/components/LoadingView.js +52 -43
- package/lib/commonjs/views/w3m-onramp-view/components/LoadingView.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/components/PaymentButton.js +120 -0
- package/lib/commonjs/views/w3m-onramp-view/components/PaymentButton.js.map +1 -0
- package/lib/commonjs/views/w3m-onramp-view/components/PaymentMethod.js +38 -33
- package/lib/commonjs/views/w3m-onramp-view/components/PaymentMethod.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/components/Quote.js +49 -38
- package/lib/commonjs/views/w3m-onramp-view/components/Quote.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/components/SelectPaymentModal.js +103 -106
- package/lib/commonjs/views/w3m-onramp-view/components/SelectPaymentModal.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/index.js +115 -121
- package/lib/commonjs/views/w3m-onramp-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/styles.js +4 -0
- package/lib/commonjs/views/w3m-onramp-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-view/utils.js +19 -78
- package/lib/commonjs/views/w3m-onramp-view/utils.js.map +1 -1
- package/lib/commonjs/views/w3m-swap-preview-view/index.js +90 -71
- package/lib/commonjs/views/w3m-swap-preview-view/index.js.map +1 -1
- 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 +145 -0
- package/lib/commonjs/views/w3m-swap-view/components/select-token-view/index.js.map +1 -0
- package/lib/commonjs/views/{w3m-swap-select-token-view → w3m-swap-view/components/select-token-view}/styles.js +11 -2
- package/lib/commonjs/views/w3m-swap-view/components/select-token-view/styles.js.map +1 -0
- package/lib/commonjs/views/{w3m-swap-select-token-view → w3m-swap-view/components/select-token-view}/utils.js +7 -4
- package/lib/commonjs/views/w3m-swap-view/components/select-token-view/utils.js.map +1 -0
- package/lib/commonjs/views/w3m-swap-view/index.js +87 -72
- package/lib/commonjs/views/w3m-swap-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-swap-view/styles.js +4 -0
- package/lib/commonjs/views/w3m-swap-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-transactions-view/index.js +2 -1
- package/lib/commonjs/views/w3m-transactions-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-unsupported-chain-view/index.js +42 -45
- package/lib/commonjs/views/w3m-unsupported-chain-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-unsupported-chain-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-upgrade-email-wallet-view/index.js +20 -21
- package/lib/commonjs/views/w3m-upgrade-email-wallet-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-compatible-networks-view/index.js +33 -25
- package/lib/commonjs/views/w3m-wallet-compatible-networks-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-compatible-networks-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-receive-view/index.js +47 -44
- package/lib/commonjs/views/w3m-wallet-receive-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-receive-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-preview-view/components/preview-send-details.js +41 -40
- package/lib/commonjs/views/w3m-wallet-send-preview-view/components/preview-send-details.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-preview-view/components/preview-send-pill.js +9 -6
- package/lib/commonjs/views/w3m-wallet-send-preview-view/components/preview-send-pill.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-preview-view/index.js +96 -81
- package/lib/commonjs/views/w3m-wallet-send-preview-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-preview-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-select-token-view/index.js +43 -42
- package/lib/commonjs/views/w3m-wallet-send-select-token-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-select-token-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-view/index.js +52 -56
- package/lib/commonjs/views/w3m-wallet-send-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-what-is-a-network-view/index.js +55 -45
- package/lib/commonjs/views/w3m-what-is-a-network-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-what-is-a-network-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-what-is-a-wallet-view/index.js +76 -63
- package/lib/commonjs/views/w3m-what-is-a-wallet-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-what-is-a-wallet-view/styles.js.map +1 -1
- package/lib/module/AppKit.js +239 -63
- package/lib/module/AppKit.js.map +1 -1
- package/lib/module/AppKitContext.js +9 -4
- package/lib/module/AppKitContext.js.map +1 -1
- package/lib/module/config/animations.js +2 -0
- package/lib/module/config/animations.js.map +1 -1
- package/lib/module/connectors/WalletConnectConnector.js +99 -9
- package/lib/module/connectors/WalletConnectConnector.js.map +1 -1
- package/lib/module/hooks/useAccount.js +4 -1
- package/lib/module/hooks/useAccount.js.map +1 -1
- package/lib/module/hooks/useAppKit.js +2 -0
- package/lib/module/hooks/useAppKit.js.map +1 -1
- package/lib/module/hooks/useAppKitEvents.js +2 -0
- package/lib/module/hooks/useAppKitEvents.js.map +1 -1
- package/lib/module/hooks/useCustomDimensions.js +2 -0
- package/lib/module/hooks/useCustomDimensions.js.map +1 -1
- package/lib/module/hooks/useDebounceCallback.js +2 -0
- package/lib/module/hooks/useDebounceCallback.js.map +1 -1
- package/lib/module/hooks/useKeyboard.js +2 -0
- package/lib/module/hooks/useKeyboard.js.map +1 -1
- package/lib/module/hooks/useProvider.js +2 -0
- package/lib/module/hooks/useProvider.js.map +1 -1
- package/lib/module/hooks/useTimeout.js +2 -0
- package/lib/module/hooks/useTimeout.js.map +1 -1
- package/lib/module/hooks/useWalletInfo.js +2 -0
- package/lib/module/hooks/useWalletInfo.js.map +1 -1
- package/lib/module/index.js +9 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/modal/w3m-account-button/index.js +24 -22
- package/lib/module/modal/w3m-account-button/index.js.map +1 -1
- package/lib/module/modal/w3m-button/index.js +7 -4
- package/lib/module/modal/w3m-button/index.js.map +1 -1
- package/lib/module/modal/w3m-connect-button/index.js +15 -10
- package/lib/module/modal/w3m-connect-button/index.js.map +1 -1
- package/lib/module/modal/w3m-modal/index.js +37 -81
- package/lib/module/modal/w3m-modal/index.js.map +1 -1
- package/lib/module/modal/w3m-modal/styles.js +2 -0
- package/lib/module/modal/w3m-modal/styles.js.map +1 -1
- package/lib/module/modal/w3m-network-button/index.js +26 -15
- package/lib/module/modal/w3m-network-button/index.js.map +1 -1
- package/lib/module/modal/w3m-router/index.js +6 -30
- package/lib/module/modal/w3m-router/index.js.map +1 -1
- package/lib/module/partials/w3m-account-activity/index.js +86 -71
- package/lib/module/partials/w3m-account-activity/index.js.map +1 -1
- package/lib/module/partials/w3m-account-activity/styles.js +2 -0
- package/lib/module/partials/w3m-account-activity/styles.js.map +1 -1
- package/lib/module/partials/w3m-account-activity/utils.js +2 -0
- package/lib/module/partials/w3m-account-activity/utils.js.map +1 -1
- package/lib/module/partials/w3m-account-tokens/index.js +60 -40
- package/lib/module/partials/w3m-account-tokens/index.js.map +1 -1
- package/lib/module/partials/w3m-account-wallet-features/index.js +83 -71
- package/lib/module/partials/w3m-account-wallet-features/index.js.map +1 -1
- package/lib/module/partials/w3m-account-wallet-features/styles.js +2 -0
- package/lib/module/partials/w3m-account-wallet-features/styles.js.map +1 -1
- package/lib/module/partials/w3m-all-wallets-list/index.js +31 -26
- package/lib/module/partials/w3m-all-wallets-list/index.js.map +1 -1
- package/lib/module/partials/w3m-all-wallets-list/styles.js +2 -0
- package/lib/module/partials/w3m-all-wallets-list/styles.js.map +1 -1
- package/lib/module/partials/w3m-all-wallets-search/index.js +29 -26
- package/lib/module/partials/w3m-all-wallets-search/index.js.map +1 -1
- package/lib/module/partials/w3m-all-wallets-search/styles.js +2 -0
- package/lib/module/partials/w3m-all-wallets-search/styles.js.map +1 -1
- package/lib/module/partials/w3m-connecting-body/index.js +16 -10
- package/lib/module/partials/w3m-connecting-body/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-body/utils.js +2 -0
- package/lib/module/partials/w3m-connecting-body/utils.js.map +1 -1
- package/lib/module/partials/w3m-connecting-header/index.js +11 -7
- package/lib/module/partials/w3m-connecting-header/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-mobile/components/StoreLink.js +19 -13
- package/lib/module/partials/w3m-connecting-mobile/components/StoreLink.js.map +1 -1
- package/lib/module/partials/w3m-connecting-mobile/index.js +51 -43
- package/lib/module/partials/w3m-connecting-mobile/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-mobile/styles.js +2 -0
- package/lib/module/partials/w3m-connecting-mobile/styles.js.map +1 -1
- package/lib/module/partials/w3m-connecting-qrcode/index.js +30 -22
- package/lib/module/partials/w3m-connecting-qrcode/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-qrcode/styles.js +2 -0
- package/lib/module/partials/w3m-connecting-qrcode/styles.js.map +1 -1
- package/lib/module/partials/w3m-connecting-web/index.js +42 -34
- package/lib/module/partials/w3m-connecting-web/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-web/styles.js +2 -0
- package/lib/module/partials/w3m-connecting-web/styles.js.map +1 -1
- package/lib/module/partials/w3m-header/index.js +27 -39
- package/lib/module/partials/w3m-header/index.js.map +1 -1
- package/lib/module/partials/w3m-header/styles.js +2 -0
- package/lib/module/partials/w3m-header/styles.js.map +1 -1
- package/lib/module/partials/w3m-information-modal/index.js +31 -23
- package/lib/module/partials/w3m-information-modal/index.js.map +1 -1
- package/lib/module/partials/w3m-information-modal/styles.js +2 -0
- package/lib/module/partials/w3m-information-modal/styles.js.map +1 -1
- package/lib/module/partials/w3m-otp-code/index.js +47 -35
- package/lib/module/partials/w3m-otp-code/index.js.map +1 -1
- package/lib/module/partials/w3m-otp-code/styles.js +2 -0
- package/lib/module/partials/w3m-otp-code/styles.js.map +1 -1
- package/lib/module/partials/w3m-placeholder/index.js +29 -22
- package/lib/module/partials/w3m-placeholder/index.js.map +1 -1
- package/lib/module/partials/w3m-selector-modal/index.js +71 -59
- package/lib/module/partials/w3m-selector-modal/index.js.map +1 -1
- package/lib/module/partials/w3m-selector-modal/styles.js +2 -0
- package/lib/module/partials/w3m-selector-modal/styles.js.map +1 -1
- package/lib/module/partials/w3m-send-input-address/index.js +30 -36
- package/lib/module/partials/w3m-send-input-address/index.js.map +1 -1
- package/lib/module/partials/w3m-send-input-address/styles.js +2 -0
- package/lib/module/partials/w3m-send-input-address/styles.js.map +1 -1
- package/lib/module/partials/w3m-send-input-token/index.js +75 -62
- package/lib/module/partials/w3m-send-input-token/index.js.map +1 -1
- package/lib/module/partials/w3m-send-input-token/styles.js +5 -0
- package/lib/module/partials/w3m-send-input-token/styles.js.map +1 -1
- package/lib/module/partials/w3m-send-input-token/utils.js +4 -2
- package/lib/module/partials/w3m-send-input-token/utils.js.map +1 -1
- package/lib/module/partials/w3m-snackbar/index.js +12 -13
- package/lib/module/partials/w3m-snackbar/index.js.map +1 -1
- package/lib/module/partials/w3m-snackbar/styles.js +2 -0
- package/lib/module/partials/w3m-snackbar/styles.js.map +1 -1
- package/lib/module/partials/w3m-swap-details/index.js +132 -104
- package/lib/module/partials/w3m-swap-details/index.js.map +1 -1
- package/lib/module/partials/w3m-swap-details/styles.js +2 -0
- package/lib/module/partials/w3m-swap-details/styles.js.map +1 -1
- package/lib/module/partials/w3m-swap-details/utils.js +2 -0
- package/lib/module/partials/w3m-swap-details/utils.js.map +1 -1
- package/lib/module/partials/w3m-swap-input/index.js +99 -68
- package/lib/module/partials/w3m-swap-input/index.js.map +1 -1
- package/lib/module/partials/w3m-swap-input/styles.js +5 -0
- package/lib/module/partials/w3m-swap-input/styles.js.map +1 -1
- package/lib/module/utils/HelpersUtil.js +2 -0
- package/lib/module/utils/HelpersUtil.js.map +1 -1
- package/lib/module/utils/NetworkUtil.js +8 -8
- package/lib/module/utils/NetworkUtil.js.map +1 -1
- package/lib/module/utils/UiUtil.js +9 -4
- package/lib/module/utils/UiUtil.js.map +1 -1
- package/lib/module/views/w3m-account-default-view/components/auth-buttons.js +24 -26
- package/lib/module/views/w3m-account-default-view/components/auth-buttons.js.map +1 -1
- package/lib/module/views/w3m-account-default-view/components/upgrade-wallet-button.js +29 -22
- package/lib/module/views/w3m-account-default-view/components/upgrade-wallet-button.js.map +1 -1
- package/lib/module/views/w3m-account-default-view/index.js +217 -182
- package/lib/module/views/w3m-account-default-view/index.js.map +1 -1
- package/lib/module/views/w3m-account-default-view/styles.js +2 -0
- package/lib/module/views/w3m-account-default-view/styles.js.map +1 -1
- package/lib/module/views/w3m-account-view/index.js +59 -51
- package/lib/module/views/w3m-account-view/index.js.map +1 -1
- package/lib/module/views/w3m-account-view/styles.js +2 -5
- package/lib/module/views/w3m-account-view/styles.js.map +1 -1
- package/lib/module/views/w3m-all-wallets-view/index.js +30 -24
- package/lib/module/views/w3m-all-wallets-view/index.js.map +1 -1
- package/lib/module/views/w3m-all-wallets-view/styles.js +2 -0
- package/lib/module/views/w3m-all-wallets-view/styles.js.map +1 -1
- package/lib/module/views/w3m-connect-socials-view/index.js +23 -24
- package/lib/module/views/w3m-connect-socials-view/index.js.map +1 -1
- package/lib/module/views/w3m-connect-socials-view/styles.js +2 -0
- package/lib/module/views/w3m-connect-socials-view/styles.js.map +1 -1
- package/lib/module/views/w3m-connect-view/components/all-wallet-list.js +13 -10
- package/lib/module/views/w3m-connect-view/components/all-wallet-list.js.map +1 -1
- package/lib/module/views/w3m-connect-view/components/all-wallets-button.js +5 -6
- package/lib/module/views/w3m-connect-view/components/all-wallets-button.js.map +1 -1
- package/lib/module/views/w3m-connect-view/components/custom-wallet-list.js +11 -8
- 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 +7 -6
- 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 +47 -38
- package/lib/module/views/w3m-connect-view/components/social-login-list.js.map +1 -1
- package/lib/module/views/w3m-connect-view/index.js +70 -96
- package/lib/module/views/w3m-connect-view/index.js.map +1 -1
- package/lib/module/views/w3m-connect-view/styles.js +2 -0
- package/lib/module/views/w3m-connect-view/styles.js.map +1 -1
- package/lib/module/views/w3m-connect-view/utils.js +2 -0
- package/lib/module/views/w3m-connect-view/utils.js.map +1 -1
- package/lib/module/views/w3m-connecting-external-view/index.js +65 -56
- package/lib/module/views/w3m-connecting-external-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-external-view/styles.js +2 -0
- package/lib/module/views/w3m-connecting-external-view/styles.js.map +1 -1
- package/lib/module/views/w3m-connecting-siwe-view/index.js +145 -0
- package/lib/module/views/w3m-connecting-siwe-view/index.js.map +1 -0
- package/lib/module/views/w3m-connecting-siwe-view/styles.js +31 -0
- package/lib/module/views/w3m-connecting-siwe-view/styles.js.map +1 -0
- package/lib/module/views/w3m-connecting-social-view/index.js +68 -83
- package/lib/module/views/w3m-connecting-social-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-social-view/styles.js +2 -0
- package/lib/module/views/w3m-connecting-social-view/styles.js.map +1 -1
- package/lib/module/views/w3m-connecting-view/index.js +17 -31
- package/lib/module/views/w3m-connecting-view/index.js.map +1 -1
- package/lib/module/views/w3m-get-wallet-view/index.js +17 -13
- package/lib/module/views/w3m-get-wallet-view/index.js.map +1 -1
- package/lib/module/views/w3m-get-wallet-view/styles.js +2 -0
- package/lib/module/views/w3m-get-wallet-view/styles.js.map +1 -1
- package/lib/module/views/w3m-network-switch-view/index.js +67 -54
- package/lib/module/views/w3m-network-switch-view/index.js.map +1 -1
- package/lib/module/views/w3m-network-switch-view/styles.js +2 -0
- package/lib/module/views/w3m-network-switch-view/styles.js.map +1 -1
- package/lib/module/views/w3m-networks-view/index.js +68 -50
- package/lib/module/views/w3m-networks-view/index.js.map +1 -1
- package/lib/module/views/w3m-networks-view/styles.js +2 -0
- package/lib/module/views/w3m-networks-view/styles.js.map +1 -1
- package/lib/module/views/w3m-onramp-checkout-view/index.js +190 -142
- package/lib/module/views/w3m-onramp-checkout-view/index.js.map +1 -1
- package/lib/module/views/w3m-onramp-loading-view/index.js +47 -39
- package/lib/module/views/w3m-onramp-loading-view/index.js.map +1 -1
- package/lib/module/views/w3m-onramp-loading-view/styles.js +2 -0
- package/lib/module/views/w3m-onramp-loading-view/styles.js.map +1 -1
- package/lib/module/views/w3m-onramp-settings-view/components/Country.js +38 -29
- package/lib/module/views/w3m-onramp-settings-view/components/Country.js.map +1 -1
- package/lib/module/views/w3m-onramp-settings-view/index.js +84 -64
- package/lib/module/views/w3m-onramp-settings-view/index.js.map +1 -1
- package/lib/module/views/w3m-onramp-settings-view/styles.js +2 -0
- package/lib/module/views/w3m-onramp-settings-view/styles.js.map +1 -1
- package/lib/module/views/w3m-onramp-settings-view/utils.js +2 -0
- package/lib/module/views/w3m-onramp-settings-view/utils.js.map +1 -1
- package/lib/module/views/w3m-onramp-transaction-view/index.js +98 -75
- package/lib/module/views/w3m-onramp-transaction-view/index.js.map +1 -1
- package/lib/module/views/w3m-onramp-transaction-view/styles.js +2 -0
- package/lib/module/views/w3m-onramp-transaction-view/styles.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/components/Currency.js +44 -32
- package/lib/module/views/w3m-onramp-view/components/Currency.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/components/CurrencyInput.js +72 -59
- package/lib/module/views/w3m-onramp-view/components/CurrencyInput.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/components/Header.js +25 -21
- package/lib/module/views/w3m-onramp-view/components/Header.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/components/LoadingView.js +54 -43
- package/lib/module/views/w3m-onramp-view/components/LoadingView.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/components/PaymentButton.js +116 -0
- package/lib/module/views/w3m-onramp-view/components/PaymentButton.js.map +1 -0
- package/lib/module/views/w3m-onramp-view/components/PaymentMethod.js +40 -33
- package/lib/module/views/w3m-onramp-view/components/PaymentMethod.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/components/Quote.js +51 -38
- package/lib/module/views/w3m-onramp-view/components/Quote.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/components/SelectPaymentModal.js +108 -110
- package/lib/module/views/w3m-onramp-view/components/SelectPaymentModal.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/index.js +121 -126
- package/lib/module/views/w3m-onramp-view/index.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/styles.js +6 -0
- package/lib/module/views/w3m-onramp-view/styles.js.map +1 -1
- package/lib/module/views/w3m-onramp-view/utils.js +20 -77
- package/lib/module/views/w3m-onramp-view/utils.js.map +1 -1
- package/lib/module/views/w3m-swap-preview-view/index.js +92 -71
- package/lib/module/views/w3m-swap-preview-view/index.js.map +1 -1
- package/lib/module/views/w3m-swap-preview-view/styles.js +2 -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 +140 -0
- package/lib/module/views/w3m-swap-view/components/select-token-view/index.js.map +1 -0
- package/lib/module/views/{w3m-swap-select-token-view → w3m-swap-view/components/select-token-view}/styles.js +14 -3
- package/lib/module/views/w3m-swap-view/components/select-token-view/styles.js.map +1 -0
- package/lib/module/views/{w3m-swap-select-token-view → w3m-swap-view/components/select-token-view}/utils.js +9 -4
- package/lib/module/views/w3m-swap-view/components/select-token-view/utils.js.map +1 -0
- package/lib/module/views/w3m-swap-view/index.js +91 -74
- package/lib/module/views/w3m-swap-view/index.js.map +1 -1
- package/lib/module/views/w3m-swap-view/styles.js +6 -0
- package/lib/module/views/w3m-swap-view/styles.js.map +1 -1
- package/lib/module/views/w3m-transactions-view/index.js +4 -1
- package/lib/module/views/w3m-transactions-view/index.js.map +1 -1
- package/lib/module/views/w3m-unsupported-chain-view/index.js +45 -46
- package/lib/module/views/w3m-unsupported-chain-view/index.js.map +1 -1
- package/lib/module/views/w3m-unsupported-chain-view/styles.js +2 -0
- package/lib/module/views/w3m-unsupported-chain-view/styles.js.map +1 -1
- package/lib/module/views/w3m-upgrade-email-wallet-view/index.js +22 -21
- package/lib/module/views/w3m-upgrade-email-wallet-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-compatible-networks-view/index.js +36 -26
- package/lib/module/views/w3m-wallet-compatible-networks-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-compatible-networks-view/styles.js +2 -0
- package/lib/module/views/w3m-wallet-compatible-networks-view/styles.js.map +1 -1
- package/lib/module/views/w3m-wallet-receive-view/index.js +50 -45
- package/lib/module/views/w3m-wallet-receive-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-receive-view/styles.js +2 -0
- package/lib/module/views/w3m-wallet-receive-view/styles.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-preview-view/components/preview-send-details.js +44 -41
- package/lib/module/views/w3m-wallet-send-preview-view/components/preview-send-details.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-preview-view/components/preview-send-pill.js +11 -6
- package/lib/module/views/w3m-wallet-send-preview-view/components/preview-send-pill.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-preview-view/index.js +99 -82
- package/lib/module/views/w3m-wallet-send-preview-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-preview-view/styles.js +2 -0
- package/lib/module/views/w3m-wallet-send-preview-view/styles.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-select-token-view/index.js +46 -43
- package/lib/module/views/w3m-wallet-send-select-token-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-select-token-view/styles.js +2 -0
- package/lib/module/views/w3m-wallet-send-select-token-view/styles.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-view/index.js +56 -58
- package/lib/module/views/w3m-wallet-send-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-view/styles.js +2 -0
- package/lib/module/views/w3m-wallet-send-view/styles.js.map +1 -1
- package/lib/module/views/w3m-what-is-a-network-view/index.js +57 -45
- package/lib/module/views/w3m-what-is-a-network-view/index.js.map +1 -1
- package/lib/module/views/w3m-what-is-a-network-view/styles.js +2 -0
- package/lib/module/views/w3m-what-is-a-network-view/styles.js.map +1 -1
- package/lib/module/views/w3m-what-is-a-wallet-view/index.js +78 -63
- package/lib/module/views/w3m-what-is-a-wallet-view/index.js.map +1 -1
- package/lib/module/views/w3m-what-is-a-wallet-view/styles.js +2 -0
- package/lib/module/views/w3m-what-is-a-wallet-view/styles.js.map +1 -1
- package/lib/typescript/AppKit.d.ts +14 -8
- 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 +3 -3
- package/lib/typescript/connectors/WalletConnectConnector.d.ts.map +1 -1
- package/lib/typescript/hooks/useAccount.d.ts +1 -0
- package/lib/typescript/hooks/useAccount.d.ts.map +1 -1
- package/lib/typescript/hooks/useAppKitEvents.d.ts +1 -10
- package/lib/typescript/hooks/useAppKitEvents.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +5 -7
- 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-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 +2 -1
- package/lib/typescript/partials/w3m-account-tokens/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-account-wallet-features/index.d.ts +2 -2
- package/lib/typescript/partials/w3m-account-wallet-features/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-connecting-qrcode/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-header/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-selector-modal/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-send-input-address/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-send-input-token/index.d.ts +2 -2
- package/lib/typescript/partials/w3m-send-input-token/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-send-input-token/styles.d.ts +3 -0
- package/lib/typescript/partials/w3m-send-input-token/styles.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-snackbar/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-swap-input/index.d.ts +2 -1
- package/lib/typescript/partials/w3m-swap-input/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-swap-input/styles.d.ts +3 -0
- package/lib/typescript/partials/w3m-swap-input/styles.d.ts.map +1 -1
- package/lib/typescript/utils/HelpersUtil.d.ts +1 -1
- package/lib/typescript/utils/HelpersUtil.d.ts.map +1 -1
- package/lib/typescript/utils/NetworkUtil.d.ts +3 -2
- package/lib/typescript/utils/NetworkUtil.d.ts.map +1 -1
- package/lib/typescript/utils/UiUtil.d.ts +3 -4
- package/lib/typescript/utils/UiUtil.d.ts.map +1 -1
- package/lib/typescript/views/w3m-account-default-view/components/auth-buttons.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-account-view/styles.d.ts +0 -5
- package/lib/typescript/views/w3m-account-view/styles.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-socials-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/components/all-wallet-list.d.ts +1 -2
- package/lib/typescript/views/w3m-connect-view/components/all-wallet-list.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/components/all-wallets-button.d.ts +1 -2
- package/lib/typescript/views/w3m-connect-view/components/all-wallets-button.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/components/custom-wallet-list.d.ts +1 -2
- 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 -2
- package/lib/typescript/views/w3m-connect-view/components/recent-wallet-list.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/components/social-login-list.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/index.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 +2 -0
- package/lib/typescript/views/w3m-connecting-siwe-view/index.d.ts.map +1 -0
- package/lib/typescript/views/{w3m-upgrade-to-smart-account-view → w3m-connecting-siwe-view}/styles.d.ts +11 -11
- package/lib/typescript/views/w3m-connecting-siwe-view/styles.d.ts.map +1 -0
- package/lib/typescript/views/w3m-connecting-social-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connecting-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-transaction-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-view/components/Currency.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-view/components/CurrencyInput.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/PaymentButton.d.ts +13 -0
- package/lib/typescript/views/w3m-onramp-view/components/PaymentButton.d.ts.map +1 -0
- 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 +2 -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/styles.d.ts +4 -0
- package/lib/typescript/views/w3m-onramp-view/styles.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-view/utils.d.ts +2 -2
- 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-view/components/select-token-view/index.d.ts +8 -0
- package/lib/typescript/views/w3m-swap-view/components/select-token-view/index.d.ts.map +1 -0
- package/lib/typescript/views/{w3m-swap-select-token-view → w3m-swap-view/components/select-token-view}/styles.d.ts +11 -2
- package/lib/typescript/views/w3m-swap-view/components/select-token-view/styles.d.ts.map +1 -0
- package/lib/typescript/views/w3m-swap-view/components/select-token-view/utils.d.ts +7 -0
- package/lib/typescript/views/w3m-swap-view/components/select-token-view/utils.d.ts.map +1 -0
- package/lib/typescript/views/w3m-swap-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-swap-view/styles.d.ts +4 -0
- 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-upgrade-email-wallet-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-preview-view/components/preview-send-details.d.ts +3 -3
- package/lib/typescript/views/w3m-wallet-send-preview-view/components/preview-send-details.d.ts.map +1 -1
- package/lib/typescript/views/w3m-wallet-send-preview-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/package.json +15 -26
- package/src/AppKit.ts +317 -90
- package/src/AppKitContext.tsx +2 -1
- package/src/connectors/WalletConnectConnector.ts +107 -12
- package/src/hooks/useAccount.ts +2 -1
- package/src/index.ts +6 -11
- package/src/modal/w3m-account-button/index.tsx +9 -12
- package/src/modal/w3m-button/index.tsx +2 -2
- package/src/modal/w3m-modal/index.tsx +13 -72
- package/src/modal/w3m-network-button/index.tsx +10 -6
- package/src/modal/w3m-router/index.tsx +2 -29
- package/src/partials/w3m-account-activity/index.tsx +18 -8
- package/src/partials/w3m-account-tokens/index.tsx +38 -30
- package/src/partials/w3m-account-wallet-features/index.tsx +26 -28
- package/src/partials/w3m-connecting-qrcode/index.tsx +3 -4
- package/src/partials/w3m-header/index.tsx +6 -31
- package/src/partials/w3m-selector-modal/index.tsx +3 -2
- package/src/partials/w3m-send-input-address/index.tsx +4 -15
- package/src/partials/w3m-send-input-token/index.tsx +18 -20
- package/src/partials/w3m-send-input-token/styles.ts +3 -0
- package/src/partials/w3m-send-input-token/utils.ts +2 -2
- package/src/partials/w3m-snackbar/index.tsx +8 -14
- package/src/partials/w3m-swap-input/index.tsx +38 -27
- package/src/partials/w3m-swap-input/styles.ts +3 -0
- package/src/utils/HelpersUtil.ts +6 -5
- package/src/utils/NetworkUtil.ts +19 -12
- package/src/utils/UiUtil.ts +10 -8
- package/src/views/w3m-account-default-view/components/auth-buttons.tsx +4 -15
- package/src/views/w3m-account-default-view/index.tsx +73 -58
- package/src/views/w3m-account-view/index.tsx +26 -33
- package/src/views/w3m-account-view/styles.ts +0 -5
- package/src/views/w3m-all-wallets-view/index.tsx +6 -4
- package/src/views/w3m-connect-socials-view/index.tsx +3 -14
- package/src/views/w3m-connect-view/components/all-wallet-list.tsx +2 -3
- package/src/views/w3m-connect-view/components/all-wallets-button.tsx +1 -6
- package/src/views/w3m-connect-view/components/custom-wallet-list.tsx +7 -5
- package/src/views/w3m-connect-view/components/recent-wallet-list.tsx +2 -3
- package/src/views/w3m-connect-view/components/social-login-list.tsx +13 -17
- package/src/views/w3m-connect-view/index.tsx +23 -62
- package/src/views/w3m-connecting-external-view/index.tsx +24 -31
- package/src/views/w3m-connecting-siwe-view/index.tsx +132 -0
- package/src/views/w3m-connecting-siwe-view/styles.ts +29 -0
- package/src/views/w3m-connecting-social-view/index.tsx +44 -96
- package/src/views/w3m-connecting-view/index.tsx +5 -28
- package/src/views/w3m-network-switch-view/index.tsx +16 -26
- package/src/views/w3m-networks-view/index.tsx +23 -12
- package/src/views/w3m-onramp-checkout-view/index.tsx +3 -2
- package/src/views/w3m-onramp-transaction-view/index.tsx +3 -4
- package/src/views/w3m-onramp-view/components/Currency.tsx +3 -4
- package/src/views/w3m-onramp-view/components/CurrencyInput.tsx +33 -28
- package/src/views/w3m-onramp-view/components/Header.tsx +1 -2
- package/src/views/w3m-onramp-view/components/LoadingView.tsx +2 -2
- package/src/views/w3m-onramp-view/components/PaymentButton.tsx +137 -0
- package/src/views/w3m-onramp-view/components/PaymentMethod.tsx +9 -8
- package/src/views/w3m-onramp-view/components/Quote.tsx +5 -2
- package/src/views/w3m-onramp-view/components/SelectPaymentModal.tsx +61 -76
- package/src/views/w3m-onramp-view/index.tsx +42 -70
- package/src/views/w3m-onramp-view/styles.ts +4 -0
- package/src/views/w3m-onramp-view/utils.ts +22 -92
- package/src/views/w3m-swap-preview-view/index.tsx +1 -0
- package/src/views/{w3m-swap-select-token-view → w3m-swap-view/components/select-token-view}/index.tsx +43 -14
- package/src/views/{w3m-swap-select-token-view → w3m-swap-view/components/select-token-view}/styles.ts +12 -3
- package/src/views/{w3m-swap-select-token-view → w3m-swap-view/components/select-token-view}/utils.ts +13 -8
- package/src/views/w3m-swap-view/index.tsx +80 -68
- package/src/views/w3m-swap-view/styles.ts +4 -0
- package/src/views/w3m-unsupported-chain-view/index.tsx +11 -28
- package/src/views/w3m-upgrade-email-wallet-view/index.tsx +3 -7
- package/src/views/w3m-wallet-compatible-networks-view/index.tsx +12 -9
- package/src/views/w3m-wallet-receive-view/index.tsx +23 -18
- package/src/views/w3m-wallet-send-preview-view/components/preview-send-details.tsx +7 -14
- package/src/views/w3m-wallet-send-preview-view/index.tsx +6 -13
- package/src/views/w3m-wallet-send-select-token-view/index.tsx +9 -12
- package/src/views/w3m-wallet-send-view/index.tsx +21 -24
- package/lib/commonjs/client.js +0 -247
- package/lib/commonjs/client.js.map +0 -1
- package/lib/commonjs/views/w3m-connect-view/components/connect-email-input.js +0 -73
- package/lib/commonjs/views/w3m-connect-view/components/connect-email-input.js.map +0 -1
- package/lib/commonjs/views/w3m-connect-view/components/connectors-list.js +0 -40
- package/lib/commonjs/views/w3m-connect-view/components/connectors-list.js.map +0 -1
- package/lib/commonjs/views/w3m-connect-view/components/wallet-guide.js +0 -55
- package/lib/commonjs/views/w3m-connect-view/components/wallet-guide.js.map +0 -1
- package/lib/commonjs/views/w3m-connecting-farcaster-view/index.js +0 -124
- package/lib/commonjs/views/w3m-connecting-farcaster-view/index.js.map +0 -1
- package/lib/commonjs/views/w3m-connecting-farcaster-view/styles.js +0 -24
- package/lib/commonjs/views/w3m-connecting-farcaster-view/styles.js.map +0 -1
- package/lib/commonjs/views/w3m-create-view/index.js +0 -57
- package/lib/commonjs/views/w3m-create-view/index.js.map +0 -1
- package/lib/commonjs/views/w3m-email-verify-device-view/index.js +0 -106
- package/lib/commonjs/views/w3m-email-verify-device-view/index.js.map +0 -1
- package/lib/commonjs/views/w3m-email-verify-device-view/styles.js +0 -25
- package/lib/commonjs/views/w3m-email-verify-device-view/styles.js.map +0 -1
- package/lib/commonjs/views/w3m-email-verify-otp-view/index.js +0 -86
- package/lib/commonjs/views/w3m-email-verify-otp-view/index.js.map +0 -1
- package/lib/commonjs/views/w3m-swap-select-token-view/index.js +0 -118
- package/lib/commonjs/views/w3m-swap-select-token-view/index.js.map +0 -1
- package/lib/commonjs/views/w3m-swap-select-token-view/styles.js.map +0 -1
- package/lib/commonjs/views/w3m-swap-select-token-view/utils.js.map +0 -1
- package/lib/commonjs/views/w3m-update-email-primary-otp-view/index.js +0 -56
- package/lib/commonjs/views/w3m-update-email-primary-otp-view/index.js.map +0 -1
- package/lib/commonjs/views/w3m-update-email-secondary-otp-view/index.js +0 -62
- package/lib/commonjs/views/w3m-update-email-secondary-otp-view/index.js.map +0 -1
- package/lib/commonjs/views/w3m-update-email-wallet-view/index.js +0 -104
- package/lib/commonjs/views/w3m-update-email-wallet-view/index.js.map +0 -1
- package/lib/commonjs/views/w3m-update-email-wallet-view/styles.js +0 -30
- package/lib/commonjs/views/w3m-update-email-wallet-view/styles.js.map +0 -1
- package/lib/commonjs/views/w3m-upgrade-to-smart-account-view/index.js +0 -103
- package/lib/commonjs/views/w3m-upgrade-to-smart-account-view/index.js.map +0 -1
- package/lib/commonjs/views/w3m-upgrade-to-smart-account-view/styles.js.map +0 -1
- package/lib/module/client.js +0 -241
- package/lib/module/client.js.map +0 -1
- package/lib/module/views/w3m-connect-view/components/connect-email-input.js +0 -67
- package/lib/module/views/w3m-connect-view/components/connect-email-input.js.map +0 -1
- package/lib/module/views/w3m-connect-view/components/connectors-list.js +0 -34
- package/lib/module/views/w3m-connect-view/components/connectors-list.js.map +0 -1
- package/lib/module/views/w3m-connect-view/components/wallet-guide.js +0 -49
- package/lib/module/views/w3m-connect-view/components/wallet-guide.js.map +0 -1
- package/lib/module/views/w3m-connecting-farcaster-view/index.js +0 -117
- package/lib/module/views/w3m-connecting-farcaster-view/index.js.map +0 -1
- package/lib/module/views/w3m-connecting-farcaster-view/styles.js +0 -18
- package/lib/module/views/w3m-connecting-farcaster-view/styles.js.map +0 -1
- package/lib/module/views/w3m-create-view/index.js +0 -51
- package/lib/module/views/w3m-create-view/index.js.map +0 -1
- package/lib/module/views/w3m-email-verify-device-view/index.js +0 -99
- package/lib/module/views/w3m-email-verify-device-view/index.js.map +0 -1
- package/lib/module/views/w3m-email-verify-device-view/styles.js +0 -19
- package/lib/module/views/w3m-email-verify-device-view/styles.js.map +0 -1
- package/lib/module/views/w3m-email-verify-otp-view/index.js +0 -79
- package/lib/module/views/w3m-email-verify-otp-view/index.js.map +0 -1
- package/lib/module/views/w3m-swap-select-token-view/index.js +0 -111
- package/lib/module/views/w3m-swap-select-token-view/index.js.map +0 -1
- package/lib/module/views/w3m-swap-select-token-view/styles.js.map +0 -1
- package/lib/module/views/w3m-swap-select-token-view/utils.js.map +0 -1
- package/lib/module/views/w3m-update-email-primary-otp-view/index.js +0 -50
- package/lib/module/views/w3m-update-email-primary-otp-view/index.js.map +0 -1
- package/lib/module/views/w3m-update-email-secondary-otp-view/index.js +0 -56
- package/lib/module/views/w3m-update-email-secondary-otp-view/index.js.map +0 -1
- package/lib/module/views/w3m-update-email-wallet-view/index.js +0 -97
- package/lib/module/views/w3m-update-email-wallet-view/index.js.map +0 -1
- package/lib/module/views/w3m-update-email-wallet-view/styles.js +0 -24
- package/lib/module/views/w3m-update-email-wallet-view/styles.js.map +0 -1
- package/lib/module/views/w3m-upgrade-to-smart-account-view/index.js +0 -96
- package/lib/module/views/w3m-upgrade-to-smart-account-view/index.js.map +0 -1
- package/lib/module/views/w3m-upgrade-to-smart-account-view/styles.js +0 -29
- package/lib/module/views/w3m-upgrade-to-smart-account-view/styles.js.map +0 -1
- package/lib/typescript/client.d.ts +0 -90
- package/lib/typescript/client.d.ts.map +0 -1
- package/lib/typescript/views/w3m-connect-view/components/connect-email-input.d.ts +0 -6
- package/lib/typescript/views/w3m-connect-view/components/connect-email-input.d.ts.map +0 -1
- package/lib/typescript/views/w3m-connect-view/components/connectors-list.d.ts +0 -8
- package/lib/typescript/views/w3m-connect-view/components/connectors-list.d.ts.map +0 -1
- package/lib/typescript/views/w3m-connect-view/components/wallet-guide.d.ts +0 -5
- package/lib/typescript/views/w3m-connect-view/components/wallet-guide.d.ts.map +0 -1
- package/lib/typescript/views/w3m-connecting-farcaster-view/index.d.ts +0 -2
- package/lib/typescript/views/w3m-connecting-farcaster-view/index.d.ts.map +0 -1
- package/lib/typescript/views/w3m-connecting-farcaster-view/styles.d.ts +0 -17
- package/lib/typescript/views/w3m-connecting-farcaster-view/styles.d.ts.map +0 -1
- package/lib/typescript/views/w3m-create-view/index.d.ts +0 -2
- package/lib/typescript/views/w3m-create-view/index.d.ts.map +0 -1
- package/lib/typescript/views/w3m-email-verify-device-view/index.d.ts +0 -2
- package/lib/typescript/views/w3m-email-verify-device-view/index.d.ts.map +0 -1
- package/lib/typescript/views/w3m-email-verify-device-view/styles.d.ts +0 -18
- package/lib/typescript/views/w3m-email-verify-device-view/styles.d.ts.map +0 -1
- package/lib/typescript/views/w3m-email-verify-otp-view/index.d.ts +0 -2
- package/lib/typescript/views/w3m-email-verify-otp-view/index.d.ts.map +0 -1
- package/lib/typescript/views/w3m-swap-select-token-view/index.d.ts +0 -2
- package/lib/typescript/views/w3m-swap-select-token-view/index.d.ts.map +0 -1
- package/lib/typescript/views/w3m-swap-select-token-view/styles.d.ts.map +0 -1
- package/lib/typescript/views/w3m-swap-select-token-view/utils.d.ts +0 -7
- package/lib/typescript/views/w3m-swap-select-token-view/utils.d.ts.map +0 -1
- package/lib/typescript/views/w3m-update-email-primary-otp-view/index.d.ts +0 -2
- package/lib/typescript/views/w3m-update-email-primary-otp-view/index.d.ts.map +0 -1
- package/lib/typescript/views/w3m-update-email-secondary-otp-view/index.d.ts +0 -2
- package/lib/typescript/views/w3m-update-email-secondary-otp-view/index.d.ts.map +0 -1
- package/lib/typescript/views/w3m-update-email-wallet-view/index.d.ts +0 -2
- package/lib/typescript/views/w3m-update-email-wallet-view/index.d.ts.map +0 -1
- package/lib/typescript/views/w3m-update-email-wallet-view/styles.d.ts +0 -23
- package/lib/typescript/views/w3m-update-email-wallet-view/styles.d.ts.map +0 -1
- package/lib/typescript/views/w3m-upgrade-to-smart-account-view/index.d.ts +0 -2
- package/lib/typescript/views/w3m-upgrade-to-smart-account-view/index.d.ts.map +0 -1
- package/lib/typescript/views/w3m-upgrade-to-smart-account-view/styles.d.ts.map +0 -1
- package/src/client.ts +0 -379
- package/src/views/w3m-connect-view/components/connect-email-input.tsx +0 -69
- package/src/views/w3m-connect-view/components/connectors-list.tsx +0 -45
- package/src/views/w3m-connect-view/components/wallet-guide.tsx +0 -50
- package/src/views/w3m-connecting-farcaster-view/index.tsx +0 -140
- package/src/views/w3m-connecting-farcaster-view/styles.ts +0 -18
- package/src/views/w3m-create-view/index.tsx +0 -35
- package/src/views/w3m-email-verify-device-view/index.tsx +0 -80
- package/src/views/w3m-email-verify-device-view/styles.ts +0 -19
- package/src/views/w3m-email-verify-otp-view/index.tsx +0 -75
- package/src/views/w3m-update-email-primary-otp-view/index.tsx +0 -55
- package/src/views/w3m-update-email-secondary-otp-view/index.tsx +0 -56
- package/src/views/w3m-update-email-wallet-view/index.tsx +0 -96
- package/src/views/w3m-update-email-wallet-view/styles.ts +0 -24
- package/src/views/w3m-upgrade-to-smart-account-view/index.tsx +0 -106
- package/src/views/w3m-upgrade-to-smart-account-view/styles.ts +0 -29
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.UpdateEmailPrimaryOtpView = UpdateEmailPrimaryOtpView;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _appkitCoreReactNative = require("@reown/appkit-core-react-native");
|
|
9
|
-
var _w3mOtpCode = require("../../partials/w3m-otp-code");
|
|
10
|
-
function UpdateEmailPrimaryOtpView() {
|
|
11
|
-
const {
|
|
12
|
-
data
|
|
13
|
-
} = _appkitCoreReactNative.RouterController.state;
|
|
14
|
-
const [loading, setLoading] = (0, _react.useState)(false);
|
|
15
|
-
const [error, setError] = (0, _react.useState)('');
|
|
16
|
-
const authProvider = _appkitCoreReactNative.ConnectorController.getAuthConnector()?.provider;
|
|
17
|
-
const onOtpSubmit = async value => {
|
|
18
|
-
if (!authProvider || loading) return;
|
|
19
|
-
setLoading(true);
|
|
20
|
-
setError('');
|
|
21
|
-
try {
|
|
22
|
-
await authProvider.updateEmailPrimaryOtp({
|
|
23
|
-
otp: value
|
|
24
|
-
});
|
|
25
|
-
_appkitCoreReactNative.EventsController.sendEvent({
|
|
26
|
-
type: 'track',
|
|
27
|
-
event: 'EMAIL_VERIFICATION_CODE_PASS'
|
|
28
|
-
});
|
|
29
|
-
_appkitCoreReactNative.RouterController.replace('UpdateEmailSecondaryOtp', data);
|
|
30
|
-
} catch (e) {
|
|
31
|
-
_appkitCoreReactNative.EventsController.sendEvent({
|
|
32
|
-
type: 'track',
|
|
33
|
-
event: 'EMAIL_VERIFICATION_CODE_FAIL'
|
|
34
|
-
});
|
|
35
|
-
const parsedError = _appkitCoreReactNative.CoreHelperUtil.parseError(e);
|
|
36
|
-
if (parsedError?.includes('Invalid Otp')) {
|
|
37
|
-
setError('Invalid code. Try again.');
|
|
38
|
-
} else {
|
|
39
|
-
_appkitCoreReactNative.SnackController.showError(parsedError);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
setLoading(false);
|
|
43
|
-
};
|
|
44
|
-
return /*#__PURE__*/React.createElement(_w3mOtpCode.OtpCodeView, {
|
|
45
|
-
loading: loading,
|
|
46
|
-
error: error,
|
|
47
|
-
email: data?.email,
|
|
48
|
-
onSubmit: onOtpSubmit,
|
|
49
|
-
onRetry: _appkitCoreReactNative.RouterController.goBack,
|
|
50
|
-
codeExpiry: 10,
|
|
51
|
-
retryLabel: "Something wrong?",
|
|
52
|
-
retryDisabledButtonLabel: "Try again",
|
|
53
|
-
retryButtonLabel: "Try again"
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_appkitCoreReactNative","_w3mOtpCode","UpdateEmailPrimaryOtpView","data","RouterController","state","loading","setLoading","useState","error","setError","authProvider","ConnectorController","getAuthConnector","provider","onOtpSubmit","value","updateEmailPrimaryOtp","otp","EventsController","sendEvent","type","event","replace","e","parsedError","CoreHelperUtil","parseError","includes","SnackController","showError","React","createElement","OtpCodeView","email","onSubmit","onRetry","goBack","codeExpiry","retryLabel","retryDisabledButtonLabel","retryButtonLabel"],"sourceRoot":"../../../../src","sources":["views/w3m-update-email-primary-otp-view/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAD,OAAA;AASA,IAAAE,WAAA,GAAAF,OAAA;AAEO,SAASG,yBAAyBA,CAAA,EAAG;EAC1C,MAAM;IAAEC;EAAK,CAAC,GAAGC,uCAAgB,CAACC,KAAK;EACvC,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EAC7C,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAF,eAAQ,EAAC,EAAE,CAAC;EACtC,MAAMG,YAAY,GAAGC,0CAAmB,CAACC,gBAAgB,CAAC,CAAC,EAAEC,QAEhD;EAEb,MAAMC,WAAW,GAAG,MAAOC,KAAa,IAAK;IAC3C,IAAI,CAACL,YAAY,IAAIL,OAAO,EAAE;IAC9BC,UAAU,CAAC,IAAI,CAAC;IAChBG,QAAQ,CAAC,EAAE,CAAC;IACZ,IAAI;MACF,MAAMC,YAAY,CAACM,qBAAqB,CAAC;QAAEC,GAAG,EAAEF;MAAM,CAAC,CAAC;MACxDG,uCAAgB,CAACC,SAAS,CAAC;QAAEC,IAAI,EAAE,OAAO;QAAEC,KAAK,EAAE;MAA+B,CAAC,CAAC;MACpFlB,uCAAgB,CAACmB,OAAO,CAAC,yBAAyB,EAAEpB,IAAI,CAAC;IAC3D,CAAC,CAAC,OAAOqB,CAAC,EAAE;MACVL,uCAAgB,CAACC,SAAS,CAAC;QAAEC,IAAI,EAAE,OAAO;QAAEC,KAAK,EAAE;MAA+B,CAAC,CAAC;MACpF,MAAMG,WAAW,GAAGC,qCAAc,CAACC,UAAU,CAACH,CAAC,CAAC;MAChD,IAAIC,WAAW,EAAEG,QAAQ,CAAC,aAAa,CAAC,EAAE;QACxClB,QAAQ,CAAC,0BAA0B,CAAC;MACtC,CAAC,MAAM;QACLmB,sCAAe,CAACC,SAAS,CAACL,WAAW,CAAC;MACxC;IACF;IACAlB,UAAU,CAAC,KAAK,CAAC;EACnB,CAAC;EAED,oBACEwB,KAAA,CAAAC,aAAA,CAAC/B,WAAA,CAAAgC,WAAW;IACV3B,OAAO,EAAEA,OAAQ;IACjBG,KAAK,EAAEA,KAAM;IACbyB,KAAK,EAAE/B,IAAI,EAAE+B,KAAM;IACnBC,QAAQ,EAAEpB,WAAY;IACtBqB,OAAO,EAAEhC,uCAAgB,CAACiC,MAAO;IACjCC,UAAU,EAAE,EAAG;IACfC,UAAU,EAAC,kBAAkB;IAC7BC,wBAAwB,EAAC,WAAW;IACpCC,gBAAgB,EAAC;EAAW,CAC7B,CAAC;AAEN"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.UpdateEmailSecondaryOtpView = UpdateEmailSecondaryOtpView;
|
|
7
|
-
var _valtio = require("valtio");
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _appkitCoreReactNative = require("@reown/appkit-core-react-native");
|
|
10
|
-
var _w3mOtpCode = require("../../partials/w3m-otp-code");
|
|
11
|
-
function UpdateEmailSecondaryOtpView() {
|
|
12
|
-
const {
|
|
13
|
-
data
|
|
14
|
-
} = (0, _valtio.useSnapshot)(_appkitCoreReactNative.RouterController.state);
|
|
15
|
-
const [loading, setLoading] = (0, _react.useState)(false);
|
|
16
|
-
const [error, setError] = (0, _react.useState)('');
|
|
17
|
-
const authConnector = _appkitCoreReactNative.ConnectorController.getAuthConnector();
|
|
18
|
-
const onOtpSubmit = async value => {
|
|
19
|
-
if (!authConnector) return;
|
|
20
|
-
setLoading(true);
|
|
21
|
-
setError('');
|
|
22
|
-
try {
|
|
23
|
-
const provider = authConnector?.provider;
|
|
24
|
-
await provider.updateEmailSecondaryOtp({
|
|
25
|
-
otp: value
|
|
26
|
-
});
|
|
27
|
-
_appkitCoreReactNative.EventsController.sendEvent({
|
|
28
|
-
type: 'track',
|
|
29
|
-
event: 'EMAIL_VERIFICATION_CODE_PASS'
|
|
30
|
-
});
|
|
31
|
-
_appkitCoreReactNative.EventsController.sendEvent({
|
|
32
|
-
type: 'track',
|
|
33
|
-
event: 'EMAIL_EDIT_COMPLETE'
|
|
34
|
-
});
|
|
35
|
-
_appkitCoreReactNative.RouterController.reset('Account');
|
|
36
|
-
} catch (e) {
|
|
37
|
-
_appkitCoreReactNative.EventsController.sendEvent({
|
|
38
|
-
type: 'track',
|
|
39
|
-
event: 'EMAIL_VERIFICATION_CODE_FAIL'
|
|
40
|
-
});
|
|
41
|
-
const parsedError = _appkitCoreReactNative.CoreHelperUtil.parseError(e);
|
|
42
|
-
if (parsedError?.includes('Invalid Otp')) {
|
|
43
|
-
setError('Invalid code. Try again.');
|
|
44
|
-
} else {
|
|
45
|
-
_appkitCoreReactNative.SnackController.showError(parsedError);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
setLoading(false);
|
|
49
|
-
};
|
|
50
|
-
return /*#__PURE__*/React.createElement(_w3mOtpCode.OtpCodeView, {
|
|
51
|
-
loading: loading,
|
|
52
|
-
error: error,
|
|
53
|
-
email: data?.newEmail,
|
|
54
|
-
onSubmit: onOtpSubmit,
|
|
55
|
-
onRetry: _appkitCoreReactNative.RouterController.goBack,
|
|
56
|
-
codeExpiry: 10,
|
|
57
|
-
retryLabel: "Something wrong?",
|
|
58
|
-
retryDisabledButtonLabel: "Try again",
|
|
59
|
-
retryButtonLabel: "Try again"
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_valtio","require","_react","_appkitCoreReactNative","_w3mOtpCode","UpdateEmailSecondaryOtpView","data","useSnapshot","RouterController","state","loading","setLoading","useState","error","setError","authConnector","ConnectorController","getAuthConnector","onOtpSubmit","value","provider","updateEmailSecondaryOtp","otp","EventsController","sendEvent","type","event","reset","e","parsedError","CoreHelperUtil","parseError","includes","SnackController","showError","React","createElement","OtpCodeView","email","newEmail","onSubmit","onRetry","goBack","codeExpiry","retryLabel","retryDisabledButtonLabel","retryButtonLabel"],"sourceRoot":"../../../../src","sources":["views/w3m-update-email-secondary-otp-view/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,sBAAA,GAAAF,OAAA;AASA,IAAAG,WAAA,GAAAH,OAAA;AAEO,SAASI,2BAA2BA,CAAA,EAAG;EAC5C,MAAM;IAAEC;EAAK,CAAC,GAAG,IAAAC,mBAAW,EAACC,uCAAgB,CAACC,KAAK,CAAC;EACpD,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EAC7C,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAF,eAAQ,EAAC,EAAE,CAAC;EACtC,MAAMG,aAAa,GAAGC,0CAAmB,CAACC,gBAAgB,CAAC,CAAC;EAE5D,MAAMC,WAAW,GAAG,MAAOC,KAAa,IAAK;IAC3C,IAAI,CAACJ,aAAa,EAAE;IACpBJ,UAAU,CAAC,IAAI,CAAC;IAChBG,QAAQ,CAAC,EAAE,CAAC;IACZ,IAAI;MACF,MAAMM,QAAQ,GAAGL,aAAa,EAAEK,QAA+B;MAC/D,MAAMA,QAAQ,CAACC,uBAAuB,CAAC;QAAEC,GAAG,EAAEH;MAAM,CAAC,CAAC;MACtDI,uCAAgB,CAACC,SAAS,CAAC;QAAEC,IAAI,EAAE,OAAO;QAAEC,KAAK,EAAE;MAA+B,CAAC,CAAC;MACpFH,uCAAgB,CAACC,SAAS,CAAC;QAAEC,IAAI,EAAE,OAAO;QAAEC,KAAK,EAAE;MAAsB,CAAC,CAAC;MAC3ElB,uCAAgB,CAACmB,KAAK,CAAC,SAAS,CAAC;IACnC,CAAC,CAAC,OAAOC,CAAC,EAAE;MACVL,uCAAgB,CAACC,SAAS,CAAC;QAAEC,IAAI,EAAE,OAAO;QAAEC,KAAK,EAAE;MAA+B,CAAC,CAAC;MACpF,MAAMG,WAAW,GAAGC,qCAAc,CAACC,UAAU,CAACH,CAAC,CAAC;MAChD,IAAIC,WAAW,EAAEG,QAAQ,CAAC,aAAa,CAAC,EAAE;QACxClB,QAAQ,CAAC,0BAA0B,CAAC;MACtC,CAAC,MAAM;QACLmB,sCAAe,CAACC,SAAS,CAACL,WAAW,CAAC;MACxC;IACF;IACAlB,UAAU,CAAC,KAAK,CAAC;EACnB,CAAC;EAED,oBACEwB,KAAA,CAAAC,aAAA,CAAChC,WAAA,CAAAiC,WAAW;IACV3B,OAAO,EAAEA,OAAQ;IACjBG,KAAK,EAAEA,KAAM;IACbyB,KAAK,EAAEhC,IAAI,EAAEiC,QAAS;IACtBC,QAAQ,EAAEtB,WAAY;IACtBuB,OAAO,EAAEjC,uCAAgB,CAACkC,MAAO;IACjCC,UAAU,EAAE,EAAG;IACfC,UAAU,EAAC,kBAAkB;IAC7BC,wBAAwB,EAAC,WAAW;IACpCC,gBAAgB,EAAC;EAAW,CAC7B,CAAC;AAEN"}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.UpdateEmailWalletView = UpdateEmailWalletView;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _appkitCoreReactNative = require("@reown/appkit-core-react-native");
|
|
10
|
-
var _appkitUiReactNative = require("@reown/appkit-ui-react-native");
|
|
11
|
-
var _useKeyboard = require("../../hooks/useKeyboard");
|
|
12
|
-
var _styles = _interopRequireDefault(require("./styles"));
|
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
function UpdateEmailWalletView() {
|
|
15
|
-
const {
|
|
16
|
-
data
|
|
17
|
-
} = _appkitCoreReactNative.RouterController.state;
|
|
18
|
-
const [loading, setLoading] = (0, _react.useState)(false);
|
|
19
|
-
const [error, setError] = (0, _react.useState)('');
|
|
20
|
-
const [email, setEmail] = (0, _react.useState)(data?.email || '');
|
|
21
|
-
const [isValidNewEmail, setIsValidNewEmail] = (0, _react.useState)(false);
|
|
22
|
-
const authConnector = _appkitCoreReactNative.ConnectorController.getAuthConnector();
|
|
23
|
-
const {
|
|
24
|
-
keyboardShown,
|
|
25
|
-
keyboardHeight
|
|
26
|
-
} = (0, _useKeyboard.useKeyboard)();
|
|
27
|
-
const paddingBottom = _reactNative.Platform.select({
|
|
28
|
-
android: keyboardShown ? keyboardHeight + _appkitUiReactNative.Spacing.l : _appkitUiReactNative.Spacing.l,
|
|
29
|
-
default: _appkitUiReactNative.Spacing.l
|
|
30
|
-
});
|
|
31
|
-
const onChangeText = value => {
|
|
32
|
-
setIsValidNewEmail(data?.email !== value && _appkitCoreReactNative.CoreHelperUtil.isValidEmail(value));
|
|
33
|
-
setEmail(value);
|
|
34
|
-
setError('');
|
|
35
|
-
};
|
|
36
|
-
const onEmailSubmit = async value => {
|
|
37
|
-
if (!authConnector) return;
|
|
38
|
-
const provider = authConnector.provider;
|
|
39
|
-
setLoading(true);
|
|
40
|
-
setError('');
|
|
41
|
-
try {
|
|
42
|
-
const response = await provider.updateEmail({
|
|
43
|
-
email: value
|
|
44
|
-
});
|
|
45
|
-
_appkitCoreReactNative.EventsController.sendEvent({
|
|
46
|
-
type: 'track',
|
|
47
|
-
event: 'EMAIL_EDIT'
|
|
48
|
-
});
|
|
49
|
-
if (response.action === 'VERIFY_SECONDARY_OTP') {
|
|
50
|
-
_appkitCoreReactNative.RouterController.push('UpdateEmailSecondaryOtp', {
|
|
51
|
-
email: data?.email,
|
|
52
|
-
newEmail: value
|
|
53
|
-
});
|
|
54
|
-
} else {
|
|
55
|
-
_appkitCoreReactNative.RouterController.push('UpdateEmailPrimaryOtp', {
|
|
56
|
-
email: data?.email,
|
|
57
|
-
newEmail: value
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
} catch (e) {
|
|
61
|
-
const parsedError = _appkitCoreReactNative.CoreHelperUtil.parseError(e);
|
|
62
|
-
if (parsedError?.includes('Invalid email')) {
|
|
63
|
-
setError('Invalid email. Try again.');
|
|
64
|
-
} else {
|
|
65
|
-
_appkitCoreReactNative.SnackController.showError(parsedError);
|
|
66
|
-
}
|
|
67
|
-
} finally {
|
|
68
|
-
setLoading(false);
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
return /*#__PURE__*/React.createElement(_appkitUiReactNative.FlexView, {
|
|
72
|
-
padding: ['l', 's', '0', 's'],
|
|
73
|
-
style: {
|
|
74
|
-
paddingBottom
|
|
75
|
-
}
|
|
76
|
-
}, /*#__PURE__*/React.createElement(_appkitUiReactNative.EmailInput, {
|
|
77
|
-
initialValue: data?.email,
|
|
78
|
-
onSubmit: onEmailSubmit,
|
|
79
|
-
submitEnabled: isValidNewEmail,
|
|
80
|
-
onChangeText: onChangeText,
|
|
81
|
-
loading: loading,
|
|
82
|
-
errorMessage: error,
|
|
83
|
-
style: _styles.default.emailInput,
|
|
84
|
-
autoFocus: true
|
|
85
|
-
}), /*#__PURE__*/React.createElement(_appkitUiReactNative.FlexView, {
|
|
86
|
-
flexDirection: "row",
|
|
87
|
-
justifyContent: "center",
|
|
88
|
-
alignItems: "center",
|
|
89
|
-
margin: ['0', 'xs', '0', 'xs']
|
|
90
|
-
}, /*#__PURE__*/React.createElement(_appkitUiReactNative.Button, {
|
|
91
|
-
onPress: _appkitCoreReactNative.RouterController.goBack,
|
|
92
|
-
variant: "shade",
|
|
93
|
-
style: _styles.default.cancelButton
|
|
94
|
-
}, /*#__PURE__*/React.createElement(_appkitUiReactNative.Text, {
|
|
95
|
-
variant: "paragraph-600",
|
|
96
|
-
color: "fg-100"
|
|
97
|
-
}, "Cancel")), /*#__PURE__*/React.createElement(_appkitUiReactNative.Button, {
|
|
98
|
-
onPress: () => onEmailSubmit(email),
|
|
99
|
-
variant: "fill",
|
|
100
|
-
style: _styles.default.saveButton,
|
|
101
|
-
disabled: loading || !isValidNewEmail
|
|
102
|
-
}, "Save")));
|
|
103
|
-
}
|
|
104
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_appkitCoreReactNative","_appkitUiReactNative","_useKeyboard","_styles","_interopRequireDefault","e","__esModule","default","UpdateEmailWalletView","data","RouterController","state","loading","setLoading","useState","error","setError","email","setEmail","isValidNewEmail","setIsValidNewEmail","authConnector","ConnectorController","getAuthConnector","keyboardShown","keyboardHeight","useKeyboard","paddingBottom","Platform","select","android","Spacing","l","onChangeText","value","CoreHelperUtil","isValidEmail","onEmailSubmit","provider","response","updateEmail","EventsController","sendEvent","type","event","action","push","newEmail","parsedError","parseError","includes","SnackController","showError","React","createElement","FlexView","padding","style","EmailInput","initialValue","onSubmit","submitEnabled","errorMessage","styles","emailInput","autoFocus","flexDirection","justifyContent","alignItems","margin","Button","onPress","goBack","variant","cancelButton","Text","color","saveButton","disabled"],"sourceRoot":"../../../../src","sources":["views/w3m-update-email-wallet-view/index.tsx"],"mappings":"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"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _appkitUiReactNative = require("@reown/appkit-ui-react-native");
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _default = exports.default = _reactNative.StyleSheet.create({
|
|
10
|
-
container: {
|
|
11
|
-
justifyContent: 'center',
|
|
12
|
-
alignItems: 'center'
|
|
13
|
-
},
|
|
14
|
-
emailInput: {
|
|
15
|
-
marginBottom: _appkitUiReactNative.Spacing.s
|
|
16
|
-
},
|
|
17
|
-
cancelButton: {
|
|
18
|
-
flex: 1,
|
|
19
|
-
height: 48,
|
|
20
|
-
marginRight: _appkitUiReactNative.Spacing['2xs'],
|
|
21
|
-
borderRadius: _appkitUiReactNative.BorderRadius.xs
|
|
22
|
-
},
|
|
23
|
-
saveButton: {
|
|
24
|
-
flex: 1,
|
|
25
|
-
height: 48,
|
|
26
|
-
marginLeft: _appkitUiReactNative.Spacing['2xs'],
|
|
27
|
-
borderRadius: _appkitUiReactNative.BorderRadius.xs
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_appkitUiReactNative","require","_reactNative","_default","exports","default","StyleSheet","create","container","justifyContent","alignItems","emailInput","marginBottom","Spacing","s","cancelButton","flex","height","marginRight","borderRadius","BorderRadius","xs","saveButton","marginLeft"],"sourceRoot":"../../../../src","sources":["views/w3m-update-email-wallet-view/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,oBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAA0C,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAE3BC,uBAAU,CAACC,MAAM,CAAC;EAC/BC,SAAS,EAAE;IACTC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDC,UAAU,EAAE;IACVC,YAAY,EAAEC,4BAAO,CAACC;EACxB,CAAC;EACDC,YAAY,EAAE;IACZC,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE,EAAE;IACVC,WAAW,EAAEL,4BAAO,CAAC,KAAK,CAAC;IAC3BM,YAAY,EAAEC,iCAAY,CAACC;EAC7B,CAAC;EACDC,UAAU,EAAE;IACVN,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE,EAAE;IACVM,UAAU,EAAEV,4BAAO,CAAC,KAAK,CAAC;IAC1BM,YAAY,EAAEC,iCAAY,CAACC;EAC7B;AACF,CAAC,CAAC"}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.UpgradeToSmartAccountView = UpgradeToSmartAccountView;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _valtio = require("valtio");
|
|
10
|
-
var _appkitUiReactNative = require("@reown/appkit-ui-react-native");
|
|
11
|
-
var _appkitCoreReactNative = require("@reown/appkit-core-react-native");
|
|
12
|
-
var _styles = _interopRequireDefault(require("./styles"));
|
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
function UpgradeToSmartAccountView() {
|
|
15
|
-
const {
|
|
16
|
-
address
|
|
17
|
-
} = (0, _valtio.useSnapshot)(_appkitCoreReactNative.AccountController.state);
|
|
18
|
-
const {
|
|
19
|
-
loading
|
|
20
|
-
} = (0, _valtio.useSnapshot)(_appkitCoreReactNative.ModalController.state);
|
|
21
|
-
const [initialAddress] = (0, _react.useState)(address);
|
|
22
|
-
const onSwitchAccountType = async () => {
|
|
23
|
-
try {
|
|
24
|
-
_appkitCoreReactNative.ModalController.setLoading(true);
|
|
25
|
-
const accountType = _appkitCoreReactNative.AccountController.state.preferredAccountType === 'eoa' ? 'smartAccount' : 'eoa';
|
|
26
|
-
const provider = _appkitCoreReactNative.ConnectorController.getAuthConnector()?.provider;
|
|
27
|
-
await provider?.setPreferredAccount(accountType);
|
|
28
|
-
_appkitCoreReactNative.EventsController.sendEvent({
|
|
29
|
-
type: 'track',
|
|
30
|
-
event: 'SET_PREFERRED_ACCOUNT_TYPE',
|
|
31
|
-
properties: {
|
|
32
|
-
accountType,
|
|
33
|
-
network: _appkitCoreReactNative.NetworkController.state.caipNetwork?.id || ''
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
} catch (error) {
|
|
37
|
-
_appkitCoreReactNative.ModalController.setLoading(false);
|
|
38
|
-
_appkitCoreReactNative.SnackController.showError('Error switching account type');
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
const onClose = () => {
|
|
42
|
-
_appkitCoreReactNative.ModalController.close();
|
|
43
|
-
_appkitCoreReactNative.ModalController.setLoading(false);
|
|
44
|
-
};
|
|
45
|
-
const onGoBack = () => {
|
|
46
|
-
_appkitCoreReactNative.RouterController.goBack();
|
|
47
|
-
_appkitCoreReactNative.ModalController.setLoading(false);
|
|
48
|
-
};
|
|
49
|
-
const onLearnMorePress = () => {
|
|
50
|
-
_reactNative.Linking.openURL('https://reown.com/faq');
|
|
51
|
-
};
|
|
52
|
-
(0, _react.useEffect)(() => {
|
|
53
|
-
// Go back if the address has changed
|
|
54
|
-
if (address && initialAddress !== address) {
|
|
55
|
-
_appkitCoreReactNative.RouterController.goBack();
|
|
56
|
-
}
|
|
57
|
-
}, [initialAddress, address]);
|
|
58
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_appkitUiReactNative.IconLink, {
|
|
59
|
-
icon: "close",
|
|
60
|
-
size: "md",
|
|
61
|
-
onPress: onClose,
|
|
62
|
-
testID: "header-close",
|
|
63
|
-
style: _styles.default.closeButton
|
|
64
|
-
}), /*#__PURE__*/React.createElement(_appkitUiReactNative.FlexView, {
|
|
65
|
-
style: _styles.default.container,
|
|
66
|
-
padding: ['4xl', 'm', '2xl', 'm']
|
|
67
|
-
}, /*#__PURE__*/React.createElement(_appkitUiReactNative.FlexView, {
|
|
68
|
-
alignItems: "center",
|
|
69
|
-
justifyContent: "center",
|
|
70
|
-
flexDirection: "row"
|
|
71
|
-
}, /*#__PURE__*/React.createElement(_appkitUiReactNative.Visual, {
|
|
72
|
-
name: "google"
|
|
73
|
-
}), /*#__PURE__*/React.createElement(_appkitUiReactNative.Visual, {
|
|
74
|
-
style: _styles.default.middleIcon,
|
|
75
|
-
name: "pencil"
|
|
76
|
-
}), /*#__PURE__*/React.createElement(_appkitUiReactNative.Visual, {
|
|
77
|
-
name: "lightbulb"
|
|
78
|
-
})), /*#__PURE__*/React.createElement(_appkitUiReactNative.Text, {
|
|
79
|
-
variant: "medium-600",
|
|
80
|
-
color: "fg-100",
|
|
81
|
-
style: _styles.default.title
|
|
82
|
-
}, "Discover Smart Accounts"), /*#__PURE__*/React.createElement(_appkitUiReactNative.Text, {
|
|
83
|
-
variant: "paragraph-400",
|
|
84
|
-
color: "fg-100",
|
|
85
|
-
center: true
|
|
86
|
-
}, "Access advanced brand new features as username, improved security and a smoother user experience!"), /*#__PURE__*/React.createElement(_appkitUiReactNative.FlexView, {
|
|
87
|
-
flexDirection: "row",
|
|
88
|
-
margin: ['m', '4xl', 'm', '4xl']
|
|
89
|
-
}, /*#__PURE__*/React.createElement(_appkitUiReactNative.Button, {
|
|
90
|
-
variant: "accent",
|
|
91
|
-
onPress: onGoBack,
|
|
92
|
-
disabled: loading,
|
|
93
|
-
style: [_styles.default.button, _styles.default.cancelButton]
|
|
94
|
-
}, "Do it later"), /*#__PURE__*/React.createElement(_appkitUiReactNative.Button, {
|
|
95
|
-
onPress: onSwitchAccountType,
|
|
96
|
-
loading: loading,
|
|
97
|
-
style: _styles.default.button
|
|
98
|
-
}, "Continue")), /*#__PURE__*/React.createElement(_appkitUiReactNative.Link, {
|
|
99
|
-
onPress: onLearnMorePress,
|
|
100
|
-
iconRight: "externalLink"
|
|
101
|
-
}, "Learn more")));
|
|
102
|
-
}
|
|
103
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_react","_valtio","_appkitUiReactNative","_appkitCoreReactNative","_styles","_interopRequireDefault","e","__esModule","default","UpgradeToSmartAccountView","address","useSnapshot","AccountController","state","loading","ModalController","initialAddress","useState","onSwitchAccountType","setLoading","accountType","preferredAccountType","provider","ConnectorController","getAuthConnector","setPreferredAccount","EventsController","sendEvent","type","event","properties","network","NetworkController","caipNetwork","id","error","SnackController","showError","onClose","close","onGoBack","RouterController","goBack","onLearnMorePress","Linking","openURL","useEffect","React","createElement","Fragment","IconLink","icon","size","onPress","testID","style","styles","closeButton","FlexView","container","padding","alignItems","justifyContent","flexDirection","Visual","name","middleIcon","Text","variant","color","title","center","margin","Button","disabled","button","cancelButton","Link","iconRight"],"sourceRoot":"../../../../src","sources":["views/w3m-upgrade-to-smart-account-view/index.tsx"],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_appkitUiReactNative","require","_reactNative","_default","exports","default","StyleSheet","create","container","justifyContent","alignItems","title","marginTop","Spacing","xl","marginVertical","s","button","width","cancelButton","marginRight","m","middleIcon","marginHorizontal","closeButton","alignSelf","right","top","l","position","zIndex"],"sourceRoot":"../../../../src","sources":["views/w3m-upgrade-to-smart-account-view/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,oBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAA0C,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAE3BC,uBAAU,CAACC,MAAM,CAAC;EAC/BC,SAAS,EAAE;IACTC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDC,KAAK,EAAE;IACLC,SAAS,EAAEC,4BAAO,CAACC,EAAE;IACrBC,cAAc,EAAEF,4BAAO,CAACG;EAC1B,CAAC;EACDC,MAAM,EAAE;IACNC,KAAK,EAAE;EACT,CAAC;EACDC,YAAY,EAAE;IACZC,WAAW,EAAEP,4BAAO,CAACQ;EACvB,CAAC;EACDC,UAAU,EAAE;IACVC,gBAAgB,EAAEV,4BAAO,CAACG;EAC5B,CAAC;EACDQ,WAAW,EAAE;IACXC,SAAS,EAAE,UAAU;IACrBC,KAAK,EAAEb,4BAAO,CAACC,EAAE;IACjBa,GAAG,EAAEd,4BAAO,CAACe,CAAC;IACdC,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE;EACV;AACF,CAAC,CAAC"}
|
package/lib/module/client.js
DELETED
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
import './config/animations';
|
|
2
|
-
import { SIWEController } from '@reown/appkit-siwe-react-native';
|
|
3
|
-
import { AccountController, BlockchainApiController, ConnectionController, ConnectorController, EnsController, EventsController, ModalController, NetworkController, OptionsController, PublicStateController, SnackController, StorageUtil, ThemeController, TransactionsController } from '@reown/appkit-core-react-native';
|
|
4
|
-
import { ConstantsUtil, ErrorUtil } from '@reown/appkit-common-react-native';
|
|
5
|
-
import { Appearance } from 'react-native';
|
|
6
|
-
|
|
7
|
-
// -- Types ---------------------------------------------------------------------
|
|
8
|
-
|
|
9
|
-
// -- Client --------------------------------------------------------------------
|
|
10
|
-
export class AppKitScaffold {
|
|
11
|
-
reportedAlertErrors = {};
|
|
12
|
-
constructor(options) {
|
|
13
|
-
this.initControllers(options);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// -- Public -------------------------------------------------------------------
|
|
17
|
-
async open(options) {
|
|
18
|
-
ModalController.open(options);
|
|
19
|
-
}
|
|
20
|
-
async close() {
|
|
21
|
-
ModalController.close();
|
|
22
|
-
}
|
|
23
|
-
getThemeMode() {
|
|
24
|
-
return ThemeController.state.themeMode;
|
|
25
|
-
}
|
|
26
|
-
getThemeVariables() {
|
|
27
|
-
return ThemeController.state.themeVariables;
|
|
28
|
-
}
|
|
29
|
-
setThemeMode(themeMode) {
|
|
30
|
-
ThemeController.setThemeMode(themeMode);
|
|
31
|
-
}
|
|
32
|
-
setThemeVariables(themeVariables) {
|
|
33
|
-
ThemeController.setThemeVariables(themeVariables);
|
|
34
|
-
}
|
|
35
|
-
subscribeTheme(callback) {
|
|
36
|
-
return ThemeController.subscribe(callback);
|
|
37
|
-
}
|
|
38
|
-
getWalletInfo() {
|
|
39
|
-
return AccountController.state.connectedWalletInfo;
|
|
40
|
-
}
|
|
41
|
-
subscribeWalletInfo(callback) {
|
|
42
|
-
return AccountController.subscribeKey('connectedWalletInfo', callback);
|
|
43
|
-
}
|
|
44
|
-
getState() {
|
|
45
|
-
return {
|
|
46
|
-
...PublicStateController.state
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
subscribeState(callback) {
|
|
50
|
-
return PublicStateController.subscribe(callback);
|
|
51
|
-
}
|
|
52
|
-
subscribeStateKey(key, callback) {
|
|
53
|
-
return PublicStateController.subscribeKey(key, callback);
|
|
54
|
-
}
|
|
55
|
-
subscribeConnection(callback) {
|
|
56
|
-
return AccountController.subscribeKey('isConnected', callback);
|
|
57
|
-
}
|
|
58
|
-
setLoading(loading) {
|
|
59
|
-
ModalController.setLoading(loading);
|
|
60
|
-
}
|
|
61
|
-
getEvent() {
|
|
62
|
-
return {
|
|
63
|
-
...EventsController.state
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
subscribeEvents(callback) {
|
|
67
|
-
return EventsController.subscribe(callback);
|
|
68
|
-
}
|
|
69
|
-
subscribeEvent(event, callback) {
|
|
70
|
-
return EventsController.subscribeEvent(event, callback);
|
|
71
|
-
}
|
|
72
|
-
resolveReownName = async name => {
|
|
73
|
-
const wcNameAddress = await EnsController.resolveName(name);
|
|
74
|
-
const networkNameAddresses = wcNameAddress?.addresses ? Object.values(wcNameAddress?.addresses) : [];
|
|
75
|
-
return networkNameAddresses[0]?.address || false;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
// -- Protected ----------------------------------------------------------------
|
|
79
|
-
setIsConnected = isConnected => {
|
|
80
|
-
AccountController.setIsConnected(isConnected);
|
|
81
|
-
};
|
|
82
|
-
setCaipAddress = caipAddress => {
|
|
83
|
-
AccountController.setCaipAddress(caipAddress);
|
|
84
|
-
};
|
|
85
|
-
getCaipAddress = () => AccountController.state.caipAddress;
|
|
86
|
-
setBalance = (balance, balanceSymbol) => {
|
|
87
|
-
AccountController.setBalance(balance, balanceSymbol);
|
|
88
|
-
};
|
|
89
|
-
setProfileName = profileName => {
|
|
90
|
-
AccountController.setProfileName(profileName);
|
|
91
|
-
};
|
|
92
|
-
setProfileImage = profileImage => {
|
|
93
|
-
AccountController.setProfileImage(profileImage);
|
|
94
|
-
};
|
|
95
|
-
resetAccount = () => {
|
|
96
|
-
AccountController.resetAccount();
|
|
97
|
-
};
|
|
98
|
-
setCaipNetwork = caipNetwork => {
|
|
99
|
-
NetworkController.setCaipNetwork(caipNetwork);
|
|
100
|
-
};
|
|
101
|
-
getCaipNetwork = () => NetworkController.state.caipNetwork;
|
|
102
|
-
setRequestedCaipNetworks = requestedCaipNetworks => {
|
|
103
|
-
NetworkController.setRequestedCaipNetworks(requestedCaipNetworks);
|
|
104
|
-
};
|
|
105
|
-
getApprovedCaipNetworksData = () => NetworkController.getApprovedCaipNetworksData();
|
|
106
|
-
resetNetwork = () => {
|
|
107
|
-
NetworkController.resetNetwork();
|
|
108
|
-
};
|
|
109
|
-
setConnectors = connectors => {
|
|
110
|
-
ConnectorController.setConnectors(connectors);
|
|
111
|
-
this.setConnectorExcludedWallets(connectors);
|
|
112
|
-
};
|
|
113
|
-
addConnector = connector => {
|
|
114
|
-
ConnectorController.addConnector(connector);
|
|
115
|
-
};
|
|
116
|
-
getConnectors = () => ConnectorController.getConnectors();
|
|
117
|
-
resetWcConnection = () => {
|
|
118
|
-
ConnectionController.resetWcConnection();
|
|
119
|
-
TransactionsController.resetTransactions();
|
|
120
|
-
};
|
|
121
|
-
fetchIdentity = request => BlockchainApiController.fetchIdentity(request);
|
|
122
|
-
setAddressExplorerUrl = addressExplorerUrl => {
|
|
123
|
-
AccountController.setAddressExplorerUrl(addressExplorerUrl);
|
|
124
|
-
};
|
|
125
|
-
setConnectedWalletInfo = connectedWalletInfo => {
|
|
126
|
-
AccountController.setConnectedWalletInfo(connectedWalletInfo);
|
|
127
|
-
};
|
|
128
|
-
setClientId = clientId => {
|
|
129
|
-
BlockchainApiController.setClientId(clientId);
|
|
130
|
-
};
|
|
131
|
-
setPreferredAccountType = preferredAccountType => {
|
|
132
|
-
AccountController.setPreferredAccountType(preferredAccountType);
|
|
133
|
-
};
|
|
134
|
-
handleAlertError(error) {
|
|
135
|
-
if (!error) return;
|
|
136
|
-
if (typeof error === 'object') {
|
|
137
|
-
SnackController.showInternalError(error);
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// Check if the error is a universal provider error
|
|
142
|
-
const matchedUniversalProviderError = Object.entries(ErrorUtil.UniversalProviderErrors).find(([, {
|
|
143
|
-
message
|
|
144
|
-
}]) => error?.includes(message));
|
|
145
|
-
const [errorKey, errorValue] = matchedUniversalProviderError ?? [];
|
|
146
|
-
const {
|
|
147
|
-
message,
|
|
148
|
-
alertErrorKey
|
|
149
|
-
} = errorValue ?? {};
|
|
150
|
-
if (errorKey && message && !this.reportedAlertErrors[errorKey]) {
|
|
151
|
-
const alertError = ErrorUtil.ALERT_ERRORS[alertErrorKey];
|
|
152
|
-
if (alertError) {
|
|
153
|
-
SnackController.showInternalError(alertError);
|
|
154
|
-
this.reportedAlertErrors[errorKey] = true;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// -- Private ------------------------------------------------------------------
|
|
160
|
-
async initControllers(options) {
|
|
161
|
-
this.initAsyncValues(options);
|
|
162
|
-
NetworkController.setClient(options.networkControllerClient);
|
|
163
|
-
NetworkController.setDefaultCaipNetwork(options.defaultChain);
|
|
164
|
-
OptionsController.setProjectId(options.projectId);
|
|
165
|
-
OptionsController.setIncludeWalletIds(options.includeWalletIds);
|
|
166
|
-
OptionsController.setExcludeWalletIds(options.excludeWalletIds);
|
|
167
|
-
OptionsController.setFeaturedWalletIds(options.featuredWalletIds);
|
|
168
|
-
OptionsController.setTokens(options.tokens);
|
|
169
|
-
OptionsController.setCustomWallets(options.customWallets);
|
|
170
|
-
OptionsController.setEnableAnalytics(options.enableAnalytics);
|
|
171
|
-
OptionsController.setSdkVersion(options._sdkVersion);
|
|
172
|
-
OptionsController.setDebug(options.debug);
|
|
173
|
-
if (options.clipboardClient) {
|
|
174
|
-
OptionsController.setClipboardClient(options.clipboardClient);
|
|
175
|
-
}
|
|
176
|
-
ConnectionController.setClient(options.connectionControllerClient);
|
|
177
|
-
if (options.themeMode) {
|
|
178
|
-
ThemeController.setThemeMode(options.themeMode);
|
|
179
|
-
} else {
|
|
180
|
-
ThemeController.setThemeMode(Appearance.getColorScheme());
|
|
181
|
-
}
|
|
182
|
-
if (options.themeVariables) {
|
|
183
|
-
ThemeController.setThemeVariables(options.themeVariables);
|
|
184
|
-
}
|
|
185
|
-
if (options.metadata) {
|
|
186
|
-
OptionsController.setMetadata(options.metadata);
|
|
187
|
-
}
|
|
188
|
-
if (options.siweControllerClient) {
|
|
189
|
-
SIWEController.setSIWEClient(options.siweControllerClient);
|
|
190
|
-
}
|
|
191
|
-
if (options.features) {
|
|
192
|
-
OptionsController.setFeatures(options.features);
|
|
193
|
-
}
|
|
194
|
-
if ((options.features?.onramp === true || options.features?.onramp === undefined) && (options.metadata?.redirect?.universal || options.metadata?.redirect?.native)) {
|
|
195
|
-
OptionsController.setIsOnRampEnabled(true);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
async setConnectorExcludedWallets(connectors) {
|
|
199
|
-
const excludedWallets = OptionsController.state.excludeWalletIds || [];
|
|
200
|
-
|
|
201
|
-
// Exclude Coinbase if the connector is not implemented
|
|
202
|
-
const excludeCoinbase = connectors.findIndex(connector => connector.id === ConstantsUtil.COINBASE_CONNECTOR_ID) === -1;
|
|
203
|
-
if (excludeCoinbase) {
|
|
204
|
-
excludedWallets.push(ConstantsUtil.COINBASE_EXPLORER_ID);
|
|
205
|
-
}
|
|
206
|
-
OptionsController.setExcludeWalletIds(excludedWallets);
|
|
207
|
-
}
|
|
208
|
-
async initRecentWallets(options) {
|
|
209
|
-
const wallets = await StorageUtil.getRecentWallets();
|
|
210
|
-
const filteredWallets = wallets.filter(wallet => {
|
|
211
|
-
const {
|
|
212
|
-
includeWalletIds,
|
|
213
|
-
excludeWalletIds
|
|
214
|
-
} = options;
|
|
215
|
-
if (includeWalletIds) {
|
|
216
|
-
return includeWalletIds.includes(wallet.id);
|
|
217
|
-
}
|
|
218
|
-
if (excludeWalletIds) {
|
|
219
|
-
return !excludeWalletIds.includes(wallet.id);
|
|
220
|
-
}
|
|
221
|
-
return true;
|
|
222
|
-
});
|
|
223
|
-
ConnectionController.setRecentWallets(filteredWallets);
|
|
224
|
-
}
|
|
225
|
-
async initConnectedConnector() {
|
|
226
|
-
const connectedConnector = await StorageUtil.getConnectedConnector();
|
|
227
|
-
if (connectedConnector) {
|
|
228
|
-
ConnectorController.setConnectedConnector(connectedConnector, false);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
async initSocial() {
|
|
232
|
-
const connectedSocialProvider = await StorageUtil.getConnectedSocialProvider();
|
|
233
|
-
ConnectionController.setConnectedSocialProvider(connectedSocialProvider);
|
|
234
|
-
}
|
|
235
|
-
async initAsyncValues(options) {
|
|
236
|
-
await this.initConnectedConnector();
|
|
237
|
-
await this.initRecentWallets(options);
|
|
238
|
-
await this.initSocial();
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
//# sourceMappingURL=client.js.map
|