@reown/appkit-react-native 2.0.0-alpha.3 → 2.0.0-alpha.4
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 +89 -21
- package/lib/commonjs/AppKit.js.map +1 -1
- package/lib/commonjs/connectors/WalletConnectConnector.js +4 -5
- package/lib/commonjs/connectors/WalletConnectConnector.js.map +1 -1
- package/lib/commonjs/hooks/useRouteTransition.js +10 -4
- package/lib/commonjs/hooks/useRouteTransition.js.map +1 -1
- package/lib/commonjs/modal/w3m-modal/index.js +15 -24
- package/lib/commonjs/modal/w3m-modal/index.js.map +1 -1
- package/lib/commonjs/modal/w3m-modal/styles.js +1 -2
- package/lib/commonjs/modal/w3m-modal/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-account-wallet-features/index.js +2 -5
- package/lib/commonjs/partials/w3m-account-wallet-features/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-all-wallets-list/components/Loading.js +113 -0
- package/lib/commonjs/partials/w3m-all-wallets-list/components/Loading.js.map +1 -0
- package/lib/commonjs/partials/w3m-all-wallets-list/components/WalletItem.js +47 -0
- package/lib/commonjs/partials/w3m-all-wallets-list/components/WalletItem.js.map +1 -0
- package/lib/commonjs/partials/w3m-all-wallets-list/index.js +24 -55
- package/lib/commonjs/partials/w3m-all-wallets-list/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-all-wallets-list/styles.js +3 -5
- package/lib/commonjs/partials/w3m-all-wallets-list/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-all-wallets-search/index.js +24 -46
- package/lib/commonjs/partials/w3m-all-wallets-search/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-all-wallets-search/styles.js +2 -5
- package/lib/commonjs/partials/w3m-all-wallets-search/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-mobile/index.js +5 -3
- package/lib/commonjs/partials/w3m-connecting-mobile/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-qrcode/components/ReownButton.js +36 -0
- package/lib/commonjs/partials/w3m-connecting-qrcode/components/ReownButton.js.map +1 -0
- package/lib/commonjs/partials/w3m-connecting-qrcode/index.js +7 -25
- package/lib/commonjs/partials/w3m-connecting-qrcode/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-qrcode/styles.js +3 -0
- package/lib/commonjs/partials/w3m-connecting-qrcode/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-web/index.js +4 -1
- package/lib/commonjs/partials/w3m-connecting-web/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-header/index.js +1 -1
- package/lib/commonjs/partials/w3m-header/index.js.map +1 -1
- package/lib/commonjs/utils/HelpersUtil.js +20 -0
- package/lib/commonjs/utils/HelpersUtil.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js +2 -2
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/UiUtil.js +4 -0
- package/lib/commonjs/utils/UiUtil.js.map +1 -1
- package/lib/commonjs/views/w3m-account-default-view/index.js +1 -2
- package/lib/commonjs/views/w3m-account-default-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-account-view/index.js +2 -18
- package/lib/commonjs/views/w3m-account-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-all-wallets-view/index.js +16 -7
- package/lib/commonjs/views/w3m-all-wallets-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-socials-view/index.js +1 -2
- package/lib/commonjs/views/w3m-connect-socials-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/components/all-wallet-list.js +4 -1
- package/lib/commonjs/views/w3m-connect-view/components/all-wallet-list.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/components/custom-wallet-list.js +8 -2
- 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 +4 -1
- package/lib/commonjs/views/w3m-connect-view/components/recent-wallet-list.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/index.js +3 -4
- package/lib/commonjs/views/w3m-connect-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-external-view/index.js +27 -11
- package/lib/commonjs/views/w3m-connecting-external-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-social-view/index.js +2 -3
- package/lib/commonjs/views/w3m-connecting-social-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-view/index.js +2 -4
- package/lib/commonjs/views/w3m-connecting-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-get-wallet-view/index.js +6 -3
- package/lib/commonjs/views/w3m-get-wallet-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-networks-view/index.js +4 -4
- package/lib/commonjs/views/w3m-networks-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-onramp-loading-view/index.js +1 -2
- package/lib/commonjs/views/w3m-onramp-loading-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-swap-preview-view/index.js +1 -2
- package/lib/commonjs/views/w3m-swap-preview-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-swap-view/components/select-token-view/index.js +1 -2
- package/lib/commonjs/views/w3m-swap-view/components/select-token-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-swap-view/index.js +1 -2
- package/lib/commonjs/views/w3m-swap-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-compatible-networks-view/index.js +1 -2
- package/lib/commonjs/views/w3m-wallet-compatible-networks-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-receive-view/index.js +1 -2
- package/lib/commonjs/views/w3m-wallet-receive-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-preview-view/index.js +1 -2
- package/lib/commonjs/views/w3m-wallet-send-preview-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-select-token-view/index.js +1 -2
- package/lib/commonjs/views/w3m-wallet-send-select-token-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-wallet-send-view/index.js +1 -2
- package/lib/commonjs/views/w3m-wallet-send-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-what-is-a-network-view/index.js +1 -2
- package/lib/commonjs/views/w3m-what-is-a-network-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-what-is-a-wallet-view/index.js +1 -2
- package/lib/commonjs/views/w3m-what-is-a-wallet-view/index.js.map +1 -1
- package/lib/module/AppKit.js +90 -22
- package/lib/module/AppKit.js.map +1 -1
- package/lib/module/connectors/WalletConnectConnector.js +4 -5
- package/lib/module/connectors/WalletConnectConnector.js.map +1 -1
- package/lib/module/hooks/useRouteTransition.js +10 -4
- package/lib/module/hooks/useRouteTransition.js.map +1 -1
- package/lib/module/modal/w3m-modal/index.js +16 -25
- package/lib/module/modal/w3m-modal/index.js.map +1 -1
- package/lib/module/modal/w3m-modal/styles.js +1 -2
- package/lib/module/modal/w3m-modal/styles.js.map +1 -1
- package/lib/module/partials/w3m-account-wallet-features/index.js +2 -5
- package/lib/module/partials/w3m-account-wallet-features/index.js.map +1 -1
- package/lib/module/partials/w3m-all-wallets-list/components/Loading.js +109 -0
- package/lib/module/partials/w3m-all-wallets-list/components/Loading.js.map +1 -0
- package/lib/module/partials/w3m-all-wallets-list/components/WalletItem.js +42 -0
- package/lib/module/partials/w3m-all-wallets-list/components/WalletItem.js.map +1 -0
- package/lib/module/partials/w3m-all-wallets-list/index.js +26 -57
- package/lib/module/partials/w3m-all-wallets-list/index.js.map +1 -1
- package/lib/module/partials/w3m-all-wallets-list/styles.js +3 -5
- package/lib/module/partials/w3m-all-wallets-list/styles.js.map +1 -1
- package/lib/module/partials/w3m-all-wallets-search/index.js +26 -48
- package/lib/module/partials/w3m-all-wallets-search/index.js.map +1 -1
- package/lib/module/partials/w3m-all-wallets-search/styles.js +2 -5
- package/lib/module/partials/w3m-all-wallets-search/styles.js.map +1 -1
- package/lib/module/partials/w3m-connecting-mobile/index.js +6 -4
- package/lib/module/partials/w3m-connecting-mobile/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-qrcode/components/ReownButton.js +32 -0
- package/lib/module/partials/w3m-connecting-qrcode/components/ReownButton.js.map +1 -0
- package/lib/module/partials/w3m-connecting-qrcode/index.js +7 -25
- package/lib/module/partials/w3m-connecting-qrcode/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-qrcode/styles.js +3 -0
- package/lib/module/partials/w3m-connecting-qrcode/styles.js.map +1 -1
- package/lib/module/partials/w3m-connecting-web/index.js +5 -2
- package/lib/module/partials/w3m-connecting-web/index.js.map +1 -1
- package/lib/module/partials/w3m-header/index.js +1 -1
- package/lib/module/partials/w3m-header/index.js.map +1 -1
- package/lib/module/utils/HelpersUtil.js +21 -1
- package/lib/module/utils/HelpersUtil.js.map +1 -1
- package/lib/module/utils/NetworkUtil.js +2 -2
- package/lib/module/utils/NetworkUtil.js.map +1 -1
- package/lib/module/utils/UiUtil.js +4 -0
- package/lib/module/utils/UiUtil.js.map +1 -1
- package/lib/module/views/w3m-account-default-view/index.js +1 -2
- package/lib/module/views/w3m-account-default-view/index.js.map +1 -1
- package/lib/module/views/w3m-account-view/index.js +3 -19
- package/lib/module/views/w3m-account-view/index.js.map +1 -1
- package/lib/module/views/w3m-all-wallets-view/index.js +16 -7
- package/lib/module/views/w3m-all-wallets-view/index.js.map +1 -1
- package/lib/module/views/w3m-connect-socials-view/index.js +1 -2
- package/lib/module/views/w3m-connect-socials-view/index.js.map +1 -1
- package/lib/module/views/w3m-connect-view/components/all-wallet-list.js +5 -2
- package/lib/module/views/w3m-connect-view/components/all-wallet-list.js.map +1 -1
- package/lib/module/views/w3m-connect-view/components/custom-wallet-list.js +9 -3
- 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 +5 -2
- package/lib/module/views/w3m-connect-view/components/recent-wallet-list.js.map +1 -1
- package/lib/module/views/w3m-connect-view/index.js +3 -4
- package/lib/module/views/w3m-connect-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-external-view/index.js +29 -13
- package/lib/module/views/w3m-connecting-external-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-social-view/index.js +2 -3
- package/lib/module/views/w3m-connecting-social-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-view/index.js +2 -4
- package/lib/module/views/w3m-connecting-view/index.js.map +1 -1
- package/lib/module/views/w3m-get-wallet-view/index.js +7 -4
- package/lib/module/views/w3m-get-wallet-view/index.js.map +1 -1
- package/lib/module/views/w3m-networks-view/index.js +4 -4
- package/lib/module/views/w3m-networks-view/index.js.map +1 -1
- package/lib/module/views/w3m-onramp-loading-view/index.js +1 -2
- package/lib/module/views/w3m-onramp-loading-view/index.js.map +1 -1
- package/lib/module/views/w3m-swap-preview-view/index.js +1 -2
- package/lib/module/views/w3m-swap-preview-view/index.js.map +1 -1
- package/lib/module/views/w3m-swap-view/components/select-token-view/index.js +1 -2
- package/lib/module/views/w3m-swap-view/components/select-token-view/index.js.map +1 -1
- package/lib/module/views/w3m-swap-view/index.js +1 -2
- package/lib/module/views/w3m-swap-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-compatible-networks-view/index.js +1 -2
- package/lib/module/views/w3m-wallet-compatible-networks-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-receive-view/index.js +1 -2
- package/lib/module/views/w3m-wallet-receive-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-preview-view/index.js +1 -2
- package/lib/module/views/w3m-wallet-send-preview-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-select-token-view/index.js +1 -2
- package/lib/module/views/w3m-wallet-send-select-token-view/index.js.map +1 -1
- package/lib/module/views/w3m-wallet-send-view/index.js +1 -2
- package/lib/module/views/w3m-wallet-send-view/index.js.map +1 -1
- package/lib/module/views/w3m-what-is-a-network-view/index.js +1 -2
- package/lib/module/views/w3m-what-is-a-network-view/index.js.map +1 -1
- package/lib/module/views/w3m-what-is-a-wallet-view/index.js +1 -2
- package/lib/module/views/w3m-what-is-a-wallet-view/index.js.map +1 -1
- package/lib/typescript/AppKit.d.ts +8 -3
- package/lib/typescript/AppKit.d.ts.map +1 -1
- package/lib/typescript/AppKitContext.d.ts +1 -1
- package/lib/typescript/hooks/useRouteTransition.d.ts.map +1 -1
- package/lib/typescript/modal/w3m-modal/index.d.ts.map +1 -1
- package/lib/typescript/modal/w3m-modal/styles.d.ts +0 -1
- package/lib/typescript/modal/w3m-modal/styles.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-account-wallet-features/index.d.ts +1 -4
- package/lib/typescript/partials/w3m-account-wallet-features/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-all-wallets-list/components/Loading.d.ts +10 -0
- package/lib/typescript/partials/w3m-all-wallets-list/components/Loading.d.ts.map +1 -0
- package/lib/typescript/partials/w3m-all-wallets-list/components/WalletItem.d.ts +15 -0
- package/lib/typescript/partials/w3m-all-wallets-list/components/WalletItem.d.ts.map +1 -0
- package/lib/typescript/partials/w3m-all-wallets-list/index.d.ts +2 -1
- package/lib/typescript/partials/w3m-all-wallets-list/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-all-wallets-list/styles.d.ts +2 -4
- package/lib/typescript/partials/w3m-all-wallets-list/styles.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-all-wallets-search/index.d.ts +2 -1
- package/lib/typescript/partials/w3m-all-wallets-search/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-all-wallets-search/styles.d.ts +1 -4
- package/lib/typescript/partials/w3m-all-wallets-search/styles.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-connecting-mobile/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-connecting-qrcode/components/ReownButton.d.ts +7 -0
- package/lib/typescript/partials/w3m-connecting-qrcode/components/ReownButton.d.ts.map +1 -0
- package/lib/typescript/partials/w3m-connecting-qrcode/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-connecting-qrcode/styles.d.ts +3 -0
- package/lib/typescript/partials/w3m-connecting-qrcode/styles.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-connecting-web/index.d.ts.map +1 -1
- package/lib/typescript/utils/HelpersUtil.d.ts +3 -1
- package/lib/typescript/utils/HelpersUtil.d.ts.map +1 -1
- package/lib/typescript/utils/NetworkUtil.d.ts +1 -1
- package/lib/typescript/utils/UiUtil.d.ts.map +1 -1
- package/lib/typescript/views/w3m-account-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-all-wallets-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-socials-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/components/all-wallet-list.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/components/custom-wallet-list.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/components/recent-wallet-list.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connecting-external-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connecting-social-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connecting-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-get-wallet-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-networks-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-onramp-loading-view/index.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.map +1 -1
- package/lib/typescript/views/w3m-swap-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-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/lib/typescript/views/w3m-what-is-a-network-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-what-is-a-wallet-view/index.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/AppKit.ts +119 -23
- package/src/connectors/WalletConnectConnector.ts +5 -5
- package/src/hooks/useRouteTransition.ts +11 -4
- package/src/modal/w3m-modal/index.tsx +16 -25
- package/src/modal/w3m-modal/styles.ts +1 -2
- package/src/partials/w3m-account-wallet-features/index.tsx +2 -8
- package/src/partials/w3m-all-wallets-list/components/Loading.tsx +47 -0
- package/src/partials/w3m-all-wallets-list/components/WalletItem.tsx +47 -0
- package/src/partials/w3m-all-wallets-list/index.tsx +29 -61
- package/src/partials/w3m-all-wallets-list/styles.ts +3 -5
- package/src/partials/w3m-all-wallets-search/index.tsx +27 -53
- package/src/partials/w3m-all-wallets-search/styles.ts +2 -5
- package/src/partials/w3m-connecting-mobile/index.tsx +6 -4
- package/src/partials/w3m-connecting-qrcode/components/ReownButton.tsx +20 -0
- package/src/partials/w3m-connecting-qrcode/index.tsx +12 -14
- package/src/partials/w3m-connecting-qrcode/styles.ts +3 -0
- package/src/partials/w3m-connecting-web/index.tsx +4 -2
- package/src/partials/w3m-header/index.tsx +1 -1
- package/src/utils/HelpersUtil.ts +30 -0
- package/src/utils/NetworkUtil.ts +3 -3
- package/src/utils/UiUtil.ts +4 -0
- package/src/views/w3m-account-default-view/index.tsx +2 -2
- package/src/views/w3m-account-view/index.tsx +4 -20
- package/src/views/w3m-all-wallets-view/index.tsx +27 -8
- package/src/views/w3m-connect-socials-view/index.tsx +1 -2
- package/src/views/w3m-connect-view/components/all-wallet-list.tsx +3 -1
- package/src/views/w3m-connect-view/components/custom-wallet-list.tsx +11 -3
- package/src/views/w3m-connect-view/components/recent-wallet-list.tsx +8 -2
- package/src/views/w3m-connect-view/index.tsx +11 -6
- package/src/views/w3m-connecting-external-view/index.tsx +24 -10
- package/src/views/w3m-connecting-social-view/index.tsx +9 -3
- package/src/views/w3m-connecting-view/index.tsx +2 -4
- package/src/views/w3m-get-wallet-view/index.tsx +5 -4
- package/src/views/w3m-networks-view/index.tsx +8 -4
- package/src/views/w3m-onramp-loading-view/index.tsx +8 -2
- package/src/views/w3m-swap-preview-view/index.tsx +9 -2
- package/src/views/w3m-swap-view/components/select-token-view/index.tsx +2 -2
- package/src/views/w3m-swap-view/index.tsx +7 -2
- package/src/views/w3m-wallet-compatible-networks-view/index.tsx +7 -2
- package/src/views/w3m-wallet-receive-view/index.tsx +2 -2
- package/src/views/w3m-wallet-send-preview-view/index.tsx +10 -2
- package/src/views/w3m-wallet-send-select-token-view/index.tsx +7 -2
- package/src/views/w3m-wallet-send-view/index.tsx +1 -2
- package/src/views/w3m-what-is-a-network-view/index.tsx +1 -2
- package/src/views/w3m-what-is-a-wallet-view/index.tsx +1 -2
- package/lib/commonjs/hooks/useCustomDimensions.js +0 -33
- package/lib/commonjs/hooks/useCustomDimensions.js.map +0 -1
- package/lib/module/hooks/useCustomDimensions.js +0 -30
- package/lib/module/hooks/useCustomDimensions.js.map +0 -1
- package/lib/typescript/hooks/useCustomDimensions.d.ts +0 -11
- package/lib/typescript/hooks/useCustomDimensions.d.ts.map +0 -1
- package/src/hooks/useCustomDimensions.ts +0 -21
package/src/utils/HelpersUtil.ts
CHANGED
|
@@ -3,7 +3,9 @@ import {
|
|
|
3
3
|
type AppKitNetwork,
|
|
4
4
|
type CaipNetworkId,
|
|
5
5
|
type ChainNamespace,
|
|
6
|
+
ConstantsUtil,
|
|
6
7
|
type UniversalProviderConfigOverride,
|
|
8
|
+
type WcWallet,
|
|
7
9
|
solana,
|
|
8
10
|
solanaDevnet
|
|
9
11
|
} from '@reown/appkit-common-react-native';
|
|
@@ -200,6 +202,34 @@ export const WcHelpersUtil = {
|
|
|
200
202
|
}, {});
|
|
201
203
|
|
|
202
204
|
return this.applyNamespaceOverrides(defaultNamespaces, configOverride);
|
|
205
|
+
},
|
|
206
|
+
|
|
207
|
+
isExternalWallet(wallet?: WcWallet) {
|
|
208
|
+
if (!wallet) {
|
|
209
|
+
return false;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
return (
|
|
213
|
+
wallet.id === ConstantsUtil.PHANTOM_CUSTOM_WALLET.id ||
|
|
214
|
+
wallet.id === ConstantsUtil.SOLFLARE_CUSTOM_WALLET.id ||
|
|
215
|
+
wallet.id === ConstantsUtil.COINBASE_CUSTOM_WALLET.id
|
|
216
|
+
);
|
|
217
|
+
},
|
|
218
|
+
|
|
219
|
+
getConnectorTypeByWallet(wallet?: WcWallet) {
|
|
220
|
+
if (!wallet) {
|
|
221
|
+
return 'walletconnect';
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if (wallet.id === ConstantsUtil.PHANTOM_CUSTOM_WALLET.id) {
|
|
225
|
+
return 'phantom';
|
|
226
|
+
} else if (wallet.id === ConstantsUtil.COINBASE_CUSTOM_WALLET.id) {
|
|
227
|
+
return 'coinbase';
|
|
228
|
+
} else if (wallet.id === ConstantsUtil.SOLFLARE_CUSTOM_WALLET.id) {
|
|
229
|
+
return 'solflare';
|
|
230
|
+
} else {
|
|
231
|
+
return 'walletconnect';
|
|
232
|
+
}
|
|
203
233
|
}
|
|
204
234
|
};
|
|
205
235
|
|
package/src/utils/NetworkUtil.ts
CHANGED
|
@@ -42,17 +42,17 @@ export const NetworkUtil = {
|
|
|
42
42
|
return url.toString();
|
|
43
43
|
},
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
getDefaultNetwork(
|
|
46
46
|
namespaces: CaipNamespaces,
|
|
47
47
|
defaultNetwork?: AppKitNetwork
|
|
48
|
-
):
|
|
48
|
+
): AppKitNetwork | undefined {
|
|
49
49
|
if (!defaultNetwork) return undefined;
|
|
50
50
|
|
|
51
51
|
const isValidDefaultNetwork = Object.values(namespaces).some(
|
|
52
52
|
namespace => namespace?.chains?.some(chain => chain === defaultNetwork.caipNetworkId)
|
|
53
53
|
);
|
|
54
54
|
if (isValidDefaultNetwork) {
|
|
55
|
-
return defaultNetwork
|
|
55
|
+
return defaultNetwork;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
return undefined;
|
package/src/utils/UiUtil.ts
CHANGED
|
@@ -17,6 +17,10 @@ export const UiUtil = {
|
|
|
17
17
|
if (currentRouteTransition) {
|
|
18
18
|
const { navigationDirection } = RouterController.state;
|
|
19
19
|
await currentRouteTransition(navigationDirection);
|
|
20
|
+
// After the transition completes, ensure direction is reset to 'none'
|
|
21
|
+
if (RouterController.state.navigationDirection !== 'none') {
|
|
22
|
+
RouterController.state.navigationDirection = 'none';
|
|
23
|
+
}
|
|
20
24
|
}
|
|
21
25
|
}
|
|
22
26
|
};
|
|
@@ -25,12 +25,12 @@ import {
|
|
|
25
25
|
Text,
|
|
26
26
|
UiUtil,
|
|
27
27
|
Spacing,
|
|
28
|
-
ListItem
|
|
28
|
+
ListItem,
|
|
29
|
+
useCustomDimensions
|
|
29
30
|
} from '@reown/appkit-ui-react-native';
|
|
30
31
|
|
|
31
32
|
import { useInternalAppKit } from '../../AppKitContext';
|
|
32
33
|
|
|
33
|
-
import { useCustomDimensions } from '../../hooks/useCustomDimensions';
|
|
34
34
|
import { AuthButtons } from './components/auth-buttons';
|
|
35
35
|
import styles from './styles';
|
|
36
36
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useSnapshot } from 'valtio';
|
|
2
|
-
import { useEffect
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
3
|
import { ScrollView } from 'react-native';
|
|
4
4
|
import {
|
|
5
5
|
AccountPill,
|
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
Icon,
|
|
8
8
|
IconLink,
|
|
9
9
|
NetworkButton,
|
|
10
|
-
useTheme
|
|
10
|
+
useTheme,
|
|
11
|
+
useCustomDimensions
|
|
11
12
|
} from '@reown/appkit-ui-react-native';
|
|
12
13
|
import {
|
|
13
14
|
ApiController,
|
|
@@ -21,13 +22,11 @@ import {
|
|
|
21
22
|
SendController
|
|
22
23
|
} from '@reown/appkit-core-react-native';
|
|
23
24
|
|
|
24
|
-
import { useCustomDimensions } from '../../hooks/useCustomDimensions';
|
|
25
25
|
import { AccountWalletFeatures } from '../../partials/w3m-account-wallet-features';
|
|
26
26
|
import styles from './styles';
|
|
27
27
|
|
|
28
28
|
export function AccountView() {
|
|
29
29
|
const Theme = useTheme();
|
|
30
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
31
30
|
const { padding } = useCustomDimensions();
|
|
32
31
|
const { activeNetwork, activeAddress, identity } = useSnapshot(ConnectionsController.state);
|
|
33
32
|
const { networkImages } = useSnapshot(AssetController.state);
|
|
@@ -47,22 +46,7 @@ export function AccountView() {
|
|
|
47
46
|
};
|
|
48
47
|
|
|
49
48
|
useEffect(() => {
|
|
50
|
-
async function fetchBalance() {
|
|
51
|
-
setIsLoading(true);
|
|
52
|
-
await ConnectionsController.fetchBalance();
|
|
53
|
-
setIsLoading(false);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
fetchBalance();
|
|
57
49
|
SendController.resetState();
|
|
58
|
-
|
|
59
|
-
const balanceInterval = setInterval(() => {
|
|
60
|
-
fetchBalance();
|
|
61
|
-
}, 10000);
|
|
62
|
-
|
|
63
|
-
return () => {
|
|
64
|
-
clearInterval(balanceInterval);
|
|
65
|
-
};
|
|
66
50
|
}, []);
|
|
67
51
|
|
|
68
52
|
return (
|
|
@@ -93,7 +77,7 @@ export function AccountView() {
|
|
|
93
77
|
onPress={onProfilePress}
|
|
94
78
|
style={styles.accountPill}
|
|
95
79
|
/>
|
|
96
|
-
<AccountWalletFeatures
|
|
80
|
+
<AccountWalletFeatures />
|
|
97
81
|
</FlexView>
|
|
98
82
|
</ScrollView>
|
|
99
83
|
);
|
|
@@ -1,28 +1,40 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { WcController, EventsController, RouterController } from '@reown/appkit-core-react-native';
|
|
3
|
-
import { type WcWallet
|
|
4
|
-
import {
|
|
3
|
+
import { type WcWallet } from '@reown/appkit-common-react-native';
|
|
4
|
+
import {
|
|
5
|
+
FlexView,
|
|
6
|
+
IconLink,
|
|
7
|
+
SearchBar,
|
|
8
|
+
Spacing,
|
|
9
|
+
useTheme,
|
|
10
|
+
useCustomDimensions
|
|
11
|
+
} from '@reown/appkit-ui-react-native';
|
|
5
12
|
|
|
6
13
|
import styles from './styles';
|
|
7
14
|
import { useDebounceCallback } from '../../hooks/useDebounceCallback';
|
|
8
15
|
import { AllWalletsList } from '../../partials/w3m-all-wallets-list';
|
|
9
16
|
import { AllWalletsSearch } from '../../partials/w3m-all-wallets-search';
|
|
10
|
-
import {
|
|
17
|
+
import { WcHelpersUtil } from '../../utils/HelpersUtil';
|
|
18
|
+
import type { LayoutChangeEvent } from 'react-native';
|
|
11
19
|
|
|
12
20
|
export function AllWalletsView() {
|
|
13
21
|
const Theme = useTheme();
|
|
14
22
|
const [searchQuery, setSearchQuery] = useState<string>('');
|
|
15
23
|
const { maxWidth } = useCustomDimensions();
|
|
24
|
+
const [headerHeight, setHeaderHeight] = useState<number>(0);
|
|
16
25
|
const numColumns = 4;
|
|
17
|
-
const usableWidth = maxWidth - Spacing
|
|
26
|
+
const usableWidth = maxWidth - Spacing['s'] * 2;
|
|
18
27
|
const itemWidth = Math.abs(Math.trunc(usableWidth / numColumns));
|
|
19
28
|
|
|
20
29
|
const { debouncedCallback: onInputChange } = useDebounceCallback({ callback: setSearchQuery });
|
|
21
30
|
|
|
31
|
+
const onHeaderLayout = (event: LayoutChangeEvent) => {
|
|
32
|
+
const { height } = event.nativeEvent.layout;
|
|
33
|
+
setHeaderHeight(height);
|
|
34
|
+
};
|
|
35
|
+
|
|
22
36
|
const onWalletPress = (wallet: WcWallet) => {
|
|
23
|
-
const isExternal =
|
|
24
|
-
wallet.id === ConstantsUtil.PHANTOM_CUSTOM_WALLET.id ||
|
|
25
|
-
wallet.id === ConstantsUtil.COINBASE_CUSTOM_WALLET.id;
|
|
37
|
+
const isExternal = WcHelpersUtil.isExternalWallet(wallet);
|
|
26
38
|
if (isExternal) {
|
|
27
39
|
RouterController.push('ConnectingExternal', { wallet });
|
|
28
40
|
} else {
|
|
@@ -53,6 +65,7 @@ export function AllWalletsView() {
|
|
|
53
65
|
<FlexView
|
|
54
66
|
padding={['s', 'l', 'xs', 'l']}
|
|
55
67
|
flexDirection="row"
|
|
68
|
+
onLayout={onHeaderLayout}
|
|
56
69
|
alignItems="center"
|
|
57
70
|
style={[
|
|
58
71
|
styles.header,
|
|
@@ -86,12 +99,18 @@ export function AllWalletsView() {
|
|
|
86
99
|
itemWidth={itemWidth}
|
|
87
100
|
searchQuery={searchQuery}
|
|
88
101
|
onItemPress={onWalletPress}
|
|
102
|
+
headerHeight={headerHeight}
|
|
89
103
|
/>
|
|
90
104
|
);
|
|
91
105
|
}
|
|
92
106
|
|
|
93
107
|
return (
|
|
94
|
-
<AllWalletsList
|
|
108
|
+
<AllWalletsList
|
|
109
|
+
columns={numColumns}
|
|
110
|
+
itemWidth={itemWidth}
|
|
111
|
+
onItemPress={onWalletPress}
|
|
112
|
+
headerHeight={headerHeight}
|
|
113
|
+
/>
|
|
95
114
|
);
|
|
96
115
|
};
|
|
97
116
|
|
|
@@ -6,9 +6,8 @@ import {
|
|
|
6
6
|
OptionsController,
|
|
7
7
|
RouterController
|
|
8
8
|
} from '@reown/appkit-core-react-native';
|
|
9
|
-
import { FlexView, ListSocial, Text } from '@reown/appkit-ui-react-native';
|
|
9
|
+
import { FlexView, ListSocial, Text, useCustomDimensions } from '@reown/appkit-ui-react-native';
|
|
10
10
|
|
|
11
|
-
import { useCustomDimensions } from '../../hooks/useCustomDimensions';
|
|
12
11
|
import styles from './styles';
|
|
13
12
|
|
|
14
13
|
export function ConnectSocialsView() {
|
|
@@ -2,6 +2,7 @@ import { type StyleProp, type ViewStyle } from 'react-native';
|
|
|
2
2
|
import { useSnapshot } from 'valtio';
|
|
3
3
|
import {
|
|
4
4
|
ApiController,
|
|
5
|
+
AssetController,
|
|
5
6
|
AssetUtil,
|
|
6
7
|
WcController,
|
|
7
8
|
type WcControllerState
|
|
@@ -19,6 +20,7 @@ interface Props {
|
|
|
19
20
|
export function AllWalletList({ itemStyle, onWalletPress }: Props) {
|
|
20
21
|
const { installed, featured, recommended, prefetchLoading } = useSnapshot(ApiController.state);
|
|
21
22
|
const { recentWallets } = useSnapshot(WcController.state) as WcControllerState;
|
|
23
|
+
const { walletImages } = useSnapshot(AssetController.state);
|
|
22
24
|
const imageHeaders = ApiController._getApiHeaders();
|
|
23
25
|
const RECENT_COUNT = recentWallets?.length && installed.length ? 1 : recentWallets?.length ?? 0;
|
|
24
26
|
|
|
@@ -47,7 +49,7 @@ export function AllWalletList({ itemStyle, onWalletPress }: Props) {
|
|
|
47
49
|
list.map(wallet => (
|
|
48
50
|
<ListWallet
|
|
49
51
|
key={wallet?.id}
|
|
50
|
-
imageSrc={AssetUtil.getWalletImage(wallet)}
|
|
52
|
+
imageSrc={AssetUtil.getWalletImage(wallet, walletImages)}
|
|
51
53
|
imageHeaders={imageHeaders}
|
|
52
54
|
name={wallet?.name ?? 'Unknown'}
|
|
53
55
|
onPress={() => onWalletPress(wallet)}
|
|
@@ -6,7 +6,8 @@ import {
|
|
|
6
6
|
ApiController,
|
|
7
7
|
WcController,
|
|
8
8
|
type WcControllerState,
|
|
9
|
-
AssetUtil
|
|
9
|
+
AssetUtil,
|
|
10
|
+
AssetController
|
|
10
11
|
} from '@reown/appkit-core-react-native';
|
|
11
12
|
import { type CustomWallet } from '@reown/appkit-common-react-native';
|
|
12
13
|
import { ListWallet } from '@reown/appkit-ui-react-native';
|
|
@@ -19,6 +20,7 @@ interface Props {
|
|
|
19
20
|
|
|
20
21
|
export function CustomWalletList({ itemStyle, onWalletPress }: Props) {
|
|
21
22
|
const { installed } = useSnapshot(ApiController.state);
|
|
23
|
+
const { walletImages } = useSnapshot(AssetController.state);
|
|
22
24
|
const imageHeaders = ApiController._getApiHeaders();
|
|
23
25
|
const { recentWallets } = useSnapshot(WcController.state) as WcControllerState;
|
|
24
26
|
const { customWallets } = useSnapshot(OptionsController.state) as OptionsControllerState;
|
|
@@ -28,12 +30,18 @@ export function CustomWalletList({ itemStyle, onWalletPress }: Props) {
|
|
|
28
30
|
return null;
|
|
29
31
|
}
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
let list = filterOutRecentWallets(recentWallets, customWallets, RECENT_COUNT);
|
|
34
|
+
|
|
35
|
+
// Filter out custom wallets that are already installed
|
|
36
|
+
list = list.filter(
|
|
37
|
+
wallet =>
|
|
38
|
+
!ApiController.state.installed.find(installedWallet => installedWallet.id === wallet.id)
|
|
39
|
+
);
|
|
32
40
|
|
|
33
41
|
return list.map(wallet => (
|
|
34
42
|
<ListWallet
|
|
35
43
|
key={wallet.id}
|
|
36
|
-
imageSrc={AssetUtil.getWalletImage(wallet)}
|
|
44
|
+
imageSrc={AssetUtil.getWalletImage(wallet, walletImages)}
|
|
37
45
|
imageHeaders={imageHeaders}
|
|
38
46
|
name={wallet.name}
|
|
39
47
|
onPress={() => onWalletPress(wallet)}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { useSnapshot } from 'valtio';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
ApiController,
|
|
4
|
+
AssetController,
|
|
5
|
+
AssetUtil,
|
|
6
|
+
WcController
|
|
7
|
+
} from '@reown/appkit-core-react-native';
|
|
3
8
|
import { type WcWallet } from '@reown/appkit-common-react-native';
|
|
4
9
|
import { ListWallet } from '@reown/appkit-ui-react-native';
|
|
5
10
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
@@ -12,6 +17,7 @@ interface Props {
|
|
|
12
17
|
export function RecentWalletList({ itemStyle, onWalletPress }: Props) {
|
|
13
18
|
const installed = ApiController.state.installed;
|
|
14
19
|
const { recentWallets } = useSnapshot(WcController.state);
|
|
20
|
+
const { walletImages } = useSnapshot(AssetController.state);
|
|
15
21
|
const imageHeaders = ApiController._getApiHeaders();
|
|
16
22
|
const RECENT_COUNT = recentWallets?.length && installed.length ? 1 : recentWallets?.length ?? 0;
|
|
17
23
|
|
|
@@ -25,7 +31,7 @@ export function RecentWalletList({ itemStyle, onWalletPress }: Props) {
|
|
|
25
31
|
return (
|
|
26
32
|
<ListWallet
|
|
27
33
|
key={wallet?.id}
|
|
28
|
-
imageSrc={AssetUtil.getWalletImage(wallet)}
|
|
34
|
+
imageSrc={AssetUtil.getWalletImage(wallet, walletImages)}
|
|
29
35
|
imageHeaders={imageHeaders}
|
|
30
36
|
name={wallet?.name ?? 'Unknown'}
|
|
31
37
|
onPress={() => onWalletPress(wallet, isInstalled)}
|
|
@@ -7,9 +7,15 @@ import {
|
|
|
7
7
|
OptionsController,
|
|
8
8
|
RouterController
|
|
9
9
|
} from '@reown/appkit-core-react-native';
|
|
10
|
-
import { type WcWallet
|
|
11
|
-
import {
|
|
12
|
-
|
|
10
|
+
import { type WcWallet } from '@reown/appkit-common-react-native';
|
|
11
|
+
import {
|
|
12
|
+
FlexView,
|
|
13
|
+
Icon,
|
|
14
|
+
ListItem,
|
|
15
|
+
Separator,
|
|
16
|
+
Text,
|
|
17
|
+
useCustomDimensions
|
|
18
|
+
} from '@reown/appkit-ui-react-native';
|
|
13
19
|
import { Placeholder } from '../../partials/w3m-placeholder';
|
|
14
20
|
import { CustomWalletList } from './components/custom-wallet-list';
|
|
15
21
|
import { AllWalletsButton } from './components/all-wallets-button';
|
|
@@ -17,6 +23,7 @@ import { AllWalletList } from './components/all-wallet-list';
|
|
|
17
23
|
import { RecentWalletList } from './components/recent-wallet-list';
|
|
18
24
|
import { SocialLoginList } from './components/social-login-list';
|
|
19
25
|
import styles from './styles';
|
|
26
|
+
import { WcHelpersUtil } from '../../utils/HelpersUtil';
|
|
20
27
|
|
|
21
28
|
export function ConnectView() {
|
|
22
29
|
const { prefetchError } = useSnapshot(ApiController.state);
|
|
@@ -29,9 +36,7 @@ export function ConnectView() {
|
|
|
29
36
|
const showList = !showConnectWalletsButton && !showLoadingError;
|
|
30
37
|
|
|
31
38
|
const onWalletPress = (wallet: WcWallet, isInstalled?: boolean) => {
|
|
32
|
-
const isExternal =
|
|
33
|
-
wallet.id === ConstantsUtil.PHANTOM_CUSTOM_WALLET.id ||
|
|
34
|
-
wallet.id === ConstantsUtil.COINBASE_CUSTOM_WALLET.id;
|
|
39
|
+
const isExternal = WcHelpersUtil.isExternalWallet(wallet);
|
|
35
40
|
if (isExternal) {
|
|
36
41
|
RouterController.push('ConnectingExternal', { wallet });
|
|
37
42
|
} else {
|
|
@@ -1,34 +1,49 @@
|
|
|
1
1
|
import { useSnapshot } from 'valtio';
|
|
2
2
|
import { useCallback, useEffect, useState } from 'react';
|
|
3
|
-
import { ScrollView } from 'react-native';
|
|
3
|
+
import { Platform, ScrollView } from 'react-native';
|
|
4
4
|
import {
|
|
5
5
|
RouterController,
|
|
6
6
|
ApiController,
|
|
7
7
|
EventsController,
|
|
8
8
|
WcController,
|
|
9
|
-
AssetUtil
|
|
9
|
+
AssetUtil,
|
|
10
|
+
AssetController,
|
|
11
|
+
CoreHelperUtil
|
|
10
12
|
} from '@reown/appkit-core-react-native';
|
|
11
13
|
import {
|
|
12
14
|
Button,
|
|
13
15
|
FlexView,
|
|
14
16
|
IconBox,
|
|
15
17
|
LoadingThumbnail,
|
|
16
|
-
WalletImage
|
|
18
|
+
WalletImage,
|
|
19
|
+
useCustomDimensions
|
|
17
20
|
} from '@reown/appkit-ui-react-native';
|
|
18
21
|
|
|
19
|
-
import { useCustomDimensions } from '../../hooks/useCustomDimensions';
|
|
20
22
|
import { ConnectingBody, getMessage, type BodyErrorType } from '../../partials/w3m-connecting-body';
|
|
21
23
|
import styles from './styles';
|
|
22
24
|
import { useInternalAppKit } from '../../AppKitContext';
|
|
23
|
-
import {
|
|
25
|
+
import { StoreLink } from '../../partials/w3m-connecting-mobile/components/StoreLink';
|
|
26
|
+
import { WcHelpersUtil } from '../../utils/HelpersUtil';
|
|
24
27
|
|
|
25
28
|
export function ConnectingExternalView() {
|
|
26
29
|
const { data } = useSnapshot(RouterController.state);
|
|
30
|
+
const { walletImages } = useSnapshot(AssetController.state);
|
|
27
31
|
const { connect } = useInternalAppKit();
|
|
28
32
|
const { maxWidth: width } = useCustomDimensions();
|
|
29
33
|
const [errorType, setErrorType] = useState<BodyErrorType>();
|
|
30
34
|
const bodyMessage = getMessage({ walletName: data?.wallet?.name, errorType });
|
|
31
35
|
|
|
36
|
+
const storeUrl = Platform.select({
|
|
37
|
+
ios: data?.wallet?.app_store,
|
|
38
|
+
android: data?.wallet?.play_store
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const onStorePress = () => {
|
|
42
|
+
if (storeUrl) {
|
|
43
|
+
CoreHelperUtil.openLink(storeUrl);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
32
47
|
const onRetryPress = () => {
|
|
33
48
|
setErrorType(undefined);
|
|
34
49
|
onConnect();
|
|
@@ -38,10 +53,8 @@ export function ConnectingExternalView() {
|
|
|
38
53
|
try {
|
|
39
54
|
const wallet = RouterController.state.data?.wallet;
|
|
40
55
|
if (wallet) {
|
|
41
|
-
if (wallet
|
|
42
|
-
await connect(
|
|
43
|
-
} else if (wallet.id === ConstantsUtil.COINBASE_CUSTOM_WALLET.id) {
|
|
44
|
-
await connect('coinbase');
|
|
56
|
+
if (WcHelpersUtil.isExternalWallet(wallet)) {
|
|
57
|
+
await connect({ wallet });
|
|
45
58
|
} else {
|
|
46
59
|
// All other wallets are handled by WalletConnect connector
|
|
47
60
|
return;
|
|
@@ -89,7 +102,7 @@ export function ConnectingExternalView() {
|
|
|
89
102
|
<LoadingThumbnail paused={!!errorType}>
|
|
90
103
|
<WalletImage
|
|
91
104
|
size="xl"
|
|
92
|
-
imageSrc={AssetUtil.getWalletImage(data?.wallet)}
|
|
105
|
+
imageSrc={AssetUtil.getWalletImage(data?.wallet, walletImages)}
|
|
93
106
|
imageHeaders={ApiController._getApiHeaders()}
|
|
94
107
|
/>
|
|
95
108
|
{errorType ? (
|
|
@@ -118,6 +131,7 @@ export function ConnectingExternalView() {
|
|
|
118
131
|
</Button>
|
|
119
132
|
)}
|
|
120
133
|
</FlexView>
|
|
134
|
+
<StoreLink visible={!!storeUrl} walletName={data?.wallet?.name} onPress={onStorePress} />
|
|
121
135
|
</ScrollView>
|
|
122
136
|
);
|
|
123
137
|
}
|
|
@@ -7,10 +7,16 @@ import {
|
|
|
7
7
|
RouterController,
|
|
8
8
|
SnackController
|
|
9
9
|
} from '@reown/appkit-core-react-native';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
FlexView,
|
|
12
|
+
LoadingThumbnail,
|
|
13
|
+
IconBox,
|
|
14
|
+
Logo,
|
|
15
|
+
Text,
|
|
16
|
+
useCustomDimensions
|
|
17
|
+
} from '@reown/appkit-ui-react-native';
|
|
11
18
|
import { ConstantsUtil, StringUtil } from '@reown/appkit-common-react-native';
|
|
12
19
|
|
|
13
|
-
import { useCustomDimensions } from '../../hooks/useCustomDimensions';
|
|
14
20
|
import { useInternalAppKit } from '../../AppKitContext';
|
|
15
21
|
import styles from './styles';
|
|
16
22
|
|
|
@@ -52,7 +58,7 @@ export function ConnectingSocialView() {
|
|
|
52
58
|
}, [wcUri]);
|
|
53
59
|
|
|
54
60
|
const initializeConnection = useCallback(async () => {
|
|
55
|
-
const connectPromise = connect(
|
|
61
|
+
const connectPromise = connect();
|
|
56
62
|
WcController.setWcPromise(connectPromise);
|
|
57
63
|
}, [connect]);
|
|
58
64
|
|
|
@@ -15,7 +15,6 @@ import { ConnectingQrCode } from '../../partials/w3m-connecting-qrcode';
|
|
|
15
15
|
import { ConnectingMobile } from '../../partials/w3m-connecting-mobile';
|
|
16
16
|
import { ConnectingWeb } from '../../partials/w3m-connecting-web';
|
|
17
17
|
import { ConnectingHeader } from '../../partials/w3m-connecting-header';
|
|
18
|
-
import { UiUtil } from '../../utils/UiUtil';
|
|
19
18
|
import { type Platform } from '@reown/appkit-common-react-native';
|
|
20
19
|
|
|
21
20
|
export function ConnectingView() {
|
|
@@ -46,8 +45,8 @@ export function ConnectingView() {
|
|
|
46
45
|
if (retry || CoreHelperUtil.isPairingExpired(wcPairingExpiry)) {
|
|
47
46
|
WcController.setWcError(false);
|
|
48
47
|
|
|
49
|
-
const connectPromise = connect(
|
|
50
|
-
|
|
48
|
+
const connectPromise = connect({
|
|
49
|
+
wallet: routeData?.wallet
|
|
51
50
|
});
|
|
52
51
|
WcController.setWcPromise(connectPromise);
|
|
53
52
|
}
|
|
@@ -77,7 +76,6 @@ export function ConnectingView() {
|
|
|
77
76
|
};
|
|
78
77
|
|
|
79
78
|
const onSelectPlatform = (tab: Platform) => {
|
|
80
|
-
UiUtil.createViewTransition();
|
|
81
79
|
setPlatform(tab);
|
|
82
80
|
};
|
|
83
81
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Linking, Platform, ScrollView } from 'react-native';
|
|
2
|
-
import { FlexView, ListWallet } from '@reown/appkit-ui-react-native';
|
|
3
|
-
import { ApiController, AssetUtil } from '@reown/appkit-core-react-native';
|
|
2
|
+
import { FlexView, ListWallet, useCustomDimensions } from '@reown/appkit-ui-react-native';
|
|
3
|
+
import { ApiController, AssetController, AssetUtil } from '@reown/appkit-core-react-native';
|
|
4
4
|
import { type WcWallet } from '@reown/appkit-common-react-native';
|
|
5
|
-
import { useCustomDimensions } from '../../hooks/useCustomDimensions';
|
|
6
5
|
import styles from './styles';
|
|
6
|
+
import { useSnapshot } from 'valtio';
|
|
7
7
|
|
|
8
8
|
export function GetWalletView() {
|
|
9
|
+
const { walletImages } = useSnapshot(AssetController.state);
|
|
9
10
|
const { padding } = useCustomDimensions();
|
|
10
11
|
const imageHeaders = ApiController._getApiHeaders();
|
|
11
12
|
|
|
@@ -22,7 +23,7 @@ export function GetWalletView() {
|
|
|
22
23
|
<ListWallet
|
|
23
24
|
key={wallet.id}
|
|
24
25
|
name={wallet.name}
|
|
25
|
-
imageSrc={AssetUtil.getWalletImage(wallet)}
|
|
26
|
+
imageSrc={AssetUtil.getWalletImage(wallet, walletImages)}
|
|
26
27
|
imageHeaders={imageHeaders}
|
|
27
28
|
onPress={() => onWalletPress(wallet)}
|
|
28
29
|
style={styles.item}
|
|
@@ -6,7 +6,8 @@ import {
|
|
|
6
6
|
Link,
|
|
7
7
|
Separator,
|
|
8
8
|
Spacing,
|
|
9
|
-
Text
|
|
9
|
+
Text,
|
|
10
|
+
useCustomDimensions
|
|
10
11
|
} from '@reown/appkit-ui-react-native';
|
|
11
12
|
import {
|
|
12
13
|
ApiController,
|
|
@@ -18,7 +19,6 @@ import {
|
|
|
18
19
|
AssetUtil
|
|
19
20
|
} from '@reown/appkit-core-react-native';
|
|
20
21
|
import type { AppKitNetwork } from '@reown/appkit-common-react-native';
|
|
21
|
-
import { useCustomDimensions } from '../../hooks/useCustomDimensions';
|
|
22
22
|
import styles from './styles';
|
|
23
23
|
import { useInternalAppKit } from '../../AppKitContext';
|
|
24
24
|
import { useSnapshot } from 'valtio';
|
|
@@ -83,8 +83,12 @@ export function NetworksView() {
|
|
|
83
83
|
|
|
84
84
|
return (
|
|
85
85
|
<>
|
|
86
|
-
<ScrollView
|
|
87
|
-
|
|
86
|
+
<ScrollView
|
|
87
|
+
bounces={false}
|
|
88
|
+
fadingEdgeLength={20}
|
|
89
|
+
style={{ paddingHorizontal: padding, marginBottom: Spacing.xl }}
|
|
90
|
+
>
|
|
91
|
+
<FlexView flexDirection="row" flexWrap="wrap" padding={['xs', 'xs', '4xl', 'xs']}>
|
|
88
92
|
{networksTemplate()}
|
|
89
93
|
</FlexView>
|
|
90
94
|
</ScrollView>
|
|
@@ -7,9 +7,15 @@ import {
|
|
|
7
7
|
OptionsController,
|
|
8
8
|
EventsController
|
|
9
9
|
} from '@reown/appkit-core-react-native';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
FlexView,
|
|
12
|
+
DoubleImageLoader,
|
|
13
|
+
IconLink,
|
|
14
|
+
Button,
|
|
15
|
+
Text,
|
|
16
|
+
useCustomDimensions
|
|
17
|
+
} from '@reown/appkit-ui-react-native';
|
|
11
18
|
|
|
12
|
-
import { useCustomDimensions } from '../../hooks/useCustomDimensions';
|
|
13
19
|
import { ConnectingBody } from '../../partials/w3m-connecting-body';
|
|
14
20
|
import styles from './styles';
|
|
15
21
|
import { StringUtil } from '@reown/appkit-common-react-native';
|
|
@@ -3,9 +3,16 @@ import { useEffect } from 'react';
|
|
|
3
3
|
import { ScrollView } from 'react-native';
|
|
4
4
|
import { NumberUtil } from '@reown/appkit-common-react-native';
|
|
5
5
|
import { RouterController, SwapController } from '@reown/appkit-core-react-native';
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
Button,
|
|
8
|
+
FlexView,
|
|
9
|
+
Icon,
|
|
10
|
+
Text,
|
|
11
|
+
TokenButton,
|
|
12
|
+
UiUtil,
|
|
13
|
+
useCustomDimensions
|
|
14
|
+
} from '@reown/appkit-ui-react-native';
|
|
7
15
|
import { SwapDetails } from '../../partials/w3m-swap-details';
|
|
8
|
-
import { useCustomDimensions } from '../../hooks/useCustomDimensions';
|
|
9
16
|
import styles from './styles';
|
|
10
17
|
|
|
11
18
|
export function SwapPreviewView() {
|
|
@@ -17,7 +17,8 @@ import {
|
|
|
17
17
|
Separator,
|
|
18
18
|
Text,
|
|
19
19
|
TokenButton,
|
|
20
|
-
useTheme
|
|
20
|
+
useTheme,
|
|
21
|
+
useCustomDimensions
|
|
21
22
|
} from '@reown/appkit-ui-react-native';
|
|
22
23
|
|
|
23
24
|
import {
|
|
@@ -30,7 +31,6 @@ import {
|
|
|
30
31
|
|
|
31
32
|
import { type SwapInputTarget, type SwapTokenWithBalance } from '@reown/appkit-common-react-native';
|
|
32
33
|
|
|
33
|
-
import { useCustomDimensions } from '../../../../hooks/useCustomDimensions';
|
|
34
34
|
import { Placeholder } from '../../../../partials/w3m-placeholder';
|
|
35
35
|
import styles from './styles';
|
|
36
36
|
import { createSections } from './utils';
|
|
@@ -8,11 +8,16 @@ import {
|
|
|
8
8
|
RouterController,
|
|
9
9
|
SwapController
|
|
10
10
|
} from '@reown/appkit-core-react-native';
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
Button,
|
|
13
|
+
FlexView,
|
|
14
|
+
IconLink,
|
|
15
|
+
useTheme,
|
|
16
|
+
useCustomDimensions
|
|
17
|
+
} from '@reown/appkit-ui-react-native';
|
|
12
18
|
import { NumberUtil, type SwapInputTarget } from '@reown/appkit-common-react-native';
|
|
13
19
|
|
|
14
20
|
import { useKeyboard } from '../../hooks/useKeyboard';
|
|
15
|
-
import { useCustomDimensions } from '../../hooks/useCustomDimensions';
|
|
16
21
|
import { SwapInput } from '../../partials/w3m-swap-input';
|
|
17
22
|
import { useDebounceCallback } from '../../hooks/useDebounceCallback';
|
|
18
23
|
import { SwapDetails } from '../../partials/w3m-swap-details';
|