@dynamic-labs/sdk-react-core 0.18.100-viem.2 → 0.18.100-viem.20
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/CHANGELOG.md +171 -0
- package/package.cjs +3 -3
- package/package.js +3 -3
- package/package.json +10 -10
- package/src/index.cjs +3 -2
- package/src/index.d.ts +1 -1
- package/src/index.js +2 -1
- package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +1 -1
- package/src/lib/components/MenuList/Dropdown/Dropdown.js +1 -1
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.cjs +6 -2
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.d.ts +2 -1
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.js +6 -2
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +2 -2
- package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +1 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +2 -2
- package/src/lib/components/SignMessagePreview/SignMessagePreview.cjs +27 -0
- package/src/lib/components/SignMessagePreview/SignMessagePreview.d.ts +6 -0
- package/src/lib/components/SignMessagePreview/SignMessagePreview.js +23 -0
- package/src/lib/components/SignMessagePreview/SignMessagePreview.types.d.ts +8 -0
- package/src/lib/components/SignMessagePreview/components/SignTypedDataPreview/SignTypedDataPreview.cjs +44 -0
- package/src/lib/components/SignMessagePreview/components/SignTypedDataPreview/SignTypedDataPreview.d.ts +8 -0
- package/src/lib/components/SignMessagePreview/components/SignTypedDataPreview/SignTypedDataPreview.js +40 -0
- package/src/lib/components/SignMessagePreview/components/SignTypedDataPreview/index.d.ts +1 -0
- package/src/lib/components/SignMessagePreview/components/index.d.ts +1 -0
- package/src/lib/components/SignMessagePreview/index.d.ts +1 -0
- package/src/lib/components/SignMessagePreview/utils/index.d.ts +1 -0
- package/src/lib/components/SignMessagePreview/utils/isSignTypedData/index.d.ts +1 -0
- package/src/lib/components/SignMessagePreview/utils/isSignTypedData/isSignTypedData.cjs +17 -0
- package/src/lib/components/SignMessagePreview/utils/isSignTypedData/isSignTypedData.d.ts +2 -0
- package/src/lib/components/SignMessagePreview/utils/isSignTypedData/isSignTypedData.js +13 -0
- package/src/lib/components/Typography/Typography.cjs +1 -0
- package/src/lib/components/Typography/Typography.js +1 -0
- package/src/lib/components/Typography/Typography.types.d.ts +1 -1
- package/src/lib/components/UserProfile/UserProfile.cjs +1 -1
- package/src/lib/components/UserProfile/UserProfile.js +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +1 -1
- package/src/lib/components/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +22 -7
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +11 -1
- package/src/lib/context/DynamicContext/DynamicContext.js +23 -8
- package/src/lib/context/DynamicContext/helpers.cjs +42 -3
- package/src/lib/context/DynamicContext/helpers.d.ts +7 -1
- package/src/lib/context/DynamicContext/helpers.js +38 -4
- package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.cjs +5 -2
- package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.d.ts +4 -2
- package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.js +5 -2
- package/src/lib/context/DynamicContext/internalEvents/index.d.ts +2 -0
- package/src/lib/context/DynamicContext/internalEvents/internalEvents.cjs +14 -0
- package/src/lib/context/DynamicContext/internalEvents/internalEvents.d.ts +8 -0
- package/src/lib/context/DynamicContext/internalEvents/internalEvents.js +6 -0
- package/src/lib/context/DynamicContext/types/index.d.ts +7 -1
- package/src/lib/context/DynamicContext/useDynamicContext.cjs +2 -1
- package/src/lib/context/DynamicContext/useDynamicContext.d.ts +1 -1
- package/src/lib/context/DynamicContext/useDynamicContext.js +2 -1
- package/src/lib/context/ErrorContext/ErrorContext.cjs +1 -0
- package/src/lib/context/ErrorContext/ErrorContext.js +1 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +2 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +2 -1
- package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
- package/src/lib/context/WalletContext/WalletContext.cjs +2 -16
- package/src/lib/context/WalletContext/WalletContext.js +2 -16
- package/src/lib/data/api.cjs +37 -13
- package/src/lib/data/api.d.ts +5 -3
- package/src/lib/data/api.js +37 -14
- package/src/lib/main.global.cjs +1 -1
- package/src/lib/main.global.js +1 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +2 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +2 -1
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +2 -1
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +2 -1
- package/src/lib/shared/types/index.d.ts +4 -0
- package/src/lib/shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.cjs +28 -2
- package/src/lib/shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.js +28 -2
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/constants/localStorage.cjs +4 -0
- package/src/lib/utils/constants/localStorage.d.ts +2 -0
- package/src/lib/utils/constants/localStorage.js +3 -1
- package/src/lib/utils/functions/createUserProfile/createUserProfile.cjs +1 -1
- package/src/lib/utils/functions/createUserProfile/createUserProfile.js +1 -1
- package/src/lib/utils/functions/digestSHA256/digestSHA256.cjs +11 -0
- package/src/lib/utils/functions/digestSHA256/digestSHA256.d.ts +1 -0
- package/src/lib/utils/functions/digestSHA256/digestSHA256.js +7 -0
- package/src/lib/utils/functions/digestSHA256/index.d.ts +1 -0
- package/src/lib/utils/functions/encodeBase64URL/encodeBase64URL.cjs +14 -0
- package/src/lib/utils/functions/encodeBase64URL/encodeBase64URL.d.ts +1 -0
- package/src/lib/utils/functions/encodeBase64URL/encodeBase64URL.js +10 -0
- package/src/lib/utils/functions/encodeBase64URL/index.d.ts +1 -0
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.cjs +6 -1
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.js +6 -1
- package/src/lib/utils/functions/getRedirectURIOrigin/getRedirectURIOrigin.cjs +33 -0
- package/src/lib/utils/functions/getRedirectURIOrigin/getRedirectURIOrigin.d.ts +1 -0
- package/src/lib/utils/functions/getRedirectURIOrigin/getRedirectURIOrigin.js +29 -0
- package/src/lib/utils/functions/getRedirectURIOrigin/index.d.ts +1 -0
- package/src/lib/utils/functions/index.d.ts +6 -0
- package/src/lib/utils/functions/randomString/index.d.ts +1 -0
- package/src/lib/utils/functions/randomString/randomString.cjs +14 -0
- package/src/lib/utils/functions/randomString/randomString.d.ts +1 -0
- package/src/lib/utils/functions/randomString/randomString.js +10 -0
- package/src/lib/utils/functions/sendTransactionWithAutoNonce/index.d.ts +1 -0
- package/src/lib/utils/functions/sendTransactionWithAutoNonce/sendTransactionWithAutoNonce.cjs +48 -0
- package/src/lib/utils/functions/sendTransactionWithAutoNonce/sendTransactionWithAutoNonce.d.ts +18 -0
- package/src/lib/utils/functions/sendTransactionWithAutoNonce/sendTransactionWithAutoNonce.js +43 -0
- package/src/lib/utils/functions/stringifyURIQuery/index.d.ts +1 -0
- package/src/lib/utils/functions/stringifyURIQuery/stringifyURIQuery.cjs +13 -0
- package/src/lib/utils/functions/stringifyURIQuery/stringifyURIQuery.d.ts +1 -0
- package/src/lib/utils/functions/stringifyURIQuery/stringifyURIQuery.js +9 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +10 -5
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +10 -5
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +6 -2
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +6 -2
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +13 -4
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +1 -19
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +13 -4
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +22 -28
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +1 -2
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +23 -29
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +7 -6
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +7 -6
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs +10 -1
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +10 -1
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +15 -1
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +15 -1
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.cjs +6 -2
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.d.ts +2 -1
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.js +6 -2
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +132 -24
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.d.ts +5 -1
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +134 -26
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +13 -3
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +13 -3
- package/src/lib/utils/hooks/useWallets/useWallets.cjs +16 -25
- package/src/lib/utils/hooks/useWallets/useWallets.d.ts +3 -2
- package/src/lib/utils/hooks/useWallets/useWallets.js +17 -26
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +3 -3
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +3 -3
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +1 -1
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +1 -1
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +1 -1
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +1 -1
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +3 -2
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +3 -2
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +3 -2
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +3 -2
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.cjs +4 -10
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.js +4 -10
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +1 -0
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.js +1 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +1 -1
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +1 -1
- package/src/lib/views/WalletList/data.cjs +2 -14
- package/src/lib/views/WalletList/data.d.ts +4 -2
- package/src/lib/views/WalletList/data.js +2 -13
- package/src/lib/views/viewToComponentMap.cjs +1 -0
- package/src/lib/views/viewToComponentMap.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.cjs +3 -3
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.js +3 -3
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +7 -10
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +8 -11
- package/src/lib/widgets/DynamicWidget/hooks/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.cjs +4 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.js +4 -1
- package/src/lib/widgets/DynamicWidget/hooks/useViewController/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useViewController/useViewController.cjs +17 -0
- package/src/lib/widgets/DynamicWidget/hooks/useViewController/useViewController.d.ts +6 -0
- package/src/lib/widgets/DynamicWidget/hooks/useViewController/useViewController.js +13 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +3 -3
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +3 -3
- package/src/lib/widgets/DynamicWidget/views/SendBalanceWidgetView/SendBalanceWidgetView.cjs +2 -3
- package/src/lib/widgets/DynamicWidget/views/SendBalanceWidgetView/SendBalanceWidgetView.js +2 -3
- package/src/lib/widgets/OAuthIFrameContainer/OAuthIFrameContainer.cjs +13 -0
- package/src/lib/widgets/OAuthIFrameContainer/OAuthIFrameContainer.d.ts +2 -0
- package/src/lib/widgets/OAuthIFrameContainer/OAuthIFrameContainer.js +9 -0
- package/src/lib/widgets/OAuthIFrameContainer/index.d.ts +1 -0
- package/src/lib/widgets/index.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,175 @@
|
|
|
1
1
|
|
|
2
|
+
### [0.18.100-viem.20](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.19...v0.18.100-viem.20) (2023-09-25)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* signing messages with backpack ([#3400](https://github.com/dynamic-labs/DynamicAuth/issues/3400)) ([f3231d8](https://github.com/dynamic-labs/DynamicAuth/commit/f3231d82c739ccd40ac9de6a33a0a1dd116145bf))
|
|
8
|
+
|
|
9
|
+
### [0.18.100-viem.19](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.18...v0.18.100-viem.19) (2023-09-22)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* pass the network param on wallet transfers ([#3307](https://github.com/dynamic-labs/DynamicAuth/issues/3307)) ([#3385](https://github.com/dynamic-labs/DynamicAuth/issues/3385)) ([d003423](https://github.com/dynamic-labs/DynamicAuth/commit/d00342377fe1cd9605f37e54edb647378edd45d5))
|
|
15
|
+
|
|
16
|
+
### [0.18.100-viem.18](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.17...v0.18.100-viem.18) (2023-09-20)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* show default wallet icon when no image is available ([#3291](https://github.com/dynamic-labs/DynamicAuth/issues/3291)) ([b541d00](https://github.com/dynamic-labs/DynamicAuth/commit/b541d002a0f6ff2e409034341e6e2191d6d3ac7f))
|
|
22
|
+
* display user profile when closing send balance ([#3333](https://github.com/dynamic-labs/DynamicAuth/issues/3333)) ([#3337](https://github.com/dynamic-labs/DynamicAuth/issues/3337)) ([5b3e665](https://github.com/dynamic-labs/DynamicAuth/commit/5b3e665a6ebfc0b46b84c787634d2e27bc4a9270))
|
|
23
|
+
* display sign typed data message for confirmation ([#3328](https://github.com/dynamic-labs/DynamicAuth/issues/3328)) ([2b93473](https://github.com/dynamic-labs/DynamicAuth/commit/2b93473024e277072be32a17c5513168b85d13f9))
|
|
24
|
+
* remove async from getWeb3Provider method in Magic connector ([#3281](https://github.com/dynamic-labs/DynamicAuth/issues/3281)) ([1d949c1](https://github.com/dynamic-labs/DynamicAuth/commit/1d949c18df8d5453f057f61b0c54ac16de1fbb76))
|
|
25
|
+
* fixes unlinking oauth account from multi wallet panel ([#3344](https://github.com/dynamic-labs/DynamicAuth/issues/3344)) ([87d08d6](https://github.com/dynamic-labs/DynamicAuth/commit/87d08d667f7bb82fcbadcf651a99c08acfdabf1e))
|
|
26
|
+
* prevent wallet connect v2 from redirect user to last known wallet after logout ([#3354](https://github.com/dynamic-labs/DynamicAuth/issues/3354)) ([dd39b13](https://github.com/dynamic-labs/DynamicAuth/commit/dd39b136af95667d1bf81586034eee5dc9c385db))
|
|
27
|
+
|
|
28
|
+
### [0.18.100-viem.17](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.16...v0.18.100-viem.17) (2023-09-11)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* remove react component props from sending to sdk api v18-viem ([#3287](https://github.com/dynamic-labs/DynamicAuth/issues/3287)) ([18e7617](https://github.com/dynamic-labs/DynamicAuth/commit/18e76179b3287cc9ca60efc2771e072bb87667ba)), closes [#3282](https://github.com/dynamic-labs/DynamicAuth/issues/3282)
|
|
34
|
+
|
|
35
|
+
### [0.18.100-viem.16](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.15...v0.18.100-viem.16) (2023-09-11)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Bug Fixes
|
|
39
|
+
|
|
40
|
+
* catch error sending sdkSettings and log warning v18-viem ([#3277](https://github.com/dynamic-labs/DynamicAuth/issues/3277)) ([af86753](https://github.com/dynamic-labs/DynamicAuth/commit/af86753f4b73c0ec4ba981c9ffd47af21fac9d8d)), closes [#3274](https://github.com/dynamic-labs/DynamicAuth/issues/3274)
|
|
41
|
+
* issue where unexpected token would occur when bundlers defined process.env ([#3283](https://github.com/dynamic-labs/DynamicAuth/issues/3283)) ([16110f9](https://github.com/dynamic-labs/DynamicAuth/commit/16110f90f02841104b053365b17343ed80a72018))
|
|
42
|
+
* seprate ls checks for dynamiccontext and wagmi settings v18-viem ([#3279](https://github.com/dynamic-labs/DynamicAuth/issues/3279)) ([e31d85e](https://github.com/dynamic-labs/DynamicAuth/commit/e31d85e576d0fba31616d6aa408316c261f42373)), closes [#3275](https://github.com/dynamic-labs/DynamicAuth/issues/3275)
|
|
43
|
+
|
|
44
|
+
### [0.18.100-viem.15](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.14...v0.18.100-viem.15) (2023-09-11)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Bug Fixes
|
|
48
|
+
* sdkSettings should call once per session ([#3189](https://github.com/dynamic-labs/DynamicAuth/issues/3189)) ([#3265](https://github.com/dynamic-labs/DynamicAuth/issues/3265)) ([f46a692](https://github.com/dynamic-labs/DynamicAuth/commit/f46a6927684caf5962e5b60a9927030a5f7720e2))
|
|
49
|
+
* wallet transition in the bridge ([#3268](https://github.com/dynamic-labs/DynamicAuth/issues/3268)) ([#3271](https://github.com/dynamic-labs/DynamicAuth/issues/3271)) ([95e6d5f](https://github.com/dynamic-labs/DynamicAuth/commit/95e6d5f6ff003ff428795bdd73e2d88da366ed56)), closes [#3243](https://github.com/dynamic-labs/DynamicAuth/issues/3243)
|
|
50
|
+
|
|
51
|
+
### [0.18.100-viem.14](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.13...v0.18.100-viem.14) (2023-09-05)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### Features
|
|
55
|
+
|
|
56
|
+
* add onSignedMessage callback ([#3214](https://github.com/dynamic-labs/DynamicAuth/issues/3214)) ([92fd070](https://github.com/dynamic-labs/DynamicAuth/commit/92fd070c8edabce5ed991cfd92b3745c7afb0b43))
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### Bug Fixes
|
|
60
|
+
|
|
61
|
+
* prefer mainnet chain id when connecting with WCv2 ([#3220](https://github.com/dynamic-labs/DynamicAuth/issues/3220)) ([55eb097](https://github.com/dynamic-labs/DynamicAuth/commit/55eb09739f4c8912a9de2198f69cd925923270c4))
|
|
62
|
+
|
|
63
|
+
### [0.18.100-viem.13](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.12...v0.18.100-viem.13) (2023-09-01)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Features
|
|
67
|
+
|
|
68
|
+
* add option to disable the locked wallet view ([#3187](https://github.com/dynamic-labs/DynamicAuth/issues/3187)) ([aa70fb5](https://github.com/dynamic-labs/DynamicAuth/commit/aa70fb52bb185e27fdb311b0e0dd10166a83d60a))
|
|
69
|
+
* migrate starknet version to v5 ([#3198](https://github.com/dynamic-labs/DynamicAuth/issues/3198)) ([e5b24ea](https://github.com/dynamic-labs/DynamicAuth/commit/e5b24ea86ce58f83a539d8ef8adc6fb0c77bd51a))
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### Bug Fixes
|
|
73
|
+
|
|
74
|
+
* show the multi wallet list when opening the auth flow to authenticated users ([#3165](https://github.com/dynamic-labs/DynamicAuth/issues/3165)) ([b7a7110](https://github.com/dynamic-labs/DynamicAuth/commit/b7a71106a730925dc44abbd0e3aedf5ce3f5ca39)), closes [#3134](https://github.com/dynamic-labs/DynamicAuth/issues/3134) [#3152](https://github.com/dynamic-labs/DynamicAuth/issues/3152) [#3168](https://github.com/dynamic-labs/DynamicAuth/issues/3168)
|
|
75
|
+
* sign message for embedded wallet when auth mode is connect only ([#3195](https://github.com/dynamic-labs/DynamicAuth/issues/3195)) ([6cdee66](https://github.com/dynamic-labs/DynamicAuth/commit/6cdee661d45877c3d78744d115a675d114d62091))
|
|
76
|
+
* verify email OTP when email is updated ([#3168](https://github.com/dynamic-labs/DynamicAuth/issues/3168)) ([641eeb6](https://github.com/dynamic-labs/DynamicAuth/commit/641eeb685b0c9d77cc72912f29b137c699c192f0))
|
|
77
|
+
|
|
78
|
+
### [0.18.100-viem.12](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.11...v0.18.100-viem.12) (2023-08-30)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
### Features
|
|
82
|
+
|
|
83
|
+
* add deepLinkPreference prop ([#3174](https://github.com/dynamic-labs/DynamicAuth/issues/3174)) ([#3177](https://github.com/dynamic-labs/DynamicAuth/issues/3177)) ([d5a4052](https://github.com/dynamic-labs/DynamicAuth/commit/d5a4052ce6547289fff08ba57728af227d334dfa))
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
### Bug Fixes
|
|
87
|
+
|
|
88
|
+
* end connector session when unlinking from bridge ([#3120](https://github.com/dynamic-labs/DynamicAuth/issues/3120)) ([#3179](https://github.com/dynamic-labs/DynamicAuth/issues/3179)) ([d1f9898](https://github.com/dynamic-labs/DynamicAuth/commit/d1f9898fd678c9b342afe0dc1ea9ab21914c610f))
|
|
89
|
+
* **bridge:** update address when switching networks ([#3171](https://github.com/dynamic-labs/DynamicAuth/issues/3171)) ([#3181](https://github.com/dynamic-labs/DynamicAuth/issues/3181)) ([0e138e0](https://github.com/dynamic-labs/DynamicAuth/commit/0e138e0f824cda7e67f6ffce3057deb0a92ee7ae))
|
|
90
|
+
|
|
91
|
+
### [0.18.100-viem.11](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.10...v0.18.100-viem.11) (2023-08-29)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
### Bug Fixes
|
|
95
|
+
|
|
96
|
+
* **bridge:** connect L2 wallet after updating network ([#3164](https://github.com/dynamic-labs/DynamicAuth/issues/3164)) ([b775408](https://github.com/dynamic-labs/DynamicAuth/commit/b775408f98c1436383ae781dffb4a832f86a7d0d))
|
|
97
|
+
* resend magic OTP on back click ([#3123](https://github.com/dynamic-labs/DynamicAuth/issues/3123)) ([#3151](https://github.com/dynamic-labs/DynamicAuth/issues/3151)) ([eee2b0c](https://github.com/dynamic-labs/DynamicAuth/commit/eee2b0c0db0d9538b39c8e6ee76baf36c3479af5))
|
|
98
|
+
* **WagmiConnector:** sync wagmi with wallet connector events ([#3160](https://github.com/dynamic-labs/DynamicAuth/issues/3160)) ([5618903](https://github.com/dynamic-labs/DynamicAuth/commit/561890334f4ae28ffaf40f02d793da75865a0885)), closes [#3149](https://github.com/dynamic-labs/DynamicAuth/issues/3149)
|
|
99
|
+
|
|
100
|
+
### [0.18.100-viem.10](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.9...v0.18.100-viem.10) (2023-08-25)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
### Bug Fixes
|
|
104
|
+
|
|
105
|
+
* stop calling handleLogOut prematurely ([#3137](https://github.com/dynamic-labs/DynamicAuth/issues/3137)) ([3d029ba](https://github.com/dynamic-labs/DynamicAuth/commit/3d029ba3e34e3cb8a2b976dc5d3fb9ee1356d76c)), closes [#3135](https://github.com/dynamic-labs/DynamicAuth/issues/3135)
|
|
106
|
+
|
|
107
|
+
### [0.18.100-viem.9](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.8...v0.18.100-viem.9) (2023-08-25)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
### Features
|
|
111
|
+
|
|
112
|
+
* register connection of second wallet in bridge ([3e12cde](https://github.com/dynamic-labs/DynamicAuth/commit/3e12cdece4abd717280aeed442999aef4653e059)), closes [#3113](https://github.com/dynamic-labs/DynamicAuth/issues/3113)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
### Bug Fixes
|
|
116
|
+
|
|
117
|
+
* fix github social linking icon on dark mode ([#3130](https://github.com/dynamic-labs/DynamicAuth/issues/3130)) ([8db8aa7](https://github.com/dynamic-labs/DynamicAuth/commit/8db8aa7b9892f93f6fb6aa7772f99b747fe8f86b)), closes [#3126](https://github.com/dynamic-labs/DynamicAuth/issues/3126)
|
|
118
|
+
* fix issue with detecting oauth window closed before finishing linking ([#3128](https://github.com/dynamic-labs/DynamicAuth/issues/3128)) ([b108bf9](https://github.com/dynamic-labs/DynamicAuth/commit/b108bf9d9b3ca47202ca4a1993f155639fd032a8)), closes [#3124](https://github.com/dynamic-labs/DynamicAuth/issues/3124)
|
|
119
|
+
|
|
120
|
+
### [0.18.100-viem.8](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.7...v0.18.100-viem.8) (2023-08-24)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### Bug Fixes
|
|
124
|
+
|
|
125
|
+
* allow overriding contracts on wagmi chains ([#3105](https://github.com/dynamic-labs/DynamicAuth/issues/3105)) ([acee314](https://github.com/dynamic-labs/DynamicAuth/commit/acee3147156c30957bdb690c56cfd10af13dc57f))
|
|
126
|
+
* send wagmi settings only once when DynamicWagmiConnector loads (v18-viem) ([#3109](https://github.com/dynamic-labs/DynamicAuth/issues/3109)) ([a6e2675](https://github.com/dynamic-labs/DynamicAuth/commit/a6e2675c49eab3c40dc9365b20ac2dd9eaf8e4ae)), closes [#3103](https://github.com/dynamic-labs/DynamicAuth/issues/3103)
|
|
127
|
+
|
|
128
|
+
### [0.18.100-viem.7](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.6...v0.18.100-viem.7) (2023-08-23)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
### Bug Fixes
|
|
132
|
+
|
|
133
|
+
* fix jumping when entering OTP code on IOS ([#3036](https://github.com/dynamic-labs/DynamicAuth/issues/3036)) ([#3094](https://github.com/dynamic-labs/DynamicAuth/issues/3094)) ([093ab9a](https://github.com/dynamic-labs/DynamicAuth/commit/093ab9aae2f8bba99622e1146d1dc54c077ae3cb))
|
|
134
|
+
* log user out when magic session expires ([#3085](https://github.com/dynamic-labs/DynamicAuth/issues/3085)) ([#3088](https://github.com/dynamic-labs/DynamicAuth/issues/3088)) ([d7d125c](https://github.com/dynamic-labs/DynamicAuth/commit/d7d125c93a652f26deeedce534f1e0472ad3377c))
|
|
135
|
+
* improvements to network switching in bridge flow ([#3080](https://github.com/dynamic-labs/DynamicAuth/issues/3080)) ([4137c05](https://github.com/dynamic-labs/DynamicAuth/commit/4137c0599a760d2ec8a6b9a6a5de7cce9987033b))
|
|
136
|
+
* fix could not replace transaction error ([#3058](https://github.com/dynamic-labs/DynamicAuth/issues/3058)) ([b36184e](https://github.com/dynamic-labs/DynamicAuth/commit/b36184e17a268d49bed100e81477df9f5e4b3731)), closes [#3049](https://github.com/dynamic-labs/DynamicAuth/issues/3049)
|
|
137
|
+
* update embedded wallet notice design ([529f90f](https://github.com/dynamic-labs/DynamicAuth/commit/529f90f323f712240dfd964d908b6ea59cacbd19)), closes [#2987](https://github.com/dynamic-labs/DynamicAuth/issues/2987) [#3082](https://github.com/dynamic-labs/DynamicAuth/issues/3082)
|
|
138
|
+
|
|
139
|
+
### [0.18.100-viem.6](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.5...v0.18.100-viem.6) (2023-08-21)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
### Bug Fixes
|
|
143
|
+
|
|
144
|
+
* detect when user closes oauth window when linking social account ([#3066](https://github.com/dynamic-labs/DynamicAuth/issues/3066)) ([428e9e8](https://github.com/dynamic-labs/DynamicAuth/commit/428e9e81d5473b2de03560f118c61baf3ee9e692))
|
|
145
|
+
* sync connected wallets with wagmi client ([#3073](https://github.com/dynamic-labs/DynamicAuth/issues/3073)) ([bce960d](https://github.com/dynamic-labs/DynamicAuth/commit/bce960d341ff55d3d660a8c34121c4348ca2908b))
|
|
146
|
+
|
|
147
|
+
### [0.18.100-viem.5](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.4...v0.18.100-viem.5) (2023-08-19)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
### Bug Fixes
|
|
151
|
+
|
|
152
|
+
* ensure social sign in embedded wallets sync correctly with wagmi ([5fdf11d](https://github.com/dynamic-labs/DynamicAuth/commit/5fdf11df19759b6e32b461802c0a32686365d890))
|
|
153
|
+
|
|
154
|
+
### [0.18.100-viem.4](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.3...v0.18.100-viem.4) (2023-08-17)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### Bug Fixes
|
|
158
|
+
|
|
159
|
+
* always enable magic connectors when enabled ([#3014](https://github.com/dynamic-labs/DynamicAuth/issues/3014)) ([#3039](https://github.com/dynamic-labs/DynamicAuth/issues/3039)) ([6d4c473](https://github.com/dynamic-labs/DynamicAuth/commit/6d4c4738b92b40c903488c435fdd1bf69dc6c96e))
|
|
160
|
+
* guard against null or undefined provider value when logging in w… ([#3028](https://github.com/dynamic-labs/DynamicAuth/issues/3028)) ([050b62c](https://github.com/dynamic-labs/DynamicAuth/commit/050b62c7c91b6430eb350f7b49fa57260a08a756)), closes [#3021](https://github.com/dynamic-labs/DynamicAuth/issues/3021)
|
|
161
|
+
* issue where walletconnectors are instantiated without walletbook ([#3020](https://github.com/dynamic-labs/DynamicAuth/issues/3020)) ([#3033](https://github.com/dynamic-labs/DynamicAuth/issues/3033)) ([92394aa](https://github.com/dynamic-labs/DynamicAuth/commit/92394aa83cad497d805ac4d4ce8eb35d2b10690c))
|
|
162
|
+
* only use the production api environment of magicLink ([#3024](https://github.com/dynamic-labs/DynamicAuth/issues/3024)) ([25eea74](https://github.com/dynamic-labs/DynamicAuth/commit/25eea7438b0c2cb0279fb70d0be3c16f73b24573))
|
|
163
|
+
* switching network in connected state should update wallets to connect list ([#3038](https://github.com/dynamic-labs/DynamicAuth/issues/3038)) ([22837cb](https://github.com/dynamic-labs/DynamicAuth/commit/22837cb0af3a2dbdd7345b5cf92c23455bdd3cc4))
|
|
164
|
+
|
|
165
|
+
### [0.18.100-viem.3](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.2...v0.18.100-viem.3) (2023-08-16)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
### Bug Fixes
|
|
169
|
+
|
|
170
|
+
* fix twitter linking ([#2918](https://github.com/dynamic-labs/DynamicAuth/issues/2918)) ([#3003](https://github.com/dynamic-labs/DynamicAuth/issues/3003)) ([8f028dc](https://github.com/dynamic-labs/DynamicAuth/commit/8f028dc91434a44b4f2bcae82ad5f16a27c9e5b1))
|
|
171
|
+
* use ETH currency symbol for STARK chains ([#3005](https://github.com/dynamic-labs/DynamicAuth/issues/3005)) ([#3008](https://github.com/dynamic-labs/DynamicAuth/issues/3008)) ([6f0c66f](https://github.com/dynamic-labs/DynamicAuth/commit/6f0c66f63bbfdbb08d0c504d52565acd90070528))
|
|
172
|
+
|
|
2
173
|
### [0.18.100-viem.2](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.1...v0.18.100-viem.2) (2023-08-15)
|
|
3
174
|
|
|
4
175
|
|
package/package.cjs
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var version = "0.18.100-viem.
|
|
5
|
+
var version = "0.18.100-viem.20";
|
|
6
6
|
var dependencies = {
|
|
7
7
|
"react-focus-lock": "2.9.2",
|
|
8
|
-
"@dynamic-labs/iconic": "0.1.
|
|
9
|
-
"@dynamic-labs/sdk-api": "0.0.
|
|
8
|
+
"@dynamic-labs/iconic": "0.1.30",
|
|
9
|
+
"@dynamic-labs/sdk-api": "0.0.270",
|
|
10
10
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
11
11
|
"country-list": "2.3.0",
|
|
12
12
|
yup: "0.32.11",
|
package/package.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var version = "0.18.100-viem.
|
|
1
|
+
var version = "0.18.100-viem.20";
|
|
2
2
|
var dependencies = {
|
|
3
3
|
"react-focus-lock": "2.9.2",
|
|
4
|
-
"@dynamic-labs/iconic": "0.1.
|
|
5
|
-
"@dynamic-labs/sdk-api": "0.0.
|
|
4
|
+
"@dynamic-labs/iconic": "0.1.30",
|
|
5
|
+
"@dynamic-labs/sdk-api": "0.0.270",
|
|
6
6
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
7
7
|
"country-list": "2.3.0",
|
|
8
8
|
yup: "0.32.11",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "0.18.100-viem.
|
|
3
|
+
"version": "0.18.100-viem.20",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -8,20 +8,20 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"react-focus-lock": "2.9.2",
|
|
11
|
-
"@dynamic-labs/iconic": "0.1.
|
|
12
|
-
"@dynamic-labs/sdk-api": "0.0.
|
|
11
|
+
"@dynamic-labs/iconic": "0.1.30",
|
|
12
|
+
"@dynamic-labs/sdk-api": "0.0.270",
|
|
13
13
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
14
14
|
"country-list": "2.3.0",
|
|
15
15
|
"yup": "0.32.11",
|
|
16
16
|
"formik": "2.2.9",
|
|
17
17
|
"qrcode": "1.5.1",
|
|
18
|
-
"@dynamic-labs/logger": "0.18.100-viem.
|
|
19
|
-
"@dynamic-labs/multi-wallet": "0.18.100-viem.
|
|
20
|
-
"@dynamic-labs/rpc-providers": "0.18.100-viem.
|
|
21
|
-
"@dynamic-labs/types": "0.18.100-viem.
|
|
22
|
-
"@dynamic-labs/utils": "0.18.100-viem.
|
|
23
|
-
"@dynamic-labs/wallet-book": "0.18.100-viem.
|
|
24
|
-
"@dynamic-labs/wallet-connector-core": "0.18.100-viem.
|
|
18
|
+
"@dynamic-labs/logger": "0.18.100-viem.20",
|
|
19
|
+
"@dynamic-labs/multi-wallet": "0.18.100-viem.20",
|
|
20
|
+
"@dynamic-labs/rpc-providers": "0.18.100-viem.20",
|
|
21
|
+
"@dynamic-labs/types": "0.18.100-viem.20",
|
|
22
|
+
"@dynamic-labs/utils": "0.18.100-viem.20",
|
|
23
|
+
"@dynamic-labs/wallet-book": "0.18.100-viem.20",
|
|
24
|
+
"@dynamic-labs/wallet-connector-core": "0.18.100-viem.20",
|
|
25
25
|
"eventemitter3": "5.0.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
package/src/index.cjs
CHANGED
|
@@ -14,6 +14,7 @@ var DynamicNav = require('./lib/widgets/DynamicWidget/components/DynamicNav/Dyna
|
|
|
14
14
|
var DynamicUserProfile = require('./lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs');
|
|
15
15
|
var FundingWidget = require('./lib/widgets/FundingWidget/FundingWidget.cjs');
|
|
16
16
|
var DynamicBridgeWidget = require('./lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs');
|
|
17
|
+
var OAuthIFrameContainer = require('./lib/widgets/OAuthIFrameContainer/OAuthIFrameContainer.cjs');
|
|
17
18
|
require('react/jsx-runtime');
|
|
18
19
|
require('react');
|
|
19
20
|
var classNames = require('./lib/utils/functions/classNames/classNames.cjs');
|
|
@@ -135,8 +136,7 @@ var SendBalanceContext = require('./lib/context/SendBalanceContext/SendBalanceCo
|
|
|
135
136
|
|
|
136
137
|
|
|
137
138
|
exports.VERSION = version.VERSION;
|
|
138
|
-
exports.
|
|
139
|
-
exports.getNotInstalledWallets = data.getNotInstalledWallets;
|
|
139
|
+
exports.getWallets = data.getWallets;
|
|
140
140
|
exports.getAuthToken = getAuthToken.getAuthToken;
|
|
141
141
|
exports.DynamicContext = DynamicContext.DynamicContext;
|
|
142
142
|
exports.DynamicContextProvider = DynamicContext.DynamicContextProvider;
|
|
@@ -147,6 +147,7 @@ exports.DynamicNav = DynamicNav.ShadowedDynamicNav;
|
|
|
147
147
|
exports.DynamicUserProfile = DynamicUserProfile.ShadowedDynamicUserProfile;
|
|
148
148
|
exports.FundingWidget = FundingWidget.FundingWidget;
|
|
149
149
|
exports.DynamicBridgeWidget = DynamicBridgeWidget.DynamicBridgeWidget;
|
|
150
|
+
exports.OAuthIFrameContainer = OAuthIFrameContainer.OAuthIFrameContainer;
|
|
150
151
|
exports.classNames = classNames.classNames;
|
|
151
152
|
exports.decodeJwt = decodeJwt.decodeJwt;
|
|
152
153
|
exports.validateType = validateType.validateType;
|
package/src/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './polyfills';
|
|
2
2
|
export { VERSION } from './version';
|
|
3
|
-
export {
|
|
3
|
+
export { getWallets } from './lib/views/WalletList/data';
|
|
4
4
|
export { getAuthToken } from './lib/utils/functions/getAuthToken';
|
|
5
5
|
export { DynamicContextProvider, DynamicContext, } from './lib/context/DynamicContext';
|
|
6
6
|
export type { DynamicContextProps } from './lib/context/DynamicContext';
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './polyfills.js';
|
|
2
2
|
export { VERSION } from './version.js';
|
|
3
|
-
export {
|
|
3
|
+
export { getWallets } from './lib/views/WalletList/data.js';
|
|
4
4
|
export { getAuthToken } from './lib/utils/functions/getAuthToken/getAuthToken.js';
|
|
5
5
|
export { DynamicContext, DynamicContextProvider } from './lib/context/DynamicContext/DynamicContext.js';
|
|
6
6
|
export { useDynamicContext } from './lib/context/DynamicContext/useDynamicContext.js';
|
|
@@ -10,6 +10,7 @@ export { ShadowedDynamicNav as DynamicNav } from './lib/widgets/DynamicWidget/co
|
|
|
10
10
|
export { ShadowedDynamicUserProfile as DynamicUserProfile } from './lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js';
|
|
11
11
|
export { FundingWidget } from './lib/widgets/FundingWidget/FundingWidget.js';
|
|
12
12
|
export { DynamicBridgeWidget } from './lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js';
|
|
13
|
+
export { OAuthIFrameContainer } from './lib/widgets/OAuthIFrameContainer/OAuthIFrameContainer.js';
|
|
13
14
|
import 'react/jsx-runtime';
|
|
14
15
|
import 'react';
|
|
15
16
|
export { classNames } from './lib/utils/functions/classNames/classNames.js';
|
|
@@ -12,13 +12,13 @@ var watchToScrollInHierarchy = require('../utils/watchToScrollInHierarchy/watchT
|
|
|
12
12
|
require('../../../shared/logger.cjs');
|
|
13
13
|
require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
14
14
|
var index = require('../../../shared/utils/hooks/useOnClickOutside/index.cjs');
|
|
15
|
+
require('@dynamic-labs/utils');
|
|
15
16
|
var useForwardedRef = require('../../../shared/utils/hooks/useForwardedRef/useForwardedRef.cjs');
|
|
16
17
|
require('@dynamic-labs/sdk-api');
|
|
17
18
|
require('@dynamic-labs/iconic');
|
|
18
19
|
require('@dynamic-labs/wallet-connector-core');
|
|
19
20
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
20
21
|
require('@dynamic-labs/wallet-book');
|
|
21
|
-
require('@dynamic-labs/utils');
|
|
22
22
|
require('../../../utils/constants/colors.cjs');
|
|
23
23
|
require('viem');
|
|
24
24
|
require('../../../shared/consts/index.cjs');
|
|
@@ -8,13 +8,13 @@ import { watchToScrollInHierarchy } from '../utils/watchToScrollInHierarchy/watc
|
|
|
8
8
|
import '../../../shared/logger.js';
|
|
9
9
|
import '../../../shared/utils/classes/storage/localStorage.js';
|
|
10
10
|
import { useOnClickOutside } from '../../../shared/utils/hooks/useOnClickOutside/index.js';
|
|
11
|
+
import '@dynamic-labs/utils';
|
|
11
12
|
import { useForwardedRef } from '../../../shared/utils/hooks/useForwardedRef/useForwardedRef.js';
|
|
12
13
|
import '@dynamic-labs/sdk-api';
|
|
13
14
|
import '@dynamic-labs/iconic';
|
|
14
15
|
import '@dynamic-labs/wallet-connector-core';
|
|
15
16
|
import '../../../context/ViewContext/ViewContext.js';
|
|
16
17
|
import '@dynamic-labs/wallet-book';
|
|
17
|
-
import '@dynamic-labs/utils';
|
|
18
18
|
import '../../../utils/constants/colors.js';
|
|
19
19
|
import 'viem';
|
|
20
20
|
import '../../../shared/consts/index.js';
|
|
@@ -13,9 +13,13 @@ var VerticalDrawerTransition = require('../Transition/VerticalDrawerTransition/V
|
|
|
13
13
|
|
|
14
14
|
const typographyColor = {
|
|
15
15
|
error: 'error-1',
|
|
16
|
+
notice: 'brand-primary',
|
|
17
|
+
success: 'green-1',
|
|
16
18
|
};
|
|
17
|
-
const ModalHeaderBanner = ({ message, type = 'error', }) => (jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, { style: { width: '100%' } }), children: Boolean(message) && (jsxRuntime.jsx("div", { className: classNames.classNames('modal-header-banner', {
|
|
19
|
+
const ModalHeaderBanner = ({ message, type = 'error', disableTruncate = false, }) => (jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, { style: { width: '100%' } }), children: Boolean(message) && (jsxRuntime.jsx("div", { className: classNames.classNames('modal-header-banner', {
|
|
18
20
|
'modal-header-banner__error': type === 'error',
|
|
19
|
-
|
|
21
|
+
'modal-header-banner__notice': type === 'notice',
|
|
22
|
+
'modal-header-banner__success': type === 'success',
|
|
23
|
+
}), children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: typographyColor[type], truncate: disableTruncate === false, children: message }) })) }));
|
|
20
24
|
|
|
21
25
|
exports.ModalHeaderBanner = ModalHeaderBanner;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
type ModalHeaderBannerType = 'error';
|
|
2
|
+
type ModalHeaderBannerType = 'error' | 'success' | 'notice';
|
|
3
3
|
export type ModalHeaderBannerProps = {
|
|
4
4
|
message?: string;
|
|
5
5
|
type?: ModalHeaderBannerType;
|
|
6
|
+
disableTruncate?: boolean;
|
|
6
7
|
};
|
|
7
8
|
export declare const ModalHeaderBanner: FC<ModalHeaderBannerProps>;
|
|
8
9
|
export {};
|
|
@@ -9,9 +9,13 @@ import { VerticalDrawerTransition } from '../Transition/VerticalDrawerTransition
|
|
|
9
9
|
|
|
10
10
|
const typographyColor = {
|
|
11
11
|
error: 'error-1',
|
|
12
|
+
notice: 'brand-primary',
|
|
13
|
+
success: 'green-1',
|
|
12
14
|
};
|
|
13
|
-
const ModalHeaderBanner = ({ message, type = 'error', }) => (jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, { style: { width: '100%' } }), children: Boolean(message) && (jsx("div", { className: classNames('modal-header-banner', {
|
|
15
|
+
const ModalHeaderBanner = ({ message, type = 'error', disableTruncate = false, }) => (jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, { style: { width: '100%' } }), children: Boolean(message) && (jsx("div", { className: classNames('modal-header-banner', {
|
|
14
16
|
'modal-header-banner__error': type === 'error',
|
|
15
|
-
|
|
17
|
+
'modal-header-banner__notice': type === 'notice',
|
|
18
|
+
'modal-header-banner__success': type === 'success',
|
|
19
|
+
}), children: jsx(Typography, { variant: 'body_small', color: typographyColor[type], truncate: disableTruncate === false, children: message }) })) }));
|
|
16
20
|
|
|
17
21
|
export { ModalHeaderBanner };
|
|
@@ -55,10 +55,10 @@ require('yup');
|
|
|
55
55
|
require('../InlineWidget/InlineWidget.cjs');
|
|
56
56
|
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
57
57
|
|
|
58
|
-
const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, onClickClose, displayPoweredByDynamic = false, }) => {
|
|
58
|
+
const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, onClickClose, displayPoweredByDynamic = false, successBannerText, }) => {
|
|
59
59
|
const backButton = onClickBack && (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: onClickBack, "data-testid": 'back-button', children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }));
|
|
60
60
|
const closeButton = (jsxRuntime.jsx(IconButton.IconButton, { onClick: onClickClose, type: 'button', "data-testid": 'close-button', children: jsxRuntime.jsx(close.ReactComponent, {}) }));
|
|
61
|
-
return (jsxRuntime.jsxs("div", { className: 'otp-verification-view', children: [jsxRuntime.jsx(ModalHeaderBanner.ModalHeaderBanner, { type: 'error', message: error === null || error === void 0 ? void 0 : error.message }), jsxRuntime.jsx(ModalHeader.ModalHeader, { alignContent: 'bottom', leading: onClickBack && backButton, trailing: onClickClose && closeButton, children: jsxRuntime.jsxs("div", { className: 'otp-verification-view__status-header', children: [isValid && (jsxRuntime.jsx(IconWithStatus.IconWithStatus, { Icon: iconic.SignInWithEmailIcon, iconSize: 50, InnerIcon: check.ReactComponent })), !isValid && (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: iconic.SignInWithEmailIcon, iconSize: 80, isSpinning: isLoading }))] }) }), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'otp-verification-view__title', children: isValid ? 'Verification code confirmed' : 'Confirm verification code' }), jsxRuntime.jsxs("div", { className: 'otp-verification-view__body', children: [isValid && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "Hang tight while we get things ready for you" })), !isValid && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "We\u2019ve sent a verification code to" }), jsxRuntime.jsxs("div", { className: 'otp-verification-view__email-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: shortenEmail.shortenEmail(email) }), onClickEditEmail && (jsxRuntime.jsx(IconButton.IconButton, { onClick: onClickEditEmail, "data-testid": 'otp-verification-view__edit-button', children: jsxRuntime.jsx(Icon.Icon, { color: 'text-tertiary', children: jsxRuntime.jsx(pencilAltIcon.ReactComponent, {}) }) }))] })] }))] }), jsxRuntime.jsx(PinField.PinField, { initialValue: Array(6).join('.').split('.'), isLoading: isLoading, handleComplete: onPinComplete, isValidated: isValid, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: onPinChange }), jsxRuntime.jsx("div", { className: 'otp-verification-view__footer', children: displayPoweredByDynamic && jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, {}) })] }));
|
|
61
|
+
return (jsxRuntime.jsxs("div", { className: 'otp-verification-view', children: [successBannerText && (jsxRuntime.jsx(ModalHeaderBanner.ModalHeaderBanner, { type: 'notice', message: successBannerText, disableTruncate: true })), jsxRuntime.jsx(ModalHeaderBanner.ModalHeaderBanner, { type: 'error', message: error === null || error === void 0 ? void 0 : error.message }), jsxRuntime.jsx(ModalHeader.ModalHeader, { alignContent: 'bottom', leading: onClickBack && backButton, trailing: onClickClose && closeButton, children: jsxRuntime.jsxs("div", { className: 'otp-verification-view__status-header', children: [isValid && (jsxRuntime.jsx(IconWithStatus.IconWithStatus, { Icon: iconic.SignInWithEmailIcon, iconSize: 50, InnerIcon: check.ReactComponent })), !isValid && (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: iconic.SignInWithEmailIcon, iconSize: 80, isSpinning: isLoading }))] }) }), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'otp-verification-view__title', children: isValid ? 'Verification code confirmed' : 'Confirm verification code' }), jsxRuntime.jsxs("div", { className: 'otp-verification-view__body', children: [isValid && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "Hang tight while we get things ready for you" })), !isValid && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "We\u2019ve sent a verification code to" }), jsxRuntime.jsxs("div", { className: 'otp-verification-view__email-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: shortenEmail.shortenEmail(email) }), onClickEditEmail && (jsxRuntime.jsx(IconButton.IconButton, { onClick: onClickEditEmail, "data-testid": 'otp-verification-view__edit-button', children: jsxRuntime.jsx(Icon.Icon, { color: 'text-tertiary', children: jsxRuntime.jsx(pencilAltIcon.ReactComponent, {}) }) }))] })] }))] }), jsxRuntime.jsx(PinField.PinField, { initialValue: Array(6).join('.').split('.'), isLoading: isLoading, handleComplete: onPinComplete, isValidated: isValid, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: onPinChange }), jsxRuntime.jsx("div", { className: 'otp-verification-view__footer', children: displayPoweredByDynamic && jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, {}) })] }));
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
exports.OTPVerificationView = OTPVerificationView;
|
|
@@ -10,6 +10,7 @@ type OtpVerificationLayoutProps = {
|
|
|
10
10
|
onClickEditEmail?: MouseEventHandler<HTMLButtonElement>;
|
|
11
11
|
onPinChange?: (value: string) => void;
|
|
12
12
|
onPinComplete: (value: string) => void;
|
|
13
|
+
successBannerText?: string;
|
|
13
14
|
};
|
|
14
15
|
export declare const OTPVerificationView: FC<OtpVerificationLayoutProps>;
|
|
15
16
|
export {};
|
|
@@ -51,10 +51,10 @@ import 'yup';
|
|
|
51
51
|
import '../InlineWidget/InlineWidget.js';
|
|
52
52
|
import '../MenuList/Dropdown/Dropdown.js';
|
|
53
53
|
|
|
54
|
-
const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, onClickClose, displayPoweredByDynamic = false, }) => {
|
|
54
|
+
const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, onClickClose, displayPoweredByDynamic = false, successBannerText, }) => {
|
|
55
55
|
const backButton = onClickBack && (jsx(IconButton, { type: 'button', onClick: onClickBack, "data-testid": 'back-button', children: jsx(SvgChevronLeft, {}) }));
|
|
56
56
|
const closeButton = (jsx(IconButton, { onClick: onClickClose, type: 'button', "data-testid": 'close-button', children: jsx(SvgClose, {}) }));
|
|
57
|
-
return (jsxs("div", { className: 'otp-verification-view', children: [jsx(ModalHeaderBanner, { type: 'error', message: error === null || error === void 0 ? void 0 : error.message }), jsx(ModalHeader, { alignContent: 'bottom', leading: onClickBack && backButton, trailing: onClickClose && closeButton, children: jsxs("div", { className: 'otp-verification-view__status-header', children: [isValid && (jsx(IconWithStatus, { Icon: SignInWithEmailIcon, iconSize: 50, InnerIcon: SvgCheck })), !isValid && (jsx(IconWithSpinner, { Icon: SignInWithEmailIcon, iconSize: 80, isSpinning: isLoading }))] }) }), jsx(Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'otp-verification-view__title', children: isValid ? 'Verification code confirmed' : 'Confirm verification code' }), jsxs("div", { className: 'otp-verification-view__body', children: [isValid && (jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "Hang tight while we get things ready for you" })), !isValid && (jsxs(Fragment, { children: [jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "We\u2019ve sent a verification code to" }), jsxs("div", { className: 'otp-verification-view__email-container', children: [jsx(Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: shortenEmail(email) }), onClickEditEmail && (jsx(IconButton, { onClick: onClickEditEmail, "data-testid": 'otp-verification-view__edit-button', children: jsx(Icon, { color: 'text-tertiary', children: jsx(SvgPencilAltIcon, {}) }) }))] })] }))] }), jsx(PinField, { initialValue: Array(6).join('.').split('.'), isLoading: isLoading, handleComplete: onPinComplete, isValidated: isValid, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: onPinChange }), jsx("div", { className: 'otp-verification-view__footer', children: displayPoweredByDynamic && jsx(PoweredByDynamic, {}) })] }));
|
|
57
|
+
return (jsxs("div", { className: 'otp-verification-view', children: [successBannerText && (jsx(ModalHeaderBanner, { type: 'notice', message: successBannerText, disableTruncate: true })), jsx(ModalHeaderBanner, { type: 'error', message: error === null || error === void 0 ? void 0 : error.message }), jsx(ModalHeader, { alignContent: 'bottom', leading: onClickBack && backButton, trailing: onClickClose && closeButton, children: jsxs("div", { className: 'otp-verification-view__status-header', children: [isValid && (jsx(IconWithStatus, { Icon: SignInWithEmailIcon, iconSize: 50, InnerIcon: SvgCheck })), !isValid && (jsx(IconWithSpinner, { Icon: SignInWithEmailIcon, iconSize: 80, isSpinning: isLoading }))] }) }), jsx(Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'otp-verification-view__title', children: isValid ? 'Verification code confirmed' : 'Confirm verification code' }), jsxs("div", { className: 'otp-verification-view__body', children: [isValid && (jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "Hang tight while we get things ready for you" })), !isValid && (jsxs(Fragment, { children: [jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "We\u2019ve sent a verification code to" }), jsxs("div", { className: 'otp-verification-view__email-container', children: [jsx(Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: shortenEmail(email) }), onClickEditEmail && (jsx(IconButton, { onClick: onClickEditEmail, "data-testid": 'otp-verification-view__edit-button', children: jsx(Icon, { color: 'text-tertiary', children: jsx(SvgPencilAltIcon, {}) }) }))] })] }))] }), jsx(PinField, { initialValue: Array(6).join('.').split('.'), isLoading: isLoading, handleComplete: onPinComplete, isValidated: isValid, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: onPinChange }), jsx("div", { className: 'otp-verification-view__footer', children: displayPoweredByDynamic && jsx(PoweredByDynamic, {}) })] }));
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
export { OTPVerificationView };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var Typography = require('../Typography/Typography.cjs');
|
|
8
|
+
var isSignTypedData = require('./utils/isSignTypedData/isSignTypedData.cjs');
|
|
9
|
+
var SignTypedDataPreview = require('./components/SignTypedDataPreview/SignTypedDataPreview.cjs');
|
|
10
|
+
|
|
11
|
+
const SignMessagePreview = ({ message, }) => {
|
|
12
|
+
const signTypedData = React.useMemo(() => {
|
|
13
|
+
try {
|
|
14
|
+
const json = JSON.parse(message);
|
|
15
|
+
return isSignTypedData.isSignTypedData(json) ? json : undefined;
|
|
16
|
+
}
|
|
17
|
+
catch (e) {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
}, [message]);
|
|
21
|
+
if (signTypedData) {
|
|
22
|
+
return (jsxRuntime.jsx(SignTypedDataPreview.SignTypedDataPreview, { currentType: signTypedData.primaryType, types: signTypedData.types, showTypeName: true, data: signTypedData.message }));
|
|
23
|
+
}
|
|
24
|
+
return (jsxRuntime.jsx(Typography.Typography, { color: 'primary', variant: 'body_normal', children: jsxRuntime.jsx("span", { style: { whiteSpace: 'pre-line' }, dangerouslySetInnerHTML: { __html: message } }) }));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.SignMessagePreview = SignMessagePreview;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { Typography } from '../Typography/Typography.js';
|
|
4
|
+
import { isSignTypedData } from './utils/isSignTypedData/isSignTypedData.js';
|
|
5
|
+
import { SignTypedDataPreview } from './components/SignTypedDataPreview/SignTypedDataPreview.js';
|
|
6
|
+
|
|
7
|
+
const SignMessagePreview = ({ message, }) => {
|
|
8
|
+
const signTypedData = useMemo(() => {
|
|
9
|
+
try {
|
|
10
|
+
const json = JSON.parse(message);
|
|
11
|
+
return isSignTypedData(json) ? json : undefined;
|
|
12
|
+
}
|
|
13
|
+
catch (e) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
}, [message]);
|
|
17
|
+
if (signTypedData) {
|
|
18
|
+
return (jsx(SignTypedDataPreview, { currentType: signTypedData.primaryType, types: signTypedData.types, showTypeName: true, data: signTypedData.message }));
|
|
19
|
+
}
|
|
20
|
+
return (jsx(Typography, { color: 'primary', variant: 'body_normal', children: jsx("span", { style: { whiteSpace: 'pre-line' }, dangerouslySetInnerHTML: { __html: message } }) }));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { SignMessagePreview };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var Typography = require('../../../Typography/Typography.cjs');
|
|
7
|
+
var capitalize = require('../../../../shared/utils/functions/capitalize/capitalize.cjs');
|
|
8
|
+
require('@dynamic-labs/sdk-api');
|
|
9
|
+
require('../../../../shared/logger.cjs');
|
|
10
|
+
require('@dynamic-labs/iconic');
|
|
11
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
12
|
+
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
13
|
+
require('react');
|
|
14
|
+
require('@dynamic-labs/wallet-book');
|
|
15
|
+
var shortenWalletAddress = require('../../../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
|
|
16
|
+
require('@dynamic-labs/utils');
|
|
17
|
+
require('../../../../utils/constants/colors.cjs');
|
|
18
|
+
require('../../../../shared/utils/classes/storage/localStorage.cjs');
|
|
19
|
+
require('viem');
|
|
20
|
+
require('../../../../shared/consts/index.cjs');
|
|
21
|
+
|
|
22
|
+
const TypeTitle = ({ children }) => (jsxRuntime.jsx(Typography.Typography, { color: 'secondary', weight: 'medium', children: children }));
|
|
23
|
+
const AttributeName = TypeTitle;
|
|
24
|
+
const AttributeValue = ({ children, title, }) => (jsxRuntime.jsx(Typography.Typography, { as: 'span', weight: 'regular', color: 'primary', title: title, children: children }));
|
|
25
|
+
const SignTypedDataPreview = ({ currentType, types, showTypeName = false, data }) => {
|
|
26
|
+
const fields = types[currentType].map((field) => {
|
|
27
|
+
const { type } = field;
|
|
28
|
+
const isKnownType = type in types;
|
|
29
|
+
if (isKnownType) {
|
|
30
|
+
return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(TypeTitle, { children: capitalize.capitalize(field.name) }), jsxRuntime.jsx("div", { className: 'sign-typed-data-preview--type-container', children: jsxRuntime.jsx(SignTypedDataPreview, { currentType: type, types: types, data: data === null || data === void 0 ? void 0 : data[field.name] }) })] }, field.name));
|
|
31
|
+
}
|
|
32
|
+
const fieldData = data === null || data === void 0 ? void 0 : data[field.name];
|
|
33
|
+
const fieldType = field.type;
|
|
34
|
+
return (jsxRuntime.jsxs("div", { className: 'sign-typed-data-preview--attribute-row', children: [jsxRuntime.jsxs(AttributeName, { children: [capitalize.capitalize(field.name), ": "] }), jsxRuntime.jsx(AttributeValue, { title: fieldData, children: fieldType === 'address'
|
|
35
|
+
? shortenWalletAddress.shortenWalletAddress(fieldData, 4, 4)
|
|
36
|
+
: fieldData })] }, field.name));
|
|
37
|
+
});
|
|
38
|
+
if (showTypeName) {
|
|
39
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(TypeTitle, { children: currentType }), jsxRuntime.jsx("div", { className: 'sign-typed-data-preview--type-container', children: fields })] }));
|
|
40
|
+
}
|
|
41
|
+
return jsxRuntime.jsx("div", { className: 'sign-typed-data-preview--fields-list', children: fields });
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
exports.SignTypedDataPreview = SignTypedDataPreview;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { Typography } from '../../../Typography/Typography.js';
|
|
3
|
+
import { capitalize } from '../../../../shared/utils/functions/capitalize/capitalize.js';
|
|
4
|
+
import '@dynamic-labs/sdk-api';
|
|
5
|
+
import '../../../../shared/logger.js';
|
|
6
|
+
import '@dynamic-labs/iconic';
|
|
7
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
8
|
+
import '../../../../context/ViewContext/ViewContext.js';
|
|
9
|
+
import 'react';
|
|
10
|
+
import '@dynamic-labs/wallet-book';
|
|
11
|
+
import { shortenWalletAddress } from '../../../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js';
|
|
12
|
+
import '@dynamic-labs/utils';
|
|
13
|
+
import '../../../../utils/constants/colors.js';
|
|
14
|
+
import '../../../../shared/utils/classes/storage/localStorage.js';
|
|
15
|
+
import 'viem';
|
|
16
|
+
import '../../../../shared/consts/index.js';
|
|
17
|
+
|
|
18
|
+
const TypeTitle = ({ children }) => (jsx(Typography, { color: 'secondary', weight: 'medium', children: children }));
|
|
19
|
+
const AttributeName = TypeTitle;
|
|
20
|
+
const AttributeValue = ({ children, title, }) => (jsx(Typography, { as: 'span', weight: 'regular', color: 'primary', title: title, children: children }));
|
|
21
|
+
const SignTypedDataPreview = ({ currentType, types, showTypeName = false, data }) => {
|
|
22
|
+
const fields = types[currentType].map((field) => {
|
|
23
|
+
const { type } = field;
|
|
24
|
+
const isKnownType = type in types;
|
|
25
|
+
if (isKnownType) {
|
|
26
|
+
return (jsxs("div", { children: [jsx(TypeTitle, { children: capitalize(field.name) }), jsx("div", { className: 'sign-typed-data-preview--type-container', children: jsx(SignTypedDataPreview, { currentType: type, types: types, data: data === null || data === void 0 ? void 0 : data[field.name] }) })] }, field.name));
|
|
27
|
+
}
|
|
28
|
+
const fieldData = data === null || data === void 0 ? void 0 : data[field.name];
|
|
29
|
+
const fieldType = field.type;
|
|
30
|
+
return (jsxs("div", { className: 'sign-typed-data-preview--attribute-row', children: [jsxs(AttributeName, { children: [capitalize(field.name), ": "] }), jsx(AttributeValue, { title: fieldData, children: fieldType === 'address'
|
|
31
|
+
? shortenWalletAddress(fieldData, 4, 4)
|
|
32
|
+
: fieldData })] }, field.name));
|
|
33
|
+
});
|
|
34
|
+
if (showTypeName) {
|
|
35
|
+
return (jsxs(Fragment, { children: [jsx(TypeTitle, { children: currentType }), jsx("div", { className: 'sign-typed-data-preview--type-container', children: fields })] }));
|
|
36
|
+
}
|
|
37
|
+
return jsx("div", { className: 'sign-typed-data-preview--fields-list', children: fields });
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { SignTypedDataPreview };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SignTypedDataPreview } from './SignTypedDataPreview';
|