@getpara/react-sdk-lite 2.12.0 → 2.13.0
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/dist/css/modal.css +0 -3
- package/dist/index.d.ts +1 -0
- package/dist/modal/ParaModal.js +46 -98
- package/dist/modal/components/Body/Body.d.ts +1 -2
- package/dist/modal/components/Body/Body.js +119 -231
- package/dist/modal/components/Controls/ChainSelect.js +1 -1
- package/dist/modal/components/Controls/Controls.js +2 -4
- package/dist/modal/components/Footer/Footer.js +3 -12
- package/dist/modal/components/Header/Header.js +13 -14
- package/dist/modal/components/Header/hooks/useStepTitle.d.ts +1 -1
- package/dist/modal/components/Header/hooks/useStepTitle.js +88 -71
- package/dist/modal/components/ModalContent/ModalContent.d.ts +1 -1
- package/dist/modal/components/ModalContent/ModalContent.js +6 -14
- package/dist/modal/components/OnRampComponents/AddingFunds.js +2 -2
- package/dist/modal/components/WalletCard/WalletCard.js +9 -9
- package/dist/modal/components/WalletSelectOld/WalletSelectOld.js +7 -5
- package/dist/modal/components/{Account → flows/account/Account}/Account.js +30 -27
- package/dist/modal/components/{Account/AccountHeader.d.ts → flows/account/Account/Header.d.ts} +1 -1
- package/dist/modal/components/{Account/AccountHeader.js → flows/account/Account/Header.js} +8 -8
- package/dist/modal/components/{Account/AccountWalletSelect.d.ts → flows/account/Account/WalletSelect.d.ts} +1 -1
- package/dist/modal/components/{Account/AccountWalletSelect.js → flows/account/Account/WalletSelect.js} +13 -11
- package/dist/modal/components/flows/account/AccountFlow/AccountFlow.d.ts +12 -0
- package/dist/modal/components/flows/account/AccountFlow/AccountFlow.js +126 -0
- package/dist/modal/components/flows/account/AccountProvider/AccountContext.d.ts +11 -0
- package/dist/modal/components/flows/account/AccountProvider/AccountContext.js +42 -0
- package/dist/modal/components/flows/account/AccountProvider/AccountProvider.d.ts +4 -0
- package/dist/modal/components/flows/account/AccountProvider/AccountProvider.js +110 -0
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFunds.js +12 -12
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsAsset.js +3 -3
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsAwaiting.js +7 -8
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsContext.d.ts +1 -1
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsContext.js +11 -11
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsDone.js +8 -9
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsNetwork.js +2 -2
- package/dist/modal/components/flows/account/AddFunds/AddFundsProvider.d.ts +1 -0
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsProvider.js +13 -12
- package/dist/modal/components/flows/account/AddFunds/AddFundsReceive.d.ts +1 -0
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsReceive.js +10 -10
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsSettings.js +10 -10
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/MoonPayEmbed.js +1 -1
- package/dist/modal/components/flows/account/AddFunds/utils.d.ts +3 -0
- package/dist/modal/components/flows/account/AddFunds/utils.js +16 -0
- package/dist/modal/components/{ChainSwitch → flows/account/ChainSwitch}/ChainSwitch.js +7 -10
- package/dist/modal/components/{ChainSwitch → flows/account/ChainSwitch}/config.js +1 -1
- package/dist/modal/components/{Account → flows/account/Profile}/AccountMonitorTx.js +13 -13
- package/dist/modal/components/flows/account/Profile/FarcasterLink.d.ts +2 -0
- package/dist/modal/components/{OAuth → flows/account/Profile}/FarcasterLink.js +6 -6
- package/dist/modal/components/{Account/AccountProfile.d.ts → flows/account/Profile/Profile.d.ts} +1 -1
- package/dist/modal/components/{Account/AccountProfile.js → flows/account/Profile/Profile.js} +20 -24
- package/dist/modal/components/{Account/AccountProfileEntry.js → flows/account/Profile/ProfileEntry.js} +13 -15
- package/dist/modal/components/flows/account/Profile/ProfileLink.d.ts +1 -0
- package/dist/modal/components/{Account/AccountProfileLink.js → flows/account/Profile/ProfileLink.js} +19 -34
- package/dist/modal/components/flows/account/Profile/ProfileLinkOptions.d.ts +1 -0
- package/dist/modal/components/{Account/AccountProfileLinkOptions.js → flows/account/Profile/ProfileLinkOptions.js} +11 -11
- package/dist/modal/components/flows/account/Profile/ProfileUnlink.d.ts +1 -0
- package/dist/modal/components/{Account/AccountProfileUnlink.js → flows/account/Profile/ProfileUnlink.js} +6 -6
- package/dist/modal/{hooks/useTelegramLogin.d.ts → components/flows/account/Profile/useTelegramLink.d.ts} +1 -5
- package/dist/modal/{hooks/useTelegramLogin.js → components/flows/account/Profile/useTelegramLink.js} +15 -22
- package/dist/modal/components/{Account/AccountSend → flows/account/Send}/AssetNetwork.js +1 -1
- package/dist/modal/components/flows/account/Send/SendAsset.d.ts +1 -0
- package/dist/modal/components/{Account/AccountSend/AccountSendAsset.js → flows/account/Send/SendAsset.js} +11 -12
- package/dist/modal/components/flows/account/Send/SendForm.d.ts +1 -0
- package/dist/modal/components/{Account/AccountSend/AccountSendForm.js → flows/account/Send/SendForm.js} +15 -16
- package/dist/modal/components/flows/account/Send/SendNetwork.d.ts +1 -0
- package/dist/modal/components/{Account/AccountSend/AccountSendNetwork.js → flows/account/Send/SendNetwork.js} +9 -10
- package/dist/modal/components/flows/account/Send/SendNoAssets.d.ts +1 -0
- package/dist/modal/components/{Account/AccountSend/AccountSendNoAssets.js → flows/account/Send/SendNoAssets.js} +8 -9
- package/dist/modal/components/{Account/AccountSend → flows/account/Send}/context.js +5 -5
- package/dist/modal/components/{Account/AccountSend → flows/account/Send}/index.js +11 -11
- package/dist/modal/components/flows/account/SwitchWallets/SwitchWallets.d.ts +1 -0
- package/dist/modal/components/{SwitchWalletsStep/SwitchWalletsStep.js → flows/account/SwitchWallets/SwitchWallets.js} +4 -4
- package/dist/modal/components/flows/account/Wallet/Wallet.d.ts +1 -0
- package/dist/modal/components/{Account/AccountWallet.js → flows/account/Wallet/Wallet.js} +11 -12
- package/dist/modal/components/flows/auth/AuthFlow/AuthFlow.d.ts +10 -0
- package/dist/modal/components/flows/auth/AuthFlow/AuthFlow.js +94 -0
- package/dist/modal/components/flows/auth/AuthMain/AuthMain.d.ts +9 -0
- package/dist/modal/components/{AuthMainStep/AuthMainStep.js → flows/auth/AuthMain/AuthMain.js} +10 -21
- package/dist/modal/components/flows/auth/AuthMain/AuthMainContent.d.ts +9 -0
- package/dist/modal/components/{AuthMainStep/AuthMainStepContent.js → flows/auth/AuthMain/AuthMainContent.js} +49 -24
- package/dist/modal/components/flows/auth/AwaitingAccountSetup/AwaitingAccountSetup.d.ts +1 -0
- package/dist/modal/components/flows/auth/AwaitingAccountSetup/AwaitingAccountSetup.js +31 -0
- package/dist/modal/components/flows/auth/AwaitingBiometrics/AwaitingBiometrics.d.ts +1 -0
- package/dist/modal/components/flows/auth/AwaitingBiometrics/AwaitingBiometrics.js +21 -0
- package/dist/modal/components/flows/auth/AwaitingOAuth/AwaitingOAuth.d.ts +1 -0
- package/dist/modal/components/{AwaitingOAuthStep/AwaitingOAuthStep.js → flows/auth/AwaitingOAuth/AwaitingOAuth.js} +4 -4
- package/dist/modal/components/flows/auth/AwaitingPassword/AwaitingPassword.d.ts +1 -0
- package/dist/modal/components/flows/auth/AwaitingPassword/AwaitingPassword.js +22 -0
- package/dist/modal/components/flows/auth/BiometricCreation/BiometricCreation.d.ts +1 -0
- package/dist/modal/components/{BiometricCreationStep/BiometricCreationStep.js → flows/auth/BiometricCreation/BiometricCreation.js} +25 -22
- package/dist/modal/components/flows/auth/BiometricLogin/BiometricLogin.d.ts +1 -0
- package/dist/modal/components/flows/auth/BiometricLogin/BiometricLogin.js +72 -0
- package/dist/modal/components/flows/auth/LoginDone/LoginDone.d.ts +5 -0
- package/dist/modal/components/{LoginDoneStep/LoginDoneStep.js → flows/auth/LoginDone/LoginDone.js} +9 -13
- package/dist/modal/components/{OAuth → flows/auth/OAuth}/OAuth.js +15 -23
- package/dist/modal/components/{RecoverySecretStep → flows/auth/RecoverySecretStep}/RecoverySecretStep.js +9 -11
- package/dist/modal/components/flows/auth/Setup2FA/Setup2FA.d.ts +5 -0
- package/dist/modal/components/{Setup2FAStep/Setup2FAStep.js → flows/auth/Setup2FA/Setup2FA.js} +42 -19
- package/dist/modal/components/flows/auth/Verification/Verification.d.ts +1 -0
- package/dist/modal/components/flows/auth/Verification/Verification.js +36 -0
- package/dist/modal/components/flows/auth/WalletCreationDone/WalletCreationDone.d.ts +6 -0
- package/dist/modal/components/{WalletCreationDoneStep/WalletCreationDoneStep.js → flows/auth/WalletCreationDone/WalletCreationDone.js} +19 -46
- package/dist/modal/components/{AuthOptions → shared}/AuthOptions.d.ts +2 -2
- package/dist/modal/components/{AuthOptions → shared}/AuthOptions.js +18 -15
- package/dist/modal/components/{ExternalWalletStep/ExternalWalletStep.d.ts → shared/ConnectExternalWallet/ConnectExternalWallet.d.ts} +1 -1
- package/dist/modal/components/{ExternalWalletStep/ExternalWalletStep.js → shared/ConnectExternalWallet/ConnectExternalWallet.js} +16 -36
- package/dist/modal/components/{ExternalWalletStep → shared/ConnectExternalWallet}/config.js +1 -1
- package/dist/modal/components/{AuthInput/AuthInput.d.ts → shared/EmailOrPhone/EmailOrPhoneInput.d.ts} +4 -4
- package/dist/modal/components/{AuthInput/AuthInput.js → shared/EmailOrPhone/EmailOrPhoneInput.js} +14 -10
- package/dist/modal/components/{AuthInput → shared/EmailOrPhone}/phoneMasks.js +1 -1
- package/dist/modal/components/{ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.d.ts → shared/ExternalWalletNetworkSelect.d.ts} +1 -1
- package/dist/modal/components/{ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js → shared/ExternalWalletNetworkSelect.js} +9 -9
- package/dist/modal/components/{ExternalWallets → shared}/ExternalWallets.js +17 -12
- package/dist/modal/components/shared/IFrame.d.ts +1 -0
- package/dist/modal/components/shared/IFrame.js +87 -0
- package/dist/modal/components/{VerificationCodeStep/VerificationCodeStep.d.ts → shared/VerificationCode.d.ts} +3 -4
- package/dist/modal/components/{VerificationCodeStep/VerificationCodeStep.js → shared/VerificationCode.js} +4 -28
- package/dist/modal/components/shared/VerifyExternalWallet.d.ts +1 -0
- package/dist/modal/components/{ExternalWalletVerificationStep/ExternalWalletVerificationStep.js → shared/VerifyExternalWallet.js} +10 -17
- package/dist/modal/hooks/index.d.ts +1 -2
- package/dist/modal/hooks/index.js +1 -2
- package/dist/modal/hooks/useAuthView.d.ts +4 -0
- package/dist/modal/hooks/useAuthView.js +115 -0
- package/dist/modal/hooks/useCanbGoBack.d.ts +3 -0
- package/dist/modal/hooks/useCanbGoBack.js +47 -0
- package/dist/modal/{components/AuthInput/hooks → hooks}/useDropdownPosition.js +3 -3
- package/dist/modal/hooks/useGoBack.d.ts +4 -1
- package/dist/modal/hooks/useGoBack.js +60 -36
- package/dist/modal/hooks/useSendMutations.js +4 -5
- package/dist/modal/hooks/useTransactionMonitoring.js +8 -8
- package/dist/modal/index.d.ts +1 -2
- package/dist/modal/index.js +1 -3
- package/dist/modal/stores/index.d.ts +0 -1
- package/dist/modal/stores/index.js +0 -1
- package/dist/modal/types/modalProps.d.ts +18 -8
- package/dist/provider/ParaProviderMin.js +34 -38
- package/dist/provider/actions/getWallet.d.ts +1 -1
- package/dist/provider/actions/index.d.ts +43 -49
- package/dist/provider/actions/index.js +4 -0
- package/dist/provider/components/CosmosWalletWrapper.js +0 -3
- package/dist/provider/components/EvmWalletWrapper.js +0 -3
- package/dist/provider/components/ExternalWalletWrapper.js +8 -2
- package/dist/provider/hooks/mutations/index.d.ts +2 -0
- package/dist/provider/hooks/mutations/index.js +4 -0
- package/dist/provider/hooks/mutations/useAddAuthMethod.d.ts +7 -12
- package/dist/provider/hooks/mutations/useAuthenticateWithEmailOrPhone.d.ts +34 -0
- package/dist/provider/hooks/mutations/useAuthenticateWithEmailOrPhone.js +28 -0
- package/dist/provider/hooks/mutations/useAuthenticateWithOAuth.d.ts +34 -0
- package/dist/provider/hooks/mutations/useAuthenticateWithOAuth.js +28 -0
- package/dist/provider/hooks/mutations/useClaimPregenWallets.d.ts +7 -13
- package/dist/provider/hooks/mutations/useClaimPregenWallets.js +4 -1
- package/dist/provider/hooks/mutations/useCreateGuestWallets.d.ts +7 -6
- package/dist/provider/hooks/mutations/useCreateGuestWallets.js +6 -3
- package/dist/provider/hooks/mutations/useCreatePregenWallet.d.ts +7 -93
- package/dist/provider/hooks/mutations/useCreatePregenWallet.js +4 -1
- package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.d.ts +7 -15
- package/dist/provider/hooks/mutations/useCreateWallet.d.ts +7 -15
- package/dist/provider/hooks/mutations/useCreateWallet.js +4 -1
- package/dist/provider/hooks/mutations/useCreateWalletPerType.d.ts +7 -27
- package/dist/provider/hooks/mutations/useEnable2fa.d.ts +7 -12
- package/dist/provider/hooks/mutations/useExportPrivateKey.d.ts +2 -7
- package/dist/provider/hooks/mutations/useHasPregenWallet.d.ts +7 -13
- package/dist/provider/hooks/mutations/useIssueJwt.d.ts +7 -21
- package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +6 -7
- package/dist/provider/hooks/mutations/useKeepSessionAlive.js +2 -2
- package/dist/provider/hooks/mutations/useLoginExternalWallet.d.ts +7 -25
- package/dist/provider/hooks/mutations/useLoginExternalWallet.js +4 -1
- package/dist/provider/hooks/mutations/useLogout.d.ts +7 -12
- package/dist/provider/hooks/mutations/useResendVerificationCode.d.ts +7 -13
- package/dist/provider/hooks/mutations/useResendVerificationCode.js +4 -1
- package/dist/provider/hooks/mutations/useSetup2fa.d.ts +7 -7
- package/dist/provider/hooks/mutations/useSetup2fa.js +2 -2
- package/dist/provider/hooks/mutations/useSignMessage.d.ts +7 -31
- package/dist/provider/hooks/mutations/useSignTransaction.d.ts +7 -31
- package/dist/provider/hooks/mutations/useSignTransaction.js +4 -1
- package/dist/provider/hooks/mutations/useSignUpOrLogIn.d.ts +7 -19
- package/dist/provider/hooks/mutations/useSignUpOrLogIn.js +4 -1
- package/dist/provider/hooks/mutations/useSwitchWallets.d.ts +7 -30
- package/dist/provider/hooks/mutations/useSwitchWallets.js +4 -1
- package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.d.ts +7 -15
- package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.js +4 -1
- package/dist/provider/hooks/mutations/useVerify2fa.d.ts +7 -30
- package/dist/provider/hooks/mutations/useVerifyExternalWallet.d.ts +7 -19
- package/dist/provider/hooks/mutations/useVerifyExternalWallet.js +4 -1
- package/dist/provider/hooks/mutations/useVerifyFarcaster.d.ts +7 -31
- package/dist/provider/hooks/mutations/useVerifyFarcaster.js +4 -1
- package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +7 -66
- package/dist/provider/hooks/mutations/useVerifyNewAccount.js +4 -1
- package/dist/provider/hooks/mutations/useVerifyOAuth.d.ts +7 -37
- package/dist/provider/hooks/mutations/useVerifyTelegram.d.ts +7 -22
- package/dist/provider/hooks/mutations/useWaitForLogin.d.ts +7 -30
- package/dist/provider/hooks/mutations/useWaitForLogin.js +4 -1
- package/dist/provider/hooks/mutations/useWaitForSignup.d.ts +7 -18
- package/dist/provider/hooks/mutations/useWaitForWalletCreation.d.ts +7 -27
- package/dist/provider/hooks/queries/useIsFullyLoggedIn.d.ts +4 -1
- package/dist/provider/hooks/queries/useIsFullyLoggedIn.js +6 -1
- package/dist/provider/hooks/queries/useLinkedAccounts.d.ts +2 -4
- package/dist/provider/hooks/queries/useParaStatus.d.ts +0 -1
- package/dist/provider/hooks/queries/useParaStatus.js +0 -2
- package/dist/provider/hooks/queries/useWallet.d.ts +1 -1
- package/dist/provider/hooks/utils/useEventListeners.js +0 -7
- package/dist/provider/hooks/utils/useFormattedBiometricHints.d.ts +1 -0
- package/dist/provider/hooks/utils/useFormattedBiometricHints.js +9 -5
- package/dist/provider/hooks/utils/useModal.d.ts +2 -2
- package/dist/provider/hooks/utils/useModal.js +9 -8
- package/dist/provider/hooks/utils/useWalletState.d.ts +3 -3
- package/dist/provider/hooks/utils/useWalletState.js +14 -6
- package/dist/provider/providers/AccountLinkProvider.js +21 -19
- package/dist/provider/providers/AuthProvider/AuthContext.d.ts +19 -0
- package/dist/provider/providers/AuthProvider/AuthContext.js +35 -0
- package/dist/provider/providers/AuthProvider/AuthProvider.d.ts +9 -0
- package/dist/provider/providers/AuthProvider/AuthProvider.js +261 -0
- package/dist/provider/providers/ExternalWalletProvider.d.ts +12 -4
- package/dist/provider/providers/ExternalWalletProvider.js +285 -283
- package/dist/provider/stores/getters.d.ts +1 -1
- package/dist/provider/stores/getters.js +5 -5
- package/dist/provider/stores/setters.js +2 -2
- package/dist/provider/stores/slices/accountFlow.d.ts +3 -0
- package/dist/provider/stores/slices/accountFlow.js +30 -0
- package/dist/provider/stores/slices/authFlow.d.ts +3 -0
- package/dist/provider/stores/slices/authFlow.js +63 -0
- package/dist/provider/stores/slices/externalWallets.js +10 -0
- package/dist/provider/stores/slices/index.d.ts +4 -0
- package/dist/provider/stores/slices/index.js +4 -0
- package/dist/provider/stores/slices/modal.js +8 -2
- package/dist/provider/stores/slices/onRamp.d.ts +3 -0
- package/dist/provider/stores/slices/onRamp.js +20 -0
- package/dist/provider/stores/slices/paraState.d.ts +3 -0
- package/dist/provider/stores/slices/paraState.js +9 -0
- package/dist/provider/stores/types.d.ts +117 -5
- package/dist/provider/stores/types.js +9 -0
- package/dist/provider/stores/useStore.d.ts +5 -3
- package/dist/provider/stores/useStore.js +15 -8
- package/package.json +8 -8
- package/dist/modal/components/Account/AccountProfileLink.d.ts +0 -1
- package/dist/modal/components/Account/AccountProfileLinkOptions.d.ts +0 -1
- package/dist/modal/components/Account/AccountProfileUnlink.d.ts +0 -1
- package/dist/modal/components/Account/AccountSend/AccountSendAsset.d.ts +0 -1
- package/dist/modal/components/Account/AccountSend/AccountSendForm.d.ts +0 -1
- package/dist/modal/components/Account/AccountSend/AccountSendNetwork.d.ts +0 -1
- package/dist/modal/components/Account/AccountSend/AccountSendNoAssets.d.ts +0 -1
- package/dist/modal/components/Account/AccountWallet.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsProvider.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsReceive.d.ts +0 -1
- package/dist/modal/components/AuthMainStep/AuthMainStep.d.ts +0 -9
- package/dist/modal/components/AuthMainStep/AuthMainStepContent.d.ts +0 -9
- package/dist/modal/components/AwaitingAccountStep/AwaitingAccountStep.d.ts +0 -1
- package/dist/modal/components/AwaitingAccountStep/AwaitingAccountStep.js +0 -21
- package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.d.ts +0 -1
- package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.js +0 -18
- package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.d.ts +0 -1
- package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.d.ts +0 -1
- package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.js +0 -21
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.d.ts +0 -5
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +0 -24
- package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +0 -1
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +0 -1
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +0 -67
- package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.d.ts +0 -1
- package/dist/modal/components/Hero/Hero.d.ts +0 -1
- package/dist/modal/components/Hero/Hero.js +0 -118
- package/dist/modal/components/IFrameStep/IFrameStep.d.ts +0 -1
- package/dist/modal/components/IFrameStep/IFrameStep.js +0 -83
- package/dist/modal/components/LoginDoneStep/LoginDoneStep.d.ts +0 -5
- package/dist/modal/components/OAuth/FarcasterLink.d.ts +0 -2
- package/dist/modal/components/OAuth/FarcasterOAuthStep.d.ts +0 -1
- package/dist/modal/components/OAuth/FarcasterOAuthStep.js +0 -53
- package/dist/modal/components/OAuth/TelegramOAuthStep.d.ts +0 -8
- package/dist/modal/components/OAuth/TelegramOAuthStep.js +0 -91
- package/dist/modal/components/Setup2FAStep/Setup2FAStep.d.ts +0 -5
- package/dist/modal/components/SwitchWalletsStep/SwitchWalletsStep.d.ts +0 -1
- package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.d.ts +0 -5
- package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +0 -27
- package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.d.ts +0 -6
- package/dist/modal/hooks/useFarcasterLogin.d.ts +0 -9
- package/dist/modal/hooks/useFarcasterLogin.js +0 -77
- package/dist/modal/stores/modal/actions.d.ts +0 -3
- package/dist/modal/stores/modal/actions.js +0 -146
- package/dist/modal/stores/modal/useModalStore.d.ts +0 -120
- package/dist/modal/stores/modal/useModalStore.js +0 -81
- package/dist/modal/utils/steps.d.ts +0 -162
- package/dist/modal/utils/steps.js +0 -335
- package/dist/provider/providers/AuthProvider.d.ts +0 -43
- package/dist/provider/providers/AuthProvider.js +0 -777
- /package/dist/modal/components/{Account → flows/account/Account}/Account.d.ts +0 -0
- /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFunds.d.ts +0 -0
- /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsAsset.d.ts +0 -0
- /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsAwaiting.d.ts +0 -0
- /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsDone.d.ts +0 -0
- /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsNetwork.d.ts +0 -0
- /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsSettings.d.ts +0 -0
- /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/MoonPayEmbed.d.ts +0 -0
- /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/index.d.ts +0 -0
- /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/index.js +0 -0
- /package/dist/modal/components/{ChainSwitch → flows/account/ChainSwitch}/ChainSwitch.d.ts +0 -0
- /package/dist/modal/components/{ChainSwitch → flows/account/ChainSwitch}/config.d.ts +0 -0
- /package/dist/modal/components/{Account → flows/account/Profile}/AccountMonitorTx.d.ts +0 -0
- /package/dist/modal/components/{Account/AccountProfileEntry.d.ts → flows/account/Profile/ProfileEntry.d.ts} +0 -0
- /package/dist/modal/components/{Account/AccountSend → flows/account/Send}/AssetNetwork.d.ts +0 -0
- /package/dist/modal/components/{Account/AccountSend → flows/account/Send}/context.d.ts +0 -0
- /package/dist/modal/components/{Account/AccountSend → flows/account/Send}/index.d.ts +0 -0
- /package/dist/modal/components/{OAuth → flows/auth/OAuth}/OAuth.d.ts +0 -0
- /package/dist/modal/components/{RecoverySecretStep → flows/auth/RecoverySecretStep}/RecoverySecretStep.d.ts +0 -0
- /package/dist/modal/components/{ExternalWalletStep → shared/ConnectExternalWallet}/config.d.ts +0 -0
- /package/dist/modal/components/{AuthInput → shared/EmailOrPhone}/phoneMasks.d.ts +0 -0
- /package/dist/modal/components/{ExternalWallets → shared}/ExternalWallets.d.ts +0 -0
- /package/dist/modal/{components/AuthInput/hooks → hooks}/useDropdownPosition.d.ts +0 -0
|
@@ -8,21 +8,23 @@ import { jsx } from "react/jsx-runtime";
|
|
|
8
8
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
9
9
|
import { isMobile, truncateAddress } from "@getpara/web-sdk";
|
|
10
10
|
import { useInternalClient } from "../hooks/utils/useInternalClient.js";
|
|
11
|
-
import { useStore } from "../stores/useStore.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { useAccount, useModal, useParaStatus, useVerifyExternalWallet, useWalletState } from "../hooks/index.js";
|
|
11
|
+
import { store, useStore } from "../stores/useStore.js";
|
|
12
|
+
import { openPopup } from "../../modal/index.js";
|
|
13
|
+
import { useAccount, useModal, useParaStatus, useWaitForWalletCreation, useWalletState } from "../hooks/index.js";
|
|
15
14
|
import {
|
|
16
|
-
openMobileUrl
|
|
15
|
+
openMobileUrl,
|
|
16
|
+
useUserAgent
|
|
17
17
|
} from "@getpara/react-common";
|
|
18
18
|
import { ParaEvent, dispatchEvent } from "@getpara/web-sdk";
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
import {
|
|
20
|
+
AuthMethod,
|
|
21
|
+
isExternalWallet
|
|
22
|
+
} from "@getpara/user-management-client";
|
|
22
23
|
import { useGoBack } from "../../modal/hooks/useGoBack.js";
|
|
23
24
|
import { validatePortalOrigin } from "../../modal/utils/validatePortalOrigin.js";
|
|
25
|
+
import { DEFAULTS } from "../../modal/constants/defaults.js";
|
|
24
26
|
const useWalletDisplayHelpers = (wallet) => {
|
|
25
|
-
const isUsingMobileConnector =
|
|
27
|
+
const isUsingMobileConnector = useStore((state) => state.isUsingMobileConnector);
|
|
26
28
|
return {
|
|
27
29
|
// Show the extension screen if on web and the wallet is an extension and installed or the wallet isn't a mobile wallet
|
|
28
30
|
// Also show the extension connection if on desktop for a solana wallet (no walletConnect)
|
|
@@ -49,17 +51,18 @@ const defaultExternalWallet = {
|
|
|
49
51
|
setChainIdSwitchingTo: () => {
|
|
50
52
|
},
|
|
51
53
|
connectEmbeddedToExternalConnectors: () => Promise.resolve(),
|
|
52
|
-
verifyWalletSignature: () => Promise.resolve({}),
|
|
53
54
|
signMessage: () => Promise.resolve({}),
|
|
54
55
|
isSigningMessage: false,
|
|
55
56
|
getWalletBalance: () => Promise.resolve(void 0),
|
|
56
57
|
requestInfo: (_) => Promise.resolve({}),
|
|
57
58
|
disconnectBase: (_, __, ___) => Promise.resolve(),
|
|
58
59
|
connectFarcasterMiniApp: () => Promise.resolve(),
|
|
60
|
+
switchConnection: (_) => Promise.resolve(),
|
|
59
61
|
verificationStage: void 0,
|
|
60
62
|
evmDisconnectStatus: "idle",
|
|
61
63
|
solanaDisconnectStatus: "idle",
|
|
62
|
-
cosmosDisconnectStatus: "idle"
|
|
64
|
+
cosmosDisconnectStatus: "idle",
|
|
65
|
+
retryVerification: () => Promise.resolve()
|
|
63
66
|
};
|
|
64
67
|
const ExternalWalletContext = createContext(defaultExternalWallet);
|
|
65
68
|
function ExternalWalletProvider({ children }) {
|
|
@@ -83,8 +86,8 @@ function ExternalWalletProvider({ children }) {
|
|
|
83
86
|
username: evmUsername,
|
|
84
87
|
avatar: evmAvatar,
|
|
85
88
|
connectParaEmbedded: evmConnectParaEmbedded,
|
|
89
|
+
switchConnection: evmSwitchConnection,
|
|
86
90
|
signMessage: evmSignMessage,
|
|
87
|
-
signVerificationMessage: evmSignVerificationMessage,
|
|
88
91
|
getWalletBalance: evmGetWalletBalance,
|
|
89
92
|
requestInfo: evmRequestInfo,
|
|
90
93
|
disconnectBase: evmDisconnectBase,
|
|
@@ -96,7 +99,6 @@ function ExternalWalletProvider({ children }) {
|
|
|
96
99
|
wallets: solanaWallets,
|
|
97
100
|
disconnect: solanaDisconnect,
|
|
98
101
|
signMessage: solanaSignMessage,
|
|
99
|
-
signVerificationMessage: solanaSignVerificationMessage,
|
|
100
102
|
requestInfo: solanaRequestInfo,
|
|
101
103
|
disconnectBase: solanaDisconnectBase,
|
|
102
104
|
farcasterStatus: solanaFarcasterStatus,
|
|
@@ -109,32 +111,37 @@ function ExternalWalletProvider({ children }) {
|
|
|
109
111
|
chainId: cosmosChainId,
|
|
110
112
|
switchChain: cosmosSwitchChain,
|
|
111
113
|
connectParaEmbedded: cosmosConnectParaEmbedded,
|
|
114
|
+
switchConnection: cosmosSwitchConnection,
|
|
112
115
|
signMessage: cosmosSignMessage,
|
|
113
|
-
signVerificationMessage: cosmosSignVerificationMessage,
|
|
114
116
|
requestInfo: cosmosRequestInfo,
|
|
115
117
|
disconnectBase: cosmosDisconnectBase,
|
|
116
118
|
disconnectStatus: cosmosDisconnectStatus
|
|
117
119
|
} = useContext(cosmosContext);
|
|
118
|
-
const
|
|
119
|
-
const
|
|
120
|
-
const
|
|
121
|
-
const
|
|
122
|
-
const
|
|
123
|
-
const
|
|
124
|
-
const
|
|
125
|
-
const setExternalWalletError = useModalStore((state) => state.setExternalWalletError);
|
|
126
|
-
const setIsUsingMobileConnector = useModalStore((state) => state.setIsUsingMobileConnector);
|
|
127
|
-
const refs = useModalStore((state) => state.refs);
|
|
120
|
+
const setIsExternalWalletConnecting = useStore((state) => state.setIsExternalWalletConnecting);
|
|
121
|
+
const isExternalWalletConnecting = useStore((state) => state.isExternalWalletConnecting);
|
|
122
|
+
const selectedExternalWallet = useStore((state) => state.selectedExternalWallet);
|
|
123
|
+
const setSelectedExternalWallet = useStore((state) => state.setSelectedExternalWallet);
|
|
124
|
+
const setExternalWalletError = useStore((state) => state.setExternalWalletError);
|
|
125
|
+
const setIsUsingMobileConnector = useStore((state) => state.setIsUsingMobileConnector);
|
|
126
|
+
const refs = useStore((state) => state.refs);
|
|
128
127
|
const para = useInternalClient();
|
|
129
|
-
const { setSelectedWallet } = useWalletState();
|
|
130
|
-
const
|
|
131
|
-
const {
|
|
132
|
-
const
|
|
133
|
-
const
|
|
128
|
+
const { setSelectedWallet, selectedWallet } = useWalletState();
|
|
129
|
+
const setIFrameUrl = useStore((state) => state.setIFrameUrl);
|
|
130
|
+
const { goBack } = useGoBack();
|
|
131
|
+
const setAuthMethod = useStore((state) => state.setAuthMethod);
|
|
132
|
+
const setShowPostAuthFlow = useStore((state) => state.setShowPostAuthFlow);
|
|
133
|
+
const setAccountView = useStore((state) => state.setAccountView);
|
|
134
|
+
const userAgent = useUserAgent();
|
|
135
|
+
const { waitForWalletCreation } = useWaitForWalletCreation();
|
|
134
136
|
const [qrUri, setQrUri] = useState();
|
|
135
137
|
const [chainIdSwitchingTo, setChainIdSwitchingTo] = useState();
|
|
136
138
|
const [isSigningMessage, setIsSigningMessage] = useState(false);
|
|
137
139
|
const popupCloseIntervalRef = useRef(null);
|
|
140
|
+
const verificationMessage = useRef(null);
|
|
141
|
+
const externalWalletInfo = useRef(null);
|
|
142
|
+
const verificationStatusListenerRef = useRef(null);
|
|
143
|
+
const verificationTriggerListenerRef = useRef(null);
|
|
144
|
+
const connectionRetryListenerRef = useRef(null);
|
|
138
145
|
const allWallets = [...evmWallets, ...solanaWallets, ...cosmosWallets];
|
|
139
146
|
let wallets = allWallets.filter(
|
|
140
147
|
(w) => (w.internalId !== "FARCASTER" || (para == null ? void 0 : para.isFarcasterMiniApp)) && externalWallets.includes(w.internalId)
|
|
@@ -150,6 +157,79 @@ function ExternalWalletProvider({ children }) {
|
|
|
150
157
|
[wallets, selectedExternalWallet]
|
|
151
158
|
);
|
|
152
159
|
const [walletConnectCleanup, setWalletConnectCleanup] = useState(null);
|
|
160
|
+
const retryVerification = () => __async(this, null, function* () {
|
|
161
|
+
var _a;
|
|
162
|
+
if ((_a = externalWalletInfo.current) == null ? void 0 : _a.withFullParaAuth) {
|
|
163
|
+
yield handleRetrySignVerificationMessage();
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
yield para.retryVerifyExternalWallet();
|
|
167
|
+
});
|
|
168
|
+
const poll = () => {
|
|
169
|
+
if (typeof window !== "undefined") {
|
|
170
|
+
refs.poll.current = {
|
|
171
|
+
action: "signup",
|
|
172
|
+
timeout: window == null ? void 0 : window.setTimeout(() => __async(this, null, function* () {
|
|
173
|
+
waitForWalletCreation(
|
|
174
|
+
{
|
|
175
|
+
onPoll: () => {
|
|
176
|
+
const isUsingIFrame = !!store.getState().iFrameUrl;
|
|
177
|
+
if (isUsingIFrame) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
const authMethod = store.getState().authMethod;
|
|
181
|
+
if ((!refs.popupWindow.current || refs.popupWindow.current.closed) && (authMethod !== null || authMethod !== AuthMethod.BASIC_LOGIN)) {
|
|
182
|
+
setAuthMethod(null);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
onSettled: () => {
|
|
188
|
+
var _a;
|
|
189
|
+
window == null ? void 0 : window.clearTimeout((_a = refs.poll.current) == null ? void 0 : _a.timeout);
|
|
190
|
+
refs.poll.current = null;
|
|
191
|
+
refs.popupWindow.current = null;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
);
|
|
195
|
+
}), DEFAULTS.POLLING_INTERVAL_MS)
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
const onNewAuthState = (authState) => __async(this, null, function* () {
|
|
200
|
+
var _a, _b;
|
|
201
|
+
switch (authState.stage) {
|
|
202
|
+
case "verify":
|
|
203
|
+
if (isExternalWallet(authState.auth)) {
|
|
204
|
+
if (authState.loginUrl && ((_a = authState.externalWallet) == null ? void 0 : _a.withFullParaAuth)) {
|
|
205
|
+
if (!isMobile() && refs.popupWindow.current) {
|
|
206
|
+
refs.popupWindow.current.location.href = authState.loginUrl;
|
|
207
|
+
} else {
|
|
208
|
+
setIFrameUrl(authState.loginUrl);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
break;
|
|
213
|
+
case "login":
|
|
214
|
+
case "signup":
|
|
215
|
+
const hasPassword = !!authState.passwordUrl;
|
|
216
|
+
const hasPin = !!authState.pinUrl;
|
|
217
|
+
const hasExactlyOnePasswordOrPin = hasPassword && !hasPin || !hasPassword && hasPin;
|
|
218
|
+
const shouldUseIFrame = !authState.passkeyUrl || (userAgent == null ? void 0 : userAgent.device.type) === "mobile" && !authState.isPasskeySupported && hasExactlyOnePasswordOrPin;
|
|
219
|
+
if (shouldUseIFrame) {
|
|
220
|
+
setIFrameUrl(hasPassword ? authState.passwordUrl : authState.pinUrl);
|
|
221
|
+
}
|
|
222
|
+
setAuthMethod(null);
|
|
223
|
+
poll();
|
|
224
|
+
break;
|
|
225
|
+
case "done":
|
|
226
|
+
setShowPostAuthFlow(true);
|
|
227
|
+
if ((_b = authState.externalWallet) == null ? void 0 : _b.withFullParaAuth) {
|
|
228
|
+
poll();
|
|
229
|
+
}
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
});
|
|
153
233
|
const listenForWalletConnectUri = () => {
|
|
154
234
|
setQrUri(void 0);
|
|
155
235
|
if (walletConnectCleanup) {
|
|
@@ -241,12 +321,12 @@ function ExternalWalletProvider({ children }) {
|
|
|
241
321
|
setChainIdSwitchingTo(chainId2);
|
|
242
322
|
switch (walletType) {
|
|
243
323
|
case "COSMOS": {
|
|
244
|
-
|
|
324
|
+
setAccountView("ACCOUNT_CHAIN_SWITCH");
|
|
245
325
|
resp = yield cosmosSwitchChain(chainId2);
|
|
246
326
|
break;
|
|
247
327
|
}
|
|
248
328
|
case "EVM": {
|
|
249
|
-
|
|
329
|
+
setAccountView("ACCOUNT_CHAIN_SWITCH");
|
|
250
330
|
resp = yield evmSwitchChain(parseInt(chainId2));
|
|
251
331
|
break;
|
|
252
332
|
}
|
|
@@ -259,109 +339,12 @@ function ExternalWalletProvider({ children }) {
|
|
|
259
339
|
setExternalWalletError(resp.error);
|
|
260
340
|
} else {
|
|
261
341
|
setChainIdSwitchingTo(void 0);
|
|
262
|
-
|
|
263
|
-
setStep(ModalStep.ACCOUNT_MAIN);
|
|
342
|
+
setAccountView("ACCOUNT_MAIN");
|
|
264
343
|
}
|
|
265
344
|
}
|
|
266
345
|
}),
|
|
267
346
|
[evmSwitchChain, cosmosSwitchChain]
|
|
268
347
|
);
|
|
269
|
-
const verifyWalletSignature = useCallback(() => __async(this, null, function* () {
|
|
270
|
-
setExternalWalletError();
|
|
271
|
-
const wallet2 = Object.values(para.externalWallets)[0];
|
|
272
|
-
const walletType = wallet2 == null ? void 0 : wallet2.type;
|
|
273
|
-
let verifyExternalWalletParams;
|
|
274
|
-
const withVerification = includeWalletVerification;
|
|
275
|
-
const isConnectionOnly = connectionOnly;
|
|
276
|
-
const withFullParaAuth = (wallet2 == null ? void 0 : wallet2.name) ? isWithFullAuth(wallet2) : false;
|
|
277
|
-
const defaultWalletInfo = {
|
|
278
|
-
withVerification,
|
|
279
|
-
isConnectionOnly,
|
|
280
|
-
withFullParaAuth,
|
|
281
|
-
provider: wallet2.name,
|
|
282
|
-
providerId: wallet2.externalProviderId,
|
|
283
|
-
isExternal: true
|
|
284
|
-
};
|
|
285
|
-
switch (walletType) {
|
|
286
|
-
case "COSMOS":
|
|
287
|
-
{
|
|
288
|
-
const { address, signature, error, cosmosPublicKeyHex, cosmosSigner, addressBech32 } = yield cosmosSignVerificationMessage();
|
|
289
|
-
if (error) {
|
|
290
|
-
setExternalWalletError([error]);
|
|
291
|
-
return;
|
|
292
|
-
} else if (signature && address) {
|
|
293
|
-
verifyExternalWalletParams = {
|
|
294
|
-
externalWallet: __spreadValues({
|
|
295
|
-
partnerId: para.partnerId,
|
|
296
|
-
type: "COSMOS",
|
|
297
|
-
address,
|
|
298
|
-
addressBech32
|
|
299
|
-
}, defaultWalletInfo),
|
|
300
|
-
signedMessage: signature,
|
|
301
|
-
cosmosPublicKeyHex,
|
|
302
|
-
cosmosSigner
|
|
303
|
-
};
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
break;
|
|
307
|
-
case "EVM":
|
|
308
|
-
{
|
|
309
|
-
const { signature, error, address } = yield evmSignVerificationMessage();
|
|
310
|
-
if (error) {
|
|
311
|
-
setExternalWalletError([error]);
|
|
312
|
-
return;
|
|
313
|
-
} else if (signature && address) {
|
|
314
|
-
verifyExternalWalletParams = {
|
|
315
|
-
externalWallet: __spreadValues({
|
|
316
|
-
partnerId: para.partnerId,
|
|
317
|
-
type: "EVM",
|
|
318
|
-
address
|
|
319
|
-
}, defaultWalletInfo),
|
|
320
|
-
signedMessage: signature
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
break;
|
|
325
|
-
case "SOLANA":
|
|
326
|
-
{
|
|
327
|
-
const { signature, error, address } = yield solanaSignVerificationMessage();
|
|
328
|
-
if (error) {
|
|
329
|
-
setExternalWalletError([error]);
|
|
330
|
-
return;
|
|
331
|
-
} else if (signature && address) {
|
|
332
|
-
verifyExternalWalletParams = {
|
|
333
|
-
externalWallet: __spreadValues({
|
|
334
|
-
partnerId: para.partnerId,
|
|
335
|
-
type: "SOLANA",
|
|
336
|
-
address
|
|
337
|
-
}, defaultWalletInfo),
|
|
338
|
-
signedMessage: signature
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
break;
|
|
343
|
-
default:
|
|
344
|
-
break;
|
|
345
|
-
}
|
|
346
|
-
if (!(verifyExternalWalletParams == null ? void 0 : verifyExternalWalletParams.externalWallet) || !(verifyExternalWalletParams == null ? void 0 : verifyExternalWalletParams.signedMessage)) {
|
|
347
|
-
console.error("No signature or address found on the verifyWalletSignature response.");
|
|
348
|
-
setExternalWalletError(["Signature verification failed."]);
|
|
349
|
-
return;
|
|
350
|
-
}
|
|
351
|
-
try {
|
|
352
|
-
const d = yield verifyExternalWalletAsync(verifyExternalWalletParams);
|
|
353
|
-
yield queryClient.refetchQueries({ queryKey: [IS_FULLY_LOGGED_IN_BASE_KEY] });
|
|
354
|
-
if (wallet2 && isWithFullAuth(wallet2)) {
|
|
355
|
-
onNewAuthState(d);
|
|
356
|
-
} else {
|
|
357
|
-
setStep(ModalStep.LOGIN_DONE);
|
|
358
|
-
}
|
|
359
|
-
} catch (e) {
|
|
360
|
-
console.error("Error verifying signature:", e);
|
|
361
|
-
setExternalWalletError(["Signature verification failed."]);
|
|
362
|
-
}
|
|
363
|
-
return verifyExternalWalletParams;
|
|
364
|
-
}), [cosmosSignVerificationMessage, evmSignVerificationMessage, solanaSignVerificationMessage, wallet]);
|
|
365
348
|
const signMessage = useCallback(
|
|
366
349
|
(_0) => __async(this, [_0], function* ({
|
|
367
350
|
message,
|
|
@@ -451,7 +434,7 @@ function ExternalWalletProvider({ children }) {
|
|
|
451
434
|
});
|
|
452
435
|
dispatchEvent(ParaEvent.EXTERNAL_WALLET_CHANGE_EVENT, null);
|
|
453
436
|
try {
|
|
454
|
-
const
|
|
437
|
+
const externalWalletInfo2 = __spreadProps(__spreadValues({
|
|
455
438
|
partnerId: para.partnerId,
|
|
456
439
|
address: walletInfo.address
|
|
457
440
|
}, wallet2.type === "COSMOS" && walletInfo.addressBech32 && {
|
|
@@ -463,56 +446,70 @@ function ExternalWalletProvider({ children }) {
|
|
|
463
446
|
providerId: walletInfo.providerId
|
|
464
447
|
// Use the providerId from requestInfo
|
|
465
448
|
});
|
|
466
|
-
const linkResult = yield para.linkAccount({ externalWallet:
|
|
449
|
+
const linkResult = yield para.linkAccount({ externalWallet: externalWalletInfo2 });
|
|
467
450
|
if (linkResult && linkResult.externalWallet && "signatureVerificationMessage" in linkResult.externalWallet) {
|
|
468
|
-
const
|
|
451
|
+
const verificationMessage2 = linkResult.externalWallet.signatureVerificationMessage;
|
|
469
452
|
const signResult = yield signMessage({
|
|
470
|
-
message:
|
|
471
|
-
externalWallet:
|
|
453
|
+
message: verificationMessage2,
|
|
454
|
+
externalWallet: externalWalletInfo2
|
|
472
455
|
});
|
|
473
456
|
if (!signResult || !signResult.signature) {
|
|
474
457
|
throw new Error(`Failed to sign ${wallet2.type} message: No signature returned`);
|
|
475
458
|
}
|
|
476
459
|
const { signature: signedMessage, cosmosPublicKeyHex, cosmosSigner } = signResult;
|
|
477
|
-
yield para.verifyExternalWalletLink({
|
|
460
|
+
yield para.verifyExternalWalletLink({
|
|
461
|
+
signedMessage,
|
|
462
|
+
cosmosPublicKeyHex,
|
|
463
|
+
cosmosSigner
|
|
464
|
+
});
|
|
478
465
|
} else {
|
|
479
466
|
throw new Error("Unknown error linking external wallet");
|
|
480
467
|
}
|
|
481
468
|
} catch (e) {
|
|
482
469
|
}
|
|
483
470
|
yield connectEmbeddedToExternalConnectors();
|
|
484
|
-
|
|
471
|
+
setAccountView("ACCOUNT_PROFILE");
|
|
485
472
|
} catch (e) {
|
|
486
473
|
setExternalWalletError(["Failed to add wallet. Please try again."]);
|
|
487
474
|
}
|
|
488
475
|
}),
|
|
489
|
-
[para, connectionOnly, includeWalletVerification,
|
|
476
|
+
[para, connectionOnly, includeWalletVerification, setAccountView, setExternalWalletError]
|
|
490
477
|
);
|
|
491
|
-
const
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
yield handleTriggerSignMessage(wallet2, event.data.message);
|
|
511
|
-
window.removeEventListener("message", handleMessage);
|
|
478
|
+
const clearVerificationStatusListener = () => {
|
|
479
|
+
if (verificationStatusListenerRef.current) {
|
|
480
|
+
window.removeEventListener("message", verificationStatusListenerRef.current);
|
|
481
|
+
verificationStatusListenerRef.current = null;
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
const setupExternalWalletVerificationStatusListener = () => {
|
|
485
|
+
clearVerificationStatusListener();
|
|
486
|
+
const handleMessage = (event) => __async(this, null, function* () {
|
|
487
|
+
var _a, _b, _c, _d;
|
|
488
|
+
if (!validatePortalOrigin(event, para.ctx)) {
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
if (((_a = event.data) == null ? void 0 : _a.type) === "EW_VERIFY_SUCCESS") {
|
|
492
|
+
clearPopupWindowCloseListener();
|
|
493
|
+
const serverAuthState = (_b = event.data) == null ? void 0 : _b.serverAuthState;
|
|
494
|
+
if (serverAuthState && ((_c = serverAuthState.externalWallet) == null ? void 0 : _c.withFullParaAuth)) {
|
|
495
|
+
const authState = yield para.verifyExternalWallet({ serverAuthState });
|
|
496
|
+
yield onNewAuthState(authState);
|
|
512
497
|
}
|
|
513
|
-
|
|
498
|
+
clearVerificationStatusListener();
|
|
499
|
+
}
|
|
500
|
+
if (((_d = event.data) == null ? void 0 : _d.type) === "EW_VERIFY_RETRY") {
|
|
501
|
+
verificationMessage.current = event.data.message;
|
|
502
|
+
yield handleRetrySignVerificationMessage();
|
|
503
|
+
clearVerificationStatusListener();
|
|
504
|
+
}
|
|
514
505
|
});
|
|
506
|
+
verificationStatusListenerRef.current = handleMessage;
|
|
507
|
+
typeof window !== "undefined" && window.addEventListener("message", handleMessage);
|
|
515
508
|
};
|
|
509
|
+
const handleRetrySignVerificationMessage = () => __async(this, null, function* () {
|
|
510
|
+
handlePostMessage({ type: "EW_VERIFY_RETRY" });
|
|
511
|
+
yield handleTriggerSignMessage();
|
|
512
|
+
});
|
|
516
513
|
const handlePostMessage = (message) => {
|
|
517
514
|
var _a;
|
|
518
515
|
if (refs.popupWindow.current) {
|
|
@@ -521,70 +518,18 @@ function ExternalWalletProvider({ children }) {
|
|
|
521
518
|
(_a = refs.iFrame.current.contentWindow) == null ? void 0 : _a.postMessage(message, "*");
|
|
522
519
|
}
|
|
523
520
|
};
|
|
524
|
-
const handleTriggerSignMessage = (
|
|
525
|
-
|
|
521
|
+
const handleTriggerSignMessage = () => __async(this, null, function* () {
|
|
522
|
+
if (!verificationMessage.current || !externalWalletInfo.current) {
|
|
523
|
+
console.error("No verification message or external wallet info available for signing message.");
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
setupExternalWalletVerificationStatusListener();
|
|
526
527
|
try {
|
|
527
|
-
const
|
|
528
|
-
|
|
529
|
-
|
|
528
|
+
const verifyExternalWalletParams = yield para.signExternalWalletVerification({
|
|
529
|
+
type: externalWalletInfo.current.type,
|
|
530
|
+
message: verificationMessage.current,
|
|
531
|
+
address: externalWalletInfo.current.address
|
|
530
532
|
});
|
|
531
|
-
const paraWallet = Object.values(para.externalWallets)[0];
|
|
532
|
-
const walletType = paraWallet == null ? void 0 : paraWallet.type;
|
|
533
|
-
let verifyExternalWalletParams;
|
|
534
|
-
const withVerification = includeWalletVerification;
|
|
535
|
-
const isConnectionOnly = connectionOnly;
|
|
536
|
-
const withFullParaAuth = (paraWallet == null ? void 0 : paraWallet.name) ? isWithFullAuth(paraWallet) : false;
|
|
537
|
-
const defaultWalletInfo = {
|
|
538
|
-
withVerification,
|
|
539
|
-
isConnectionOnly,
|
|
540
|
-
withFullParaAuth,
|
|
541
|
-
provider: paraWallet.name,
|
|
542
|
-
providerId: paraWallet.externalProviderId,
|
|
543
|
-
isExternal: true
|
|
544
|
-
};
|
|
545
|
-
switch (walletType) {
|
|
546
|
-
case "COSMOS":
|
|
547
|
-
{
|
|
548
|
-
verifyExternalWalletParams = {
|
|
549
|
-
externalWallet: __spreadValues({
|
|
550
|
-
partnerId: para.partnerId,
|
|
551
|
-
type: "COSMOS",
|
|
552
|
-
address,
|
|
553
|
-
addressBech32
|
|
554
|
-
}, defaultWalletInfo),
|
|
555
|
-
signedMessage: signature,
|
|
556
|
-
cosmosPublicKeyHex,
|
|
557
|
-
cosmosSigner
|
|
558
|
-
};
|
|
559
|
-
}
|
|
560
|
-
break;
|
|
561
|
-
case "EVM":
|
|
562
|
-
{
|
|
563
|
-
verifyExternalWalletParams = {
|
|
564
|
-
externalWallet: __spreadValues({
|
|
565
|
-
partnerId: para.partnerId,
|
|
566
|
-
type: "EVM",
|
|
567
|
-
address
|
|
568
|
-
}, defaultWalletInfo),
|
|
569
|
-
signedMessage: signature
|
|
570
|
-
};
|
|
571
|
-
}
|
|
572
|
-
break;
|
|
573
|
-
case "SOLANA":
|
|
574
|
-
{
|
|
575
|
-
verifyExternalWalletParams = {
|
|
576
|
-
externalWallet: __spreadValues({
|
|
577
|
-
partnerId: para.partnerId,
|
|
578
|
-
type: "SOLANA",
|
|
579
|
-
address
|
|
580
|
-
}, defaultWalletInfo),
|
|
581
|
-
signedMessage: signature
|
|
582
|
-
};
|
|
583
|
-
}
|
|
584
|
-
break;
|
|
585
|
-
default:
|
|
586
|
-
break;
|
|
587
|
-
}
|
|
588
533
|
if (!(verifyExternalWalletParams == null ? void 0 : verifyExternalWalletParams.externalWallet) || !(verifyExternalWalletParams == null ? void 0 : verifyExternalWalletParams.signedMessage)) {
|
|
589
534
|
console.error("No signature or address found on the verifyWalletSignature response.");
|
|
590
535
|
handlePostMessage({ type: "EW_SIGN_MESSAGE_ERROR", error: "Signature verification failed." });
|
|
@@ -595,23 +540,44 @@ function ExternalWalletProvider({ children }) {
|
|
|
595
540
|
handlePostMessage({ type: "EW_SIGN_MESSAGE_ERROR", error: error.message || "Error signing message" });
|
|
596
541
|
}
|
|
597
542
|
});
|
|
598
|
-
const
|
|
599
|
-
if (
|
|
543
|
+
const clearVerificationTriggerListener = () => {
|
|
544
|
+
if (verificationTriggerListenerRef.current) {
|
|
545
|
+
window.removeEventListener("message", verificationTriggerListenerRef.current);
|
|
546
|
+
verificationTriggerListenerRef.current = null;
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
const setupExternalWalletVerificationTriggerListener = () => {
|
|
550
|
+
if (!externalWalletInfo.current) {
|
|
551
|
+
console.error("No external wallet info available for signing message.");
|
|
600
552
|
return;
|
|
601
553
|
}
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
}
|
|
554
|
+
clearVerificationTriggerListener();
|
|
555
|
+
const handleMessage = (event) => __async(this, null, function* () {
|
|
556
|
+
var _a;
|
|
557
|
+
if (!validatePortalOrigin(event, para.ctx)) {
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
560
|
+
if (((_a = event.data) == null ? void 0 : _a.type) === "EW_TRIGGER_SIGN_MESSAGE") {
|
|
561
|
+
verificationMessage.current = event.data.message;
|
|
562
|
+
yield handleTriggerSignMessage();
|
|
563
|
+
clearVerificationTriggerListener();
|
|
564
|
+
}
|
|
613
565
|
});
|
|
566
|
+
verificationTriggerListenerRef.current = handleMessage;
|
|
567
|
+
typeof window !== "undefined" && window.addEventListener("message", handleMessage);
|
|
614
568
|
};
|
|
569
|
+
const switchConnection = (_0) => __async(this, [_0], function* ({ type, id }) {
|
|
570
|
+
switch (type) {
|
|
571
|
+
case "EVM":
|
|
572
|
+
yield evmSwitchConnection == null ? void 0 : evmSwitchConnection(id);
|
|
573
|
+
break;
|
|
574
|
+
case "COSMOS":
|
|
575
|
+
yield cosmosSwitchConnection == null ? void 0 : cosmosSwitchConnection(id);
|
|
576
|
+
break;
|
|
577
|
+
default:
|
|
578
|
+
break;
|
|
579
|
+
}
|
|
580
|
+
});
|
|
615
581
|
const setupPopupWindowCloseListener = () => {
|
|
616
582
|
const popup = refs.popupWindow.current;
|
|
617
583
|
if (!popup) return;
|
|
@@ -625,7 +591,6 @@ function ExternalWalletProvider({ children }) {
|
|
|
625
591
|
popupCloseIntervalRef.current = null;
|
|
626
592
|
}
|
|
627
593
|
goBack();
|
|
628
|
-
disconnectExternalWallet();
|
|
629
594
|
}
|
|
630
595
|
}, 500);
|
|
631
596
|
};
|
|
@@ -642,35 +607,40 @@ function ExternalWalletProvider({ children }) {
|
|
|
642
607
|
const handlePostConnectError = (error) => {
|
|
643
608
|
handlePostMessage({ type: "EW_CONNECT_ERROR", error });
|
|
644
609
|
};
|
|
645
|
-
const
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
}
|
|
650
|
-
if (((_a = event.data) == null ? void 0 : _a.type) === "EW_CONNECT_RETRY") {
|
|
651
|
-
clearExternalWalletConnectionRetryListener(wallet2);
|
|
652
|
-
yield connectExternalWallet({ wallet: wallet2, isMobileConnect: wallet2.isMobile, isRetryConnection: true });
|
|
610
|
+
const clearExternalWalletConnectionRetryListener = () => {
|
|
611
|
+
if (connectionRetryListenerRef.current) {
|
|
612
|
+
window.removeEventListener("message", connectionRetryListenerRef.current);
|
|
613
|
+
connectionRetryListenerRef.current = null;
|
|
653
614
|
}
|
|
654
|
-
});
|
|
655
|
-
const setupExternalWalletConnectionRetryListener = (wallet2) => {
|
|
656
|
-
typeof window !== "undefined" && window.addEventListener("message", handleConnectRetryMessage(wallet2));
|
|
657
615
|
};
|
|
658
|
-
const
|
|
659
|
-
|
|
616
|
+
const setupExternalWalletConnectionRetryListener = (wallet2) => {
|
|
617
|
+
clearExternalWalletConnectionRetryListener();
|
|
618
|
+
const handleMessage = (event) => __async(this, null, function* () {
|
|
619
|
+
var _a;
|
|
620
|
+
if (!validatePortalOrigin(event, para.ctx)) {
|
|
621
|
+
return;
|
|
622
|
+
}
|
|
623
|
+
if (((_a = event.data) == null ? void 0 : _a.type) === "EW_CONNECT_RETRY") {
|
|
624
|
+
clearExternalWalletConnectionRetryListener();
|
|
625
|
+
yield connectExternalWallet({ wallet: wallet2, isMobile: wallet2.isMobile, isRetryConnection: true });
|
|
626
|
+
}
|
|
627
|
+
});
|
|
628
|
+
connectionRetryListenerRef.current = handleMessage;
|
|
629
|
+
typeof window !== "undefined" && window.addEventListener("message", handleMessage);
|
|
660
630
|
};
|
|
661
631
|
const connectExternalWallet = useCallback(
|
|
662
632
|
(_0) => __async(this, [_0], function* ({
|
|
663
633
|
wallet: wallet2,
|
|
664
634
|
isManualWalletConnect,
|
|
665
|
-
isMobileConnect,
|
|
635
|
+
isMobile: isMobileConnect,
|
|
666
636
|
isResetAfterManualWalletConnect,
|
|
667
637
|
isRetryConnection
|
|
668
638
|
}) {
|
|
669
639
|
if (isRetryConnection) {
|
|
670
|
-
clearExternalWalletConnectionRetryListener(
|
|
640
|
+
clearExternalWalletConnectionRetryListener();
|
|
671
641
|
handlePostConnectRetry();
|
|
672
642
|
}
|
|
673
|
-
if (!isMobile() && isWithFullAuth(wallet2)) {
|
|
643
|
+
if (!isMobile() && isWithFullAuth(wallet2) && !isManualWalletConnect) {
|
|
674
644
|
const popupUrl = yield para.constructPortalUrl("connectExternalWallet");
|
|
675
645
|
if (typeof window !== void 0) {
|
|
676
646
|
refs.popupWindow.current = openPopup({
|
|
@@ -682,6 +652,8 @@ function ExternalWalletProvider({ children }) {
|
|
|
682
652
|
setupPopupWindowCloseListener();
|
|
683
653
|
}
|
|
684
654
|
if (isExternalWalletConnecting && isManualWalletConnect) {
|
|
655
|
+
clearPopupWindowCloseListener();
|
|
656
|
+
yield para.cancelAuthFlow();
|
|
685
657
|
yield evmDisconnect();
|
|
686
658
|
yield solanaDisconnect();
|
|
687
659
|
yield cosmosDisconnect();
|
|
@@ -693,27 +665,31 @@ function ExternalWalletProvider({ children }) {
|
|
|
693
665
|
setIsExternalWalletConnecting(true);
|
|
694
666
|
setIsUsingMobileConnector(isMobileConnect);
|
|
695
667
|
listenForWalletConnectUri();
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
668
|
+
try {
|
|
669
|
+
const { address, error, authState } = yield isMobileConnect ? wallet2.connectMobile(isManualWalletConnect, connectionOnly) : wallet2.connect(connectionOnly);
|
|
670
|
+
if (error) {
|
|
671
|
+
setExternalWalletError([error]);
|
|
672
|
+
setIsUsingMobileConnector();
|
|
673
|
+
handlePostConnectError(error);
|
|
674
|
+
if (isManualWalletConnect && error === "Connection request rejected") {
|
|
675
|
+
setExternalWalletError();
|
|
676
|
+
yield connectExternalWallet({ wallet: wallet2, isResetAfterManualWalletConnect: true });
|
|
677
|
+
return;
|
|
678
|
+
}
|
|
679
|
+
setupExternalWalletConnectionRetryListener(wallet2);
|
|
680
|
+
} else if (address) {
|
|
681
|
+
if (!!authState && (isWithFullAuth(wallet2) || includeWalletVerification)) {
|
|
682
|
+
clearExternalWalletConnectionRetryListener();
|
|
683
|
+
yield onNewAuthState(authState);
|
|
684
|
+
externalWalletInfo.current = authState.externalWallet || null;
|
|
685
|
+
setupExternalWalletVerificationTriggerListener();
|
|
686
|
+
} else {
|
|
687
|
+
setShowPostAuthFlow(true);
|
|
688
|
+
}
|
|
714
689
|
}
|
|
690
|
+
} finally {
|
|
691
|
+
setIsExternalWalletConnecting(false);
|
|
715
692
|
}
|
|
716
|
-
setIsExternalWalletConnecting(false);
|
|
717
693
|
}
|
|
718
694
|
}),
|
|
719
695
|
[isExternalWalletConnecting, externalWalletsWithFullAuth, connectionOnly, includeWalletVerification]
|
|
@@ -855,7 +831,7 @@ function ExternalWalletProvider({ children }) {
|
|
|
855
831
|
console.warn("Failed to connect Para EVM wallet to Wagmi:", error);
|
|
856
832
|
} else {
|
|
857
833
|
if (evmWallet) {
|
|
858
|
-
setSelectedWallet({ id: evmWallet.id, type: "EVM" });
|
|
834
|
+
yield setSelectedWallet({ id: evmWallet.id, type: "EVM" });
|
|
859
835
|
}
|
|
860
836
|
}
|
|
861
837
|
} catch (err) {
|
|
@@ -869,7 +845,7 @@ function ExternalWalletProvider({ children }) {
|
|
|
869
845
|
console.warn("Failed to connect Para Cosmos wallet to Graz:", error);
|
|
870
846
|
} else {
|
|
871
847
|
if (cosmosWallet) {
|
|
872
|
-
setSelectedWallet({ id: cosmosWallet.id, type: "COSMOS" });
|
|
848
|
+
yield setSelectedWallet({ id: cosmosWallet.id, type: "COSMOS" });
|
|
873
849
|
}
|
|
874
850
|
}
|
|
875
851
|
} catch (err) {
|
|
@@ -878,16 +854,41 @@ function ExternalWalletProvider({ children }) {
|
|
|
878
854
|
}
|
|
879
855
|
}), [evmConnectParaEmbedded, cosmosConnectParaEmbedded]);
|
|
880
856
|
useEffect(() => {
|
|
881
|
-
|
|
882
|
-
yield connectEmbeddedToExternalConnectors();
|
|
883
|
-
});
|
|
884
|
-
}, [connectEmbeddedToExternalConnectors]);
|
|
885
|
-
useEffect(() => {
|
|
886
|
-
if (isReady && isFarcasterMiniApp && !isConnected && !(farcasterMiniAppConfig == null ? void 0 : farcasterMiniAppConfig.disableAutoConnect) && !refs.wasSignedIn.current && !refs.initialFarcasterConnected.current && !!evmFarcasterStatus && !!solanaFarcasterStatus) {
|
|
857
|
+
if (isReady && isFarcasterMiniApp && !isConnected && !(farcasterMiniAppConfig == null ? void 0 : farcasterMiniAppConfig.disableAutoConnect) && !refs.initialFarcasterConnected.current && !!evmFarcasterStatus && !!solanaFarcasterStatus) {
|
|
887
858
|
refs.initialFarcasterConnected.current = true;
|
|
888
859
|
connectFarcasterMiniApp();
|
|
889
860
|
}
|
|
890
861
|
}, [isReady, isConnected, isFarcasterMiniApp, farcasterMiniAppConfig, evmFarcasterStatus, solanaFarcasterStatus]);
|
|
862
|
+
useEffect(() => {
|
|
863
|
+
return () => {
|
|
864
|
+
clearVerificationStatusListener();
|
|
865
|
+
clearVerificationTriggerListener();
|
|
866
|
+
clearExternalWalletConnectionRetryListener();
|
|
867
|
+
if (popupCloseIntervalRef.current) {
|
|
868
|
+
clearInterval(popupCloseIntervalRef.current);
|
|
869
|
+
popupCloseIntervalRef.current = null;
|
|
870
|
+
}
|
|
871
|
+
};
|
|
872
|
+
}, []);
|
|
873
|
+
useEffect(() => {
|
|
874
|
+
return () => {
|
|
875
|
+
walletConnectCleanup == null ? void 0 : walletConnectCleanup();
|
|
876
|
+
};
|
|
877
|
+
}, [walletConnectCleanup]);
|
|
878
|
+
useEffect(() => {
|
|
879
|
+
const setupWalletConnection = () => __async(this, null, function* () {
|
|
880
|
+
if (!isConnected) {
|
|
881
|
+
return;
|
|
882
|
+
}
|
|
883
|
+
if (selectedWallet) {
|
|
884
|
+
const wallet2 = para == null ? void 0 : para.findWallet(selectedWallet.id, selectedWallet.type);
|
|
885
|
+
if (wallet2) {
|
|
886
|
+
yield switchConnection({ type: wallet2.type, id: !!wallet2.isExternal ? wallet2.name : "Para" });
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
});
|
|
890
|
+
setupWalletConnection();
|
|
891
|
+
}, [isConnected]);
|
|
891
892
|
return /* @__PURE__ */ jsx(
|
|
892
893
|
ExternalWalletContext.Provider,
|
|
893
894
|
{
|
|
@@ -910,15 +911,16 @@ function ExternalWalletProvider({ children }) {
|
|
|
910
911
|
connectEmbeddedToExternalConnectors,
|
|
911
912
|
signMessage,
|
|
912
913
|
isSigningMessage,
|
|
913
|
-
verifyWalletSignature,
|
|
914
914
|
getWalletBalance,
|
|
915
915
|
requestInfo,
|
|
916
916
|
disconnectBase,
|
|
917
917
|
connectFarcasterMiniApp,
|
|
918
|
+
switchConnection,
|
|
918
919
|
verificationStage,
|
|
919
920
|
evmDisconnectStatus,
|
|
920
921
|
solanaDisconnectStatus,
|
|
921
|
-
cosmosDisconnectStatus
|
|
922
|
+
cosmosDisconnectStatus,
|
|
923
|
+
retryVerification
|
|
922
924
|
}),
|
|
923
925
|
[
|
|
924
926
|
wallets,
|
|
@@ -935,18 +937,18 @@ function ExternalWalletProvider({ children }) {
|
|
|
935
937
|
addAdditionalExternalWallet,
|
|
936
938
|
switchChain,
|
|
937
939
|
setChainIdSwitchingTo,
|
|
938
|
-
connectEmbeddedToExternalConnectors,
|
|
939
940
|
signMessage,
|
|
940
941
|
isSigningMessage,
|
|
941
|
-
verifyWalletSignature,
|
|
942
942
|
getWalletBalance,
|
|
943
943
|
requestInfo,
|
|
944
944
|
disconnectBase,
|
|
945
945
|
connectFarcasterMiniApp,
|
|
946
|
+
switchConnection,
|
|
946
947
|
verificationStage,
|
|
947
948
|
evmDisconnectStatus,
|
|
948
949
|
solanaDisconnectStatus,
|
|
949
|
-
cosmosDisconnectStatus
|
|
950
|
+
cosmosDisconnectStatus,
|
|
951
|
+
retryVerification
|
|
950
952
|
]
|
|
951
953
|
),
|
|
952
954
|
children
|