@daimo/pay 1.16.1 → 1.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.d.ts +7 -5
- package/build/package.json.js +2 -2
- package/build/src/components/Common/OrderHeader/index.js +8 -9
- package/build/src/components/Common/OrderHeader/index.js.map +1 -1
- package/build/src/components/Common/SelectAnotherMethodButton/index.js +15 -3
- package/build/src/components/Common/SelectAnotherMethodButton/index.js.map +1 -1
- package/build/src/components/DaimoPayButton/index.js +2 -1
- package/build/src/components/DaimoPayButton/index.js.map +1 -1
- package/build/src/components/DaimoPayModal/index.js +13 -3
- package/build/src/components/DaimoPayModal/index.js.map +1 -1
- package/build/src/components/Pages/SelectDepositAddressChain/index.js +1 -1
- package/build/src/components/Pages/SelectDepositAddressChain/index.js.map +1 -1
- package/build/src/components/Pages/SelectExchange/index.js +2 -2
- package/build/src/components/Pages/SelectExchange/index.js.map +1 -1
- package/build/src/components/Pages/SelectMethod/index.js +0 -1
- package/build/src/components/Pages/SelectMethod/index.js.map +1 -1
- package/build/src/components/Pages/SelectToken/index.js +2 -2
- package/build/src/components/Pages/SelectToken/index.js.map +1 -1
- package/build/src/components/Pages/SelectZKP/index.js +2 -2
- package/build/src/components/Pages/SelectZKP/index.js.map +1 -1
- package/build/src/hooks/usePaymentState.js.map +1 -1
- package/build/src/hooks/useTokenOptions.js +2 -2
- package/build/src/hooks/useTokenOptions.js.map +1 -1
- package/build/src/payment/paymentFsm.js.map +1 -1
- package/build/src/world-mini-app/WorldPayButton.js +7 -2
- package/build/src/world-mini-app/WorldPayButton.js.map +1 -1
- package/build/world.d.ts +3 -0
- package/package.json +3 -3
- package/build/assets/MobileWithLogos.d.ts +0 -2
- package/build/assets/ScanIconWithLogos.d.ts +0 -6
- package/build/assets/browsers.d.ts +0 -10
- package/build/assets/chains.d.ts +0 -28
- package/build/assets/coins.d.ts +0 -2
- package/build/assets/crepe.d.ts +0 -3
- package/build/assets/icons.d.ts +0 -35
- package/build/assets/logos.d.ts +0 -207
- package/build/assets/wallet.d.ts +0 -3
- package/build/assets/wave.d.ts +0 -2
- package/build/components/Common/Alert/index.d.ts +0 -6
- package/build/components/Common/Alert/styles.d.ts +0 -2
- package/build/components/Common/Alert/types.d.ts +0 -5
- package/build/components/Common/AmountInput/AmountInputField.d.ts +0 -8
- package/build/components/Common/AmountInput/index.d.ts +0 -9
- package/build/components/Common/Avatar/index.d.ts +0 -17
- package/build/components/Common/Avatar/styles.d.ts +0 -2
- package/build/components/Common/BrowserIcon/index.d.ts +0 -4
- package/build/components/Common/BrowserIcon/styles.d.ts +0 -1
- package/build/components/Common/BrowserIcon/types.d.ts +0 -3
- package/build/components/Common/Button/index.d.ts +0 -4
- package/build/components/Common/Button/styles.d.ts +0 -10
- package/build/components/Common/Button/types.d.ts +0 -15
- package/build/components/Common/Chain/index.d.ts +0 -9
- package/build/components/Common/Chain/styles.d.ts +0 -4
- package/build/components/Common/ChainSelectList/index.d.ts +0 -4
- package/build/components/Common/ChainSelectList/styles.d.ts +0 -9
- package/build/components/Common/CircleTimer.d.ts +0 -17
- package/build/components/Common/ConnectorList/index.d.ts +0 -2
- package/build/components/Common/ConnectorList/styles.d.ts +0 -8
- package/build/components/Common/CopyToClipboard/CopyToClipboardIcon.d.ts +0 -6
- package/build/components/Common/CopyToClipboard/index.d.ts +0 -7
- package/build/components/Common/CustomQRCode/QRCode.d.ts +0 -12
- package/build/components/Common/CustomQRCode/index.d.ts +0 -6
- package/build/components/Common/CustomQRCode/styles.d.ts +0 -6
- package/build/components/Common/CustomQRCode/types.d.ts +0 -11
- package/build/components/Common/DynamicContainer/index.d.ts +0 -7
- package/build/components/Common/FitText/index.d.ts +0 -8
- package/build/components/Common/LazyImage/index.d.ts +0 -8
- package/build/components/Common/Logo/index.d.ts +0 -8
- package/build/components/Common/Logo/styles.d.ts +0 -3
- package/build/components/Common/Modal/index.d.ts +0 -25
- package/build/components/Common/Modal/styles.d.ts +0 -25
- package/build/components/Common/OptionsList/index.d.ts +0 -17
- package/build/components/Common/OptionsList/styles.d.ts +0 -5
- package/build/components/Common/OrderHeader/index.d.ts +0 -5
- package/build/components/Common/PaymentBreakdown/index.d.ts +0 -6
- package/build/components/Common/Portal/index.d.ts +0 -2
- package/build/components/Common/PoweredByFooter/index.d.ts +0 -5
- package/build/components/Common/ScrollArea/index.d.ts +0 -9
- package/build/components/Common/ScrollArea/styles.d.ts +0 -3
- package/build/components/Common/SelectAnotherMethodButton/index.d.ts +0 -1
- package/build/components/Common/Spinner/index.d.ts +0 -1
- package/build/components/Common/Spinner/styles.d.ts +0 -1
- package/build/components/Common/SquareTimer.d.ts +0 -19
- package/build/components/Common/SwitchButton/index.d.ts +0 -6
- package/build/components/Common/ThemedButton/index.d.ts +0 -15
- package/build/components/Common/ThemedButton/styles.d.ts +0 -2
- package/build/components/Common/TokenChainLogo/index.d.ts +0 -7
- package/build/components/Common/Tooltip/index.d.ts +0 -4
- package/build/components/Common/Tooltip/styles.d.ts +0 -3
- package/build/components/Common/Tooltip/types.d.ts +0 -9
- package/build/components/Common/WalletChainLogo/index.d.ts +0 -6
- package/build/components/DaimoPayButton/index.d.ts +0 -149
- package/build/components/DaimoPayButton/styles.d.ts +0 -4
- package/build/components/DaimoPayModal/ConnectUsing.d.ts +0 -2
- package/build/components/DaimoPayModal/ConnectWithInjector/index.d.ts +0 -15
- package/build/components/DaimoPayModal/ConnectWithInjector/styles.d.ts +0 -6
- package/build/components/DaimoPayModal/ConnectWithQRCode.d.ts +0 -12
- package/build/components/DaimoPayModal/index.d.ts +0 -8
- package/build/components/DaimoPayThemeProvider/DaimoPayThemeProvider.d.ts +0 -16
- package/build/components/Pages/About/graphics.d.ts +0 -11
- package/build/components/Pages/About/index.d.ts +0 -3
- package/build/components/Pages/About/styles.d.ts +0 -8
- package/build/components/Pages/Confirmation/index.d.ts +0 -3
- package/build/components/Pages/Connectors/index.d.ts +0 -3
- package/build/components/Pages/Connectors/styles.d.ts +0 -9
- package/build/components/Pages/DownloadApp/index.d.ts +0 -2
- package/build/components/Pages/Error/index.d.ts +0 -1
- package/build/components/Pages/MobileConnectors/index.d.ts +0 -3
- package/build/components/Pages/MobileConnectors/styles.d.ts +0 -5
- package/build/components/Pages/Onboarding/index.d.ts +0 -3
- package/build/components/Pages/Onboarding/styles.d.ts +0 -9
- package/build/components/Pages/PayWithToken/index.d.ts +0 -3
- package/build/components/Pages/SelectAmount/index.d.ts +0 -3
- package/build/components/Pages/SelectDepositAddressAmount/index.d.ts +0 -3
- package/build/components/Pages/SelectDepositAddressChain/index.d.ts +0 -3
- package/build/components/Pages/SelectExchange/index.d.ts +0 -3
- package/build/components/Pages/SelectExternalAmount/index.d.ts +0 -3
- package/build/components/Pages/SelectMethod/index.d.ts +0 -1
- package/build/components/Pages/SelectMethod/styles.d.ts +0 -9
- package/build/components/Pages/SelectToken/index.d.ts +0 -1
- package/build/components/Pages/SelectWalletAmount/index.d.ts +0 -3
- package/build/components/Pages/SelectWalletChain/index.d.ts +0 -3
- package/build/components/Pages/SelectZKP/index.d.ts +0 -3
- package/build/components/Pages/Solana/ConnectorSolana/index.d.ts +0 -4
- package/build/components/Pages/Solana/PayWithSolanaToken/index.d.ts +0 -3
- package/build/components/Pages/Solana/SelectSolanaAmount/index.d.ts +0 -3
- package/build/components/Pages/SwitchNetworks/index.d.ts +0 -3
- package/build/components/Pages/WaitingDepositAddress/index.d.ts +0 -1
- package/build/components/Pages/WaitingExternal/index.d.ts +0 -3
- package/build/components/Pages/WaitingWallet/index.d.ts +0 -3
- package/build/components/Spinners/CircleSpinner/index.d.ts +0 -9
- package/build/components/Spinners/CircleSpinner/styles.d.ts +0 -5
- package/build/components/Spinners/ExternalPaymentSpinner/index.d.ts +0 -5
- package/build/components/Spinners/SquircleSpinner/index.d.ts +0 -5
- package/build/components/Spinners/SquircleSpinner/styles.d.ts +0 -4
- package/build/components/Spinners/TokenLogoSpinner/index.d.ts +0 -5
- package/build/components/Spinners/TokenLogoSpinner/styles.d.ts +0 -1
- package/build/components/Spinners/WalletPaymentSpinner/index.d.ts +0 -5
- package/build/components/Spinners/styles.d.ts +0 -2
- package/build/constants/defaultTheme.d.ts +0 -4
- package/build/constants/routes.d.ts +0 -28
- package/build/defaultConfig.d.ts +0 -17
- package/build/defaultConnectors.d.ts +0 -14
- package/build/hooks/useChainIsSupported.d.ts +0 -2
- package/build/hooks/useChains.d.ts +0 -3
- package/build/hooks/useConnect.d.ts +0 -110
- package/build/hooks/useConnectCallback.d.ts +0 -8
- package/build/hooks/useConnectors.d.ts +0 -3
- package/build/hooks/useDaimoPay.d.ts +0 -94
- package/build/hooks/useDaimoPayStatus.d.ts +0 -15
- package/build/hooks/useDaimoPayUI.d.ts +0 -6
- package/build/hooks/useDepositAddressOptions.d.ts +0 -10
- package/build/hooks/useEnsFallbackConfig.d.ts +0 -2
- package/build/hooks/useExternalPaymentOptions.d.ts +0 -12
- package/build/hooks/useFitText.d.ts +0 -14
- package/build/hooks/useFocusTrap.d.ts +0 -1
- package/build/hooks/useGoogleFont.d.ts +0 -3
- package/build/hooks/useIsMobile.d.ts +0 -5
- package/build/hooks/useIsMounted.d.ts +0 -3
- package/build/hooks/useLastConnector.d.ts +0 -4
- package/build/hooks/useLocalStorage.d.ts +0 -7
- package/build/hooks/useLocales.d.ts +0 -2
- package/build/hooks/useLockBodyScroll.d.ts +0 -1
- package/build/hooks/useModal.d.ts +0 -8
- package/build/hooks/useOrderUsdLimits.d.ts +0 -7
- package/build/hooks/usePayContext.d.ts +0 -2
- package/build/hooks/usePaymentState.d.ts +0 -67
- package/build/hooks/usePrevious.d.ts +0 -1
- package/build/hooks/useSolanaPaymentOptions.d.ts +0 -13
- package/build/hooks/useTokenOptions.d.ts +0 -5
- package/build/hooks/useUntronAvailability.d.ts +0 -14
- package/build/hooks/useWalletPaymentOptions.d.ts +0 -31
- package/build/hooks/useWindowSize.d.ts +0 -4
- package/build/localizations/index.d.ts +0 -2
- package/build/localizations/locales/ar-AE.d.ts +0 -3
- package/build/localizations/locales/ca-AD.d.ts +0 -3
- package/build/localizations/locales/ee-EE.d.ts +0 -3
- package/build/localizations/locales/en-US.d.ts +0 -128
- package/build/localizations/locales/es-ES.d.ts +0 -3
- package/build/localizations/locales/fa-IR.d.ts +0 -3
- package/build/localizations/locales/fr-FR.d.ts +0 -3
- package/build/localizations/locales/index.d.ts +0 -3
- package/build/localizations/locales/ja-JP.d.ts +0 -91
- package/build/localizations/locales/pt-BR.d.ts +0 -3
- package/build/localizations/locales/ru-RU.d.ts +0 -3
- package/build/localizations/locales/tr-TR.d.ts +0 -3
- package/build/localizations/locales/vi-VN.d.ts +0 -3
- package/build/localizations/locales/zh-CN.d.ts +0 -3
- package/build/payment/paymentEffects.d.ts +0 -12
- package/build/payment/paymentFsm.d.ts +0 -131
- package/build/payment/paymentStore.d.ts +0 -14
- package/build/payment/paymentUtils.d.ts +0 -6
- package/build/provider/DaimoPayProvider.d.ts +0 -24
- package/build/provider/PayContext.d.ts +0 -66
- package/build/provider/PaymentProvider.d.ts +0 -8
- package/build/provider/SolanaContextProvider.d.ts +0 -6
- package/build/provider/Web3ContextProvider.d.ts +0 -24
- package/build/stateStore.d.ts +0 -66
- package/build/styles/defaultTheme.d.ts +0 -3
- package/build/styles/index.d.ts +0 -1
- package/build/styles/styled/index.d.ts +0 -12
- package/build/styles/themes/base.d.ts +0 -129
- package/build/styles/themes/index.d.ts +0 -673
- package/build/styles/themes/midnight.d.ts +0 -74
- package/build/styles/themes/minimal.d.ts +0 -94
- package/build/styles/themes/nouns.d.ts +0 -79
- package/build/styles/themes/retro.d.ts +0 -89
- package/build/styles/themes/rounded.d.ts +0 -86
- package/build/styles/themes/soft.d.ts +0 -69
- package/build/styles/themes/web95.d.ts +0 -91
- package/build/styles/types.d.ts +0 -80
- package/build/types.d.ts +0 -46
- package/build/utils/exports.d.ts +0 -1
- package/build/utils/format.d.ts +0 -49
- package/build/utils/index.d.ts +0 -17
- package/build/utils/localstorage.d.ts +0 -9
- package/build/utils/p3.d.ts +0 -2
- package/build/utils/platform.d.ts +0 -2
- package/build/utils/polling.d.ts +0 -13
- package/build/utils/supportUrl.d.ts +0 -2
- package/build/utils/trpc.d.ts +0 -4
- package/build/utils/validateInput.d.ts +0 -16
- package/build/utils/wallets.d.ts +0 -24
- package/build/wallets/index.d.ts +0 -5
- package/build/wallets/useWallets.d.ts +0 -16
- package/build/wallets/walletConfigs.d.ts +0 -29
- package/build/world-mini-app/WorldPayButton.d.ts +0 -84
- package/build/world-mini-app/promptWorldPayment.d.ts +0 -9
|
@@ -46,8 +46,13 @@ function WorldPayButtonCustom(props) {
|
|
|
46
46
|
setIsMiniKitReady(MiniKit.isInstalled());
|
|
47
47
|
}, []);
|
|
48
48
|
useEffect(() => {
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
if ("payId" in props) {
|
|
50
|
+
log("[WORLD] Using payId from props: ", props.payId);
|
|
51
|
+
paymentState.setPayId(props.payId);
|
|
52
|
+
} else {
|
|
53
|
+
log("[WORLD] Creating preview order");
|
|
54
|
+
paymentState.setPayParams(props);
|
|
55
|
+
}
|
|
51
56
|
}, [JSON.stringify(props || {})]);
|
|
52
57
|
useEffect(() => {
|
|
53
58
|
context.setShowContactSupport(!isIOS);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorldPayButton.js","sources":["../../../src/world-mini-app/WorldPayButton.tsx"],"sourcesContent":["import {\n assertNotNull,\n DaimoPayEventType,\n DaimoPayUserMetadata,\n getDaimoPayOrderView,\n getOrderDestChainId,\n getOrderSourceChainId,\n PaymentBouncedEvent,\n PaymentCompletedEvent,\n PaymentStartedEvent,\n writeDaimoPayOrderID,\n} from \"@daimo/pay-common\";\nimport { ReactElement, useCallback, useEffect, useRef, useState } from \"react\";\nimport { Address, Hex } from \"viem\";\nimport ThemedButton, {\n ThemeContainer,\n} from \"../components/Common/ThemedButton\";\nimport { DaimoPayButtonInner } from \"../components/DaimoPayButton\";\nimport { ROUTES } from \"../constants/routes\";\nimport { useDaimoPay } from \"../hooks/useDaimoPay\";\nimport { usePayContext } from \"../hooks/usePayContext\";\nimport { ResetContainer } from \"../styles\";\nimport { CustomTheme, Mode, Theme } from \"../types\";\nimport { promptWorldcoinPayment } from \"./promptWorldPayment\";\n\nimport { MiniKit } from \"@worldcoin/minikit-js\";\nimport useIsMobile from \"../hooks/useIsMobile\";\n\nexport type WorldPayButtonPaymentProps = {\n /**\n * Your public app ID. Specify either (payId) or (appId + parameters).\n */\n appId: string;\n /**\n * Destination chain ID.\n */\n toChain: number;\n /**\n * The destination token to send, completing payment. Must be an ERC-20\n * token or the zero address, indicating the native token / ETH.\n */\n toToken: Address;\n /**\n * The amount of destination token to send (transfer or approve).\n */\n toUnits: string;\n /**\n * The destination address to transfer to, or contract to call.\n */\n toAddress: Address;\n /**\n * Optional calldata to call an arbitrary function on `toAddress`.\n */\n toCallData?: Hex;\n /**\n * The intent verb, such as \"Pay\", \"Deposit\", or \"Purchase\".\n */\n intent?: string;\n /**\n * External ID. E.g. a correlation ID.\n */\n externalId?: string;\n /**\n * Developer metadata. E.g. correlation ID.\n * */\n metadata?: DaimoPayUserMetadata;\n /**\n * The address to refund to if the payment bounces.\n */\n refundAddress?: Address;\n};\n\ntype WorldPayButtonCommonProps = WorldPayButtonPaymentProps & {\n /** Called when user sends payment and transaction is seen on chain */\n onPaymentStarted?: (event: PaymentStartedEvent) => void;\n /** Called when destination transfer or call completes successfully */\n onPaymentCompleted?: (event: PaymentCompletedEvent) => void;\n /** Called when destination call reverts and funds are refunded */\n onPaymentBounced?: (event: PaymentBouncedEvent) => void;\n /** Automatically close the modal after a successful payment. */\n closeOnSuccess?: boolean;\n /** Reset the payment after a successful payment. */\n resetOnSuccess?: boolean;\n};\n\nexport type WorldPayButtonProps = WorldPayButtonCommonProps & {\n /** Light mode, dark mode, or auto. */\n mode?: Mode;\n /** Named theme. See docs for options. */\n theme?: Theme;\n /** Custom theme. See docs for options. */\n customTheme?: CustomTheme;\n /** Disable interaction. */\n disabled?: boolean;\n};\n\nexport type WorldPayButtonCustomProps = WorldPayButtonCommonProps & {\n children: (renderProps: {\n show: () => void;\n isMiniKitReady: boolean;\n }) => ReactElement;\n};\n\nexport function WorldPayButton(props: WorldPayButtonProps) {\n const { theme, mode, customTheme } = props;\n const context = usePayContext();\n\n return (\n <WorldPayButtonCustom {...props}>\n {({ show, isMiniKitReady }) => (\n <ResetContainer\n $useTheme={theme ?? context.theme}\n $useMode={mode ?? context.mode}\n $customTheme={customTheme ?? context.customTheme}\n >\n <ThemeContainer\n onClick={props.disabled || !isMiniKitReady ? undefined : show}\n >\n <ThemedButton>\n <DaimoPayButtonInner />\n </ThemedButton>\n </ThemeContainer>\n </ResetContainer>\n )}\n </WorldPayButtonCustom>\n );\n}\n\nfunction WorldPayButtonCustom(props: WorldPayButtonCustomProps) {\n const pay = useDaimoPay();\n const context = usePayContext();\n const { paymentState, log } = context;\n const [isMiniKitReady, setIsMiniKitReady] = useState(false);\n const { isIOS } = useIsMobile();\n\n // Payment events: call these three event handlers.\n const { onPaymentStarted, onPaymentCompleted, onPaymentBounced } = props;\n\n // Install Minikit if not already installed\n useEffect(() => {\n log(\"[WORLD] Installing MiniKit\");\n const result = MiniKit.install();\n log(\"[WORLD] MiniKit install result\", result);\n log(\"[WORLD] MiniKit is installed\", MiniKit.isInstalled());\n setIsMiniKitReady(MiniKit.isInstalled());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // Set the payParams\n useEffect(() => {\n log(\"[WORLD] Creating preview order\");\n paymentState.setPayParams(props);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [JSON.stringify(props || {})]);\n\n // Set the showContactSupport flag\n useEffect(() => {\n // Links are broken on iOS in World App, so hide the contact support button\n context.setShowContactSupport(!isIOS);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isIOS]);\n\n // Emit onPaymentStart handler when payment state changes to payment_started\n const sentStart = useRef(false);\n useEffect(() => {\n if (sentStart.current) return;\n if (pay.paymentState !== \"payment_started\") return;\n\n // TODO: Populate source payment details immediately when the user pays.\n // Use this hack because source chain id is not immediately populated when\n // payment_started\n const sourceChainId = getOrderSourceChainId(pay.order);\n if (sourceChainId == null) return;\n\n sentStart.current = true;\n onPaymentStarted?.({\n type: DaimoPayEventType.PaymentStarted,\n paymentId: writeDaimoPayOrderID(pay.order.id),\n chainId: sourceChainId,\n txHash: pay.order.sourceInitiateTxHash,\n payment: getDaimoPayOrderView(pay.order),\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [pay.order, pay.paymentState]);\n\n // Emit onPaymentComplete or onPaymentBounced handler when payment state\n // changes to payment_completed or payment_bounced\n const sentComplete = useRef(false);\n useEffect(() => {\n if (sentComplete.current) return;\n if (\n pay.paymentState !== \"payment_completed\" &&\n pay.paymentState !== \"payment_bounced\"\n )\n return;\n\n sentComplete.current = true;\n const eventType =\n pay.paymentState === \"payment_completed\"\n ? DaimoPayEventType.PaymentCompleted\n : DaimoPayEventType.PaymentBounced;\n const event = {\n type: eventType,\n paymentId: writeDaimoPayOrderID(pay.order.id),\n chainId: getOrderDestChainId(pay.order),\n txHash: assertNotNull(\n pay.order.destFastFinishTxHash ?? pay.order.destClaimTxHash,\n `[WORLD PAY BUTTON] dest tx hash null on order ${pay.order.id} when intent status is ${pay.order.intentStatus}`,\n ),\n payment: getDaimoPayOrderView(pay.order),\n };\n\n if (pay.paymentState === \"payment_completed\") {\n onPaymentCompleted?.(event as PaymentCompletedEvent);\n } else if (pay.paymentState === \"payment_bounced\") {\n onPaymentBounced?.(event as PaymentBouncedEvent);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [pay.order, pay.paymentState]);\n\n // Navigate to the confirmation page in the modal to show the spinner\n const showSpinner = useCallback(() => {\n log(`[WORLD] showing spinner ${pay.order?.id}`);\n const modalOptions = {\n closeOnSuccess: props.closeOnSuccess,\n resetOnSuccess: props.resetOnSuccess,\n };\n context.showPayment(modalOptions);\n context.setRoute(ROUTES.CONFIRMATION);\n }, [context, pay.order?.id, log, props.closeOnSuccess, props.resetOnSuccess]);\n\n // Show the Worldcoin payment drawer and pop open the Daimo Pay modal\n const show = useCallback(async () => {\n log(`[WORLD] showing payment ${pay.order?.id}`);\n if (!isMiniKitReady) {\n console.error(\n \"[WORLD] MiniKit is not installed. Please install @worldcoin/minikit-js to use this feature.\",\n );\n return;\n }\n\n if (\n [\"payment_started\", \"payment_completed\", \"payment_bounced\"].includes(\n pay.paymentState,\n )\n ) {\n showSpinner();\n return;\n }\n\n log(`[WORLD] hydrating order ${pay.order?.id}`);\n const { order } = await pay.hydrateOrder();\n log(\n `[WORLD] hydrated order ${pay.order?.id}. Prompting payment with MiniKit`,\n );\n const payRes = await promptWorldcoinPayment(order, context.trpc);\n if (payRes == null || payRes.finalPayload.status == \"error\") {\n log(\"[WORLD] Failed to prompt Worldcoin payment: \", payRes);\n return;\n }\n\n log(`[WORLD] triggering payment search on ${pay.order?.id}`);\n pay.paySource();\n\n // Optimistically assume the source payment is correct and show the\n // confirmation spinner\n showSpinner();\n }, [pay, showSpinner, context.trpc, isMiniKitReady, log]);\n\n return props.children({ show, isMiniKitReady });\n}\n\nWorldPayButtonCustom.displayName = \"WorldPayButton.Custom\";\n\nWorldPayButton.Custom = WorldPayButtonCustom;\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAuGO,SAAS,eAAe,KAA4B,EAAA;AACzD,EAAA,MAAM,EAAE,KAAA,EAAO,IAAM,EAAA,WAAA,EAAgB,GAAA,KAAA,CAAA;AACrC,EAAA,MAAM,UAAU,aAAc,EAAA,CAAA;AAE9B,EACE,uBAAA,GAAA,CAAC,wBAAsB,GAAG,KAAA,EACvB,WAAC,EAAE,IAAA,EAAM,gBACR,qBAAA,GAAA;AAAA,IAAC,cAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,SAAS,OAAQ,CAAA,KAAA;AAAA,MAC5B,QAAA,EAAU,QAAQ,OAAQ,CAAA,IAAA;AAAA,MAC1B,YAAA,EAAc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,CAAA;AAC1D,MAAA,OAAA;AAAA,KACF;AAEA,IAAA,GAAA,CAAI,CAAwC,qCAAA,EAAA,GAAA,CAAI,KAAO,EAAA,EAAE,CAAE,CAAA,CAAA,CAAA;AAC3D,IAAA,GAAA,CAAI,SAAU,EAAA,CAAA;AAId,IAAY,WAAA,EAAA,CAAA;AAAA,GACd,EAAG,CAAC,GAAK,EAAA,WAAA,EAAa,QAAQ,IAAM,EAAA,cAAA,EAAgB,GAAG,CAAC,CAAA,CAAA;AAExD,EAAA,OAAO,KAAM,CAAA,QAAA,CAAS,EAAE,IAAA,EAAM,gBAAgB,CAAA,CAAA;AAChD,CAAA;AAEA,oBAAA,CAAqB,WAAc,GAAA,uBAAA,CAAA;AAEnC,cAAA,CAAe,MAAS,GAAA,oBAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"WorldPayButton.js","sources":["../../../src/world-mini-app/WorldPayButton.tsx"],"sourcesContent":["import {\n assertNotNull,\n DaimoPayEventType,\n DaimoPayUserMetadata,\n getDaimoPayOrderView,\n getOrderDestChainId,\n getOrderSourceChainId,\n PaymentBouncedEvent,\n PaymentCompletedEvent,\n PaymentStartedEvent,\n writeDaimoPayOrderID,\n} from \"@daimo/pay-common\";\nimport { ReactElement, useCallback, useEffect, useRef, useState } from \"react\";\nimport { Address, Hex } from \"viem\";\nimport ThemedButton, {\n ThemeContainer,\n} from \"../components/Common/ThemedButton\";\nimport { DaimoPayButtonInner } from \"../components/DaimoPayButton\";\nimport { ROUTES } from \"../constants/routes\";\nimport { useDaimoPay } from \"../hooks/useDaimoPay\";\nimport { usePayContext } from \"../hooks/usePayContext\";\nimport { ResetContainer } from \"../styles\";\nimport { CustomTheme, Mode, Theme } from \"../types\";\nimport { promptWorldcoinPayment } from \"./promptWorldPayment\";\n\nimport { MiniKit } from \"@worldcoin/minikit-js\";\nimport useIsMobile from \"../hooks/useIsMobile\";\n\nexport type WorldPayButtonPaymentProps =\n | {\n /**\n * Your public app ID. Specify either (payId) or (appId + parameters).\n */\n appId: string;\n /**\n * Destination chain ID.\n */\n toChain: number;\n /**\n * The destination token to send, completing payment. Must be an ERC-20\n * token or the zero address, indicating the native token / ETH.\n */\n toToken: Address;\n /**\n * The amount of destination token to send (transfer or approve).\n */\n toUnits: string;\n /**\n * The destination address to transfer to, or contract to call.\n */\n toAddress: Address;\n /**\n * Optional calldata to call an arbitrary function on `toAddress`.\n */\n toCallData?: Hex;\n /**\n * The intent verb, such as \"Pay\", \"Deposit\", or \"Purchase\".\n */\n intent?: string;\n /**\n * External ID. E.g. a correlation ID.\n */\n externalId?: string;\n /**\n * Developer metadata. E.g. correlation ID.\n * */\n metadata?: DaimoPayUserMetadata;\n /**\n * The address to refund to if the payment bounces.\n */\n refundAddress?: Address;\n }\n | {\n /** The payment ID, generated via the Daimo Pay API. Replaces params above. */\n payId: string;\n };\n\ntype WorldPayButtonCommonProps = WorldPayButtonPaymentProps & {\n /** Called when user sends payment and transaction is seen on chain */\n onPaymentStarted?: (event: PaymentStartedEvent) => void;\n /** Called when destination transfer or call completes successfully */\n onPaymentCompleted?: (event: PaymentCompletedEvent) => void;\n /** Called when destination call reverts and funds are refunded */\n onPaymentBounced?: (event: PaymentBouncedEvent) => void;\n /** Automatically close the modal after a successful payment. */\n closeOnSuccess?: boolean;\n /** Reset the payment after a successful payment. */\n resetOnSuccess?: boolean;\n};\n\nexport type WorldPayButtonProps = WorldPayButtonCommonProps & {\n /** Light mode, dark mode, or auto. */\n mode?: Mode;\n /** Named theme. See docs for options. */\n theme?: Theme;\n /** Custom theme. See docs for options. */\n customTheme?: CustomTheme;\n /** Disable interaction. */\n disabled?: boolean;\n};\n\nexport type WorldPayButtonCustomProps = WorldPayButtonCommonProps & {\n children: (renderProps: {\n show: () => void;\n isMiniKitReady: boolean;\n }) => ReactElement;\n};\n\nexport function WorldPayButton(props: WorldPayButtonProps) {\n const { theme, mode, customTheme } = props;\n const context = usePayContext();\n\n return (\n <WorldPayButtonCustom {...props}>\n {({ show, isMiniKitReady }) => (\n <ResetContainer\n $useTheme={theme ?? context.theme}\n $useMode={mode ?? context.mode}\n $customTheme={customTheme ?? context.customTheme}\n >\n <ThemeContainer\n onClick={props.disabled || !isMiniKitReady ? undefined : show}\n >\n <ThemedButton>\n <DaimoPayButtonInner />\n </ThemedButton>\n </ThemeContainer>\n </ResetContainer>\n )}\n </WorldPayButtonCustom>\n );\n}\n\nfunction WorldPayButtonCustom(props: WorldPayButtonCustomProps) {\n const pay = useDaimoPay();\n const context = usePayContext();\n const { paymentState, log } = context;\n const [isMiniKitReady, setIsMiniKitReady] = useState(false);\n const { isIOS } = useIsMobile();\n\n // Payment events: call these three event handlers.\n const { onPaymentStarted, onPaymentCompleted, onPaymentBounced } = props;\n\n // Install Minikit if not already installed\n useEffect(() => {\n log(\"[WORLD] Installing MiniKit\");\n const result = MiniKit.install();\n log(\"[WORLD] MiniKit install result\", result);\n log(\"[WORLD] MiniKit is installed\", MiniKit.isInstalled());\n setIsMiniKitReady(MiniKit.isInstalled());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // Set the payParams\n useEffect(() => {\n if (\"payId\" in props) {\n log(\"[WORLD] Using payId from props: \", props.payId);\n paymentState.setPayId(props.payId);\n } else {\n log(\"[WORLD] Creating preview order\");\n paymentState.setPayParams(props);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [JSON.stringify(props || {})]);\n\n // Set the showContactSupport flag\n useEffect(() => {\n // Links are broken on iOS in World App, so hide the contact support button\n context.setShowContactSupport(!isIOS);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isIOS]);\n\n // Emit onPaymentStart handler when payment state changes to payment_started\n const sentStart = useRef(false);\n useEffect(() => {\n if (sentStart.current) return;\n if (pay.paymentState !== \"payment_started\") return;\n\n // TODO: Populate source payment details immediately when the user pays.\n // Use this hack because source chain id is not immediately populated when\n // payment_started\n const sourceChainId = getOrderSourceChainId(pay.order);\n if (sourceChainId == null) return;\n\n sentStart.current = true;\n onPaymentStarted?.({\n type: DaimoPayEventType.PaymentStarted,\n paymentId: writeDaimoPayOrderID(pay.order.id),\n chainId: sourceChainId,\n txHash: pay.order.sourceInitiateTxHash,\n payment: getDaimoPayOrderView(pay.order),\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [pay.order, pay.paymentState]);\n\n // Emit onPaymentComplete or onPaymentBounced handler when payment state\n // changes to payment_completed or payment_bounced\n const sentComplete = useRef(false);\n useEffect(() => {\n if (sentComplete.current) return;\n if (\n pay.paymentState !== \"payment_completed\" &&\n pay.paymentState !== \"payment_bounced\"\n )\n return;\n\n sentComplete.current = true;\n const eventType =\n pay.paymentState === \"payment_completed\"\n ? DaimoPayEventType.PaymentCompleted\n : DaimoPayEventType.PaymentBounced;\n const event = {\n type: eventType,\n paymentId: writeDaimoPayOrderID(pay.order.id),\n chainId: getOrderDestChainId(pay.order),\n txHash: assertNotNull(\n pay.order.destFastFinishTxHash ?? pay.order.destClaimTxHash,\n `[WORLD PAY BUTTON] dest tx hash null on order ${pay.order.id} when intent status is ${pay.order.intentStatus}`,\n ),\n payment: getDaimoPayOrderView(pay.order),\n };\n\n if (pay.paymentState === \"payment_completed\") {\n onPaymentCompleted?.(event as PaymentCompletedEvent);\n } else if (pay.paymentState === \"payment_bounced\") {\n onPaymentBounced?.(event as PaymentBouncedEvent);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [pay.order, pay.paymentState]);\n\n // Navigate to the confirmation page in the modal to show the spinner\n const showSpinner = useCallback(() => {\n log(`[WORLD] showing spinner ${pay.order?.id}`);\n const modalOptions = {\n closeOnSuccess: props.closeOnSuccess,\n resetOnSuccess: props.resetOnSuccess,\n };\n context.showPayment(modalOptions);\n context.setRoute(ROUTES.CONFIRMATION);\n }, [context, pay.order?.id, log, props.closeOnSuccess, props.resetOnSuccess]);\n\n // Show the Worldcoin payment drawer and pop open the Daimo Pay modal\n const show = useCallback(async () => {\n log(`[WORLD] showing payment ${pay.order?.id}`);\n if (!isMiniKitReady) {\n console.error(\n \"[WORLD] MiniKit is not installed. Please install @worldcoin/minikit-js to use this feature.\",\n );\n return;\n }\n\n if (\n [\"payment_started\", \"payment_completed\", \"payment_bounced\"].includes(\n pay.paymentState,\n )\n ) {\n showSpinner();\n return;\n }\n\n log(`[WORLD] hydrating order ${pay.order?.id}`);\n const { order } = await pay.hydrateOrder();\n log(\n `[WORLD] hydrated order ${pay.order?.id}. Prompting payment with MiniKit`,\n );\n const payRes = await promptWorldcoinPayment(order, context.trpc);\n if (payRes == null || payRes.finalPayload.status == \"error\") {\n log(\"[WORLD] Failed to prompt Worldcoin payment: \", payRes);\n return;\n }\n\n log(`[WORLD] triggering payment search on ${pay.order?.id}`);\n pay.paySource();\n\n // Optimistically assume the source payment is correct and show the\n // confirmation spinner\n showSpinner();\n }, [pay, showSpinner, context.trpc, isMiniKitReady, log]);\n\n return props.children({ show, isMiniKitReady });\n}\n\nWorldPayButtonCustom.displayName = \"WorldPayButton.Custom\";\n\nWorldPayButton.Custom = WorldPayButtonCustom;\n"],"names":[],"mappings":";;;;;;;;;;;;;;AA4GO,SAAS,eAAe,KAA4B,EAAA;AACzD,EAAA,MAAM,EAAE,KAAA,EAAO,IAAM,EAAA,WAAA,EAAgB,GAAA,KAAA,CAAA;AACrC,EAAA,MAAM,UAAU,aAAc,EAAA,CAAA;AAE9B,EACE,uBAAA,GAAA,CAAC,wBAAsB,GAAG,KAAA,EACvB,WAAC,EAAE,IAAA,EAAM,gBACR,qBAAA,GAAA;AAAA,IAAC,cAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,SAAS,OAAQ,CAAA,KAAA;AAAA,MAC5B,QAAA,EAAU,QAAQ,OAAQ,CAAA,IAAA;AAAA,MAC1B,YAAA,EAAc,eAAe,OAAQ,CAAA,WAAA;AAAA,MAErC,QAAA,kBAAA,GAAA;AAAA,QAAC,cAAA;AAAA,QAAA;AAAA,UACC,OAAS,EAAA,KAAA,CAAM,QAAY,IAAA,CAAC,iBAAiB,KAAY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A,GAAA,CAAI,gDAAgD,MAAM,CAAA,CAAA;AAC1D,MAAA,OAAA;AAAA,KACF;AAEA,IAAA,GAAA,CAAI,CAAwC,qCAAA,EAAA,GAAA,CAAI,KAAO,EAAA,EAAE,CAAE,CAAA,CAAA,CAAA;AAC3D,IAAA,GAAA,CAAI,SAAU,EAAA,CAAA;AAId,IAAY,WAAA,EAAA,CAAA;AAAA,GACd,EAAG,CAAC,GAAK,EAAA,WAAA,EAAa,QAAQ,IAAM,EAAA,cAAA,EAAgB,GAAG,CAAC,CAAA,CAAA;AAExD,EAAA,OAAO,KAAM,CAAA,QAAA,CAAS,EAAE,IAAA,EAAM,gBAAgB,CAAA,CAAA;AAChD,CAAA;AAEA,oBAAA,CAAqB,WAAc,GAAA,uBAAA,CAAA;AAEnC,cAAA,CAAe,MAAS,GAAA,oBAAA;;;;"}
|
package/build/world.d.ts
CHANGED
|
@@ -47,6 +47,9 @@ type WorldPayButtonPaymentProps = {
|
|
|
47
47
|
* The address to refund to if the payment bounces.
|
|
48
48
|
*/
|
|
49
49
|
refundAddress?: Address;
|
|
50
|
+
} | {
|
|
51
|
+
/** The payment ID, generated via the Daimo Pay API. Replaces params above. */
|
|
52
|
+
payId: string;
|
|
50
53
|
};
|
|
51
54
|
type WorldPayButtonCommonProps = WorldPayButtonPaymentProps & {
|
|
52
55
|
/** Called when user sends payment and transaction is seen on chain */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daimo/pay",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.16.
|
|
4
|
+
"version": "1.16.3",
|
|
5
5
|
"author": "Daimo",
|
|
6
6
|
"homepage": "https://pay.daimo.com",
|
|
7
7
|
"license": "BSD-2-Clause license",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}' --max-warnings=0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@daimo/pay-common": "1.16.
|
|
36
|
+
"@daimo/pay-common": "1.16.3",
|
|
37
37
|
"@solana/wallet-adapter-base": "^0.9.23",
|
|
38
38
|
"@solana/wallet-adapter-react": "^0.15.35",
|
|
39
39
|
"@solana/web3.js": "^1.95.4",
|
|
@@ -93,4 +93,4 @@
|
|
|
93
93
|
"payment",
|
|
94
94
|
"crypto"
|
|
95
95
|
]
|
|
96
|
-
}
|
|
96
|
+
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TODO: Move hex colors into css variables for p3 support
|
|
3
|
-
*/
|
|
4
|
-
declare const _default: {
|
|
5
|
-
Chrome: import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
FireFox: import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
Brave: import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
Edge: import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
};
|
|
10
|
-
export default _default;
|
package/build/assets/chains.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
type Logo = {
|
|
2
|
-
testnet?: boolean;
|
|
3
|
-
};
|
|
4
|
-
export declare const UnknownChain: ({ testnet, ...props }: Logo) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export declare const Ethereum: ({ testnet, ...props }: Logo) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export declare const Polygon: ({ testnet, ...props }: Logo) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export declare const Optimism: ({ testnet, ...props }: Logo) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare const Arbitrum: ({ testnet, ...props }: Logo) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export declare const Telos: ({ testnet, ...props }: Logo) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export declare const Solana: ({ testnet, ...props }: {
|
|
11
|
-
testnet?: boolean;
|
|
12
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export declare const Bitcoin: ({ testnet, ...props }: {
|
|
14
|
-
testnet?: boolean;
|
|
15
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export declare const Tron: ({ testnet, ...props }: {
|
|
17
|
-
testnet?: boolean;
|
|
18
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export declare const Zcash: ({ testnet, ...props }: {
|
|
20
|
-
testnet?: boolean;
|
|
21
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export declare const Base: ({ testnet, ...props }: {
|
|
23
|
-
testnet?: boolean;
|
|
24
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export declare const chainToLogo: {
|
|
26
|
-
[x: number]: import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
};
|
|
28
|
-
export {};
|
package/build/assets/coins.d.ts
DELETED
package/build/assets/crepe.d.ts
DELETED
package/build/assets/icons.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export declare const Scan: ({ ...props }: {
|
|
2
|
-
[x: string]: any;
|
|
3
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare const WarningIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export declare const Download: ({ ...props }: {
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare const ExternalLinkIcon: ({ ...props }: {
|
|
9
|
-
[x: string]: any;
|
|
10
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export declare const AlertIcon: ({ ...props }: {
|
|
12
|
-
[x: string]: any;
|
|
13
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export declare const DisconnectIcon: ({ ...props }: {
|
|
15
|
-
[x: string]: any;
|
|
16
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export declare const TickIcon: ({ ...props }: {
|
|
18
|
-
[x: string]: any;
|
|
19
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export declare const LoadingCircleIcon: ({ ...props }: {
|
|
21
|
-
[x: string]: any;
|
|
22
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
export declare const RetryIconCircle: ({ ...props }: {
|
|
24
|
-
[x: string]: any;
|
|
25
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
export declare const RetryIcon: ({ ...props }: {
|
|
27
|
-
[x: string]: any;
|
|
28
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
export declare const CopyToClipboardIcon: ({ ...props }: {
|
|
30
|
-
[x: string]: any;
|
|
31
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
export declare const AuthIcon: ({ ...props }: React.HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
-
export declare const SwitchIcon: ({ ...props }: {
|
|
34
|
-
[x: string]: any;
|
|
35
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
package/build/assets/logos.d.ts
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare const Mock: ({ ...props }: {
|
|
3
|
-
[x: string]: any;
|
|
4
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export declare const Injected: ({ ...props }: {
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare const MetaMask: ({ background, ...props }: any) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export declare const Base: () => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export declare const Family: ({ ...props }: {
|
|
11
|
-
[x: string]: any;
|
|
12
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export declare const Trust: ({ background, ...props }: {
|
|
14
|
-
background?: boolean;
|
|
15
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export declare const WalletIcon: ({ inverted }: {
|
|
17
|
-
inverted?: boolean;
|
|
18
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export declare const Argent: ({ ...props }: {
|
|
20
|
-
[x: string]: any;
|
|
21
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export declare const Venmo: ({ ...props }: {
|
|
23
|
-
[x: string]: any;
|
|
24
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export declare const CashApp: ({ ...props }: {
|
|
26
|
-
[x: string]: any;
|
|
27
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
export declare const Revolut: ({ ...props }: {
|
|
29
|
-
[x: string]: any;
|
|
30
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
export declare const MercadoPago: ({ ...props }: {
|
|
32
|
-
[x: string]: any;
|
|
33
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
-
export declare const Wise: ({ ...props }: {
|
|
35
|
-
[x: string]: any;
|
|
36
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
-
export declare const ImToken: ({ ...props }: {
|
|
38
|
-
[x: string]: any;
|
|
39
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
-
export declare const Frame: ({ ...props }: {
|
|
41
|
-
[x: string]: any;
|
|
42
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
-
export declare const Farcaster: () => import("react/jsx-runtime").JSX.Element;
|
|
44
|
-
export declare const MiniPay: () => import("react/jsx-runtime").JSX.Element;
|
|
45
|
-
export declare const Rainbow: ({ round, ...props }: any) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
-
export declare const Brave: ({ ...props }: {
|
|
47
|
-
[x: string]: any;
|
|
48
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
49
|
-
export declare const Crypto: ({ ...props }: {
|
|
50
|
-
[x: string]: any;
|
|
51
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
-
export declare const Ledger: ({ ...props }: {
|
|
53
|
-
[x: string]: any;
|
|
54
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
55
|
-
export declare const Steak: ({ ...props }: {
|
|
56
|
-
[x: string]: any;
|
|
57
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
58
|
-
export declare const Unstoppable: ({ ...props }: {
|
|
59
|
-
[x: string]: any;
|
|
60
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
61
|
-
export declare const ONTO: ({ ...props }: {
|
|
62
|
-
[x: string]: any;
|
|
63
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
64
|
-
export declare const Slope: ({ ...props }: {
|
|
65
|
-
[x: string]: any;
|
|
66
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
67
|
-
export declare const Safe: ({ ...props }: {
|
|
68
|
-
[x: string]: any;
|
|
69
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
70
|
-
export declare const Frontier: ({ ...props }: {
|
|
71
|
-
[x: string]: any;
|
|
72
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
73
|
-
export declare const Zerion: ({ ...props }: {
|
|
74
|
-
[x: string]: any;
|
|
75
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
76
|
-
export declare const Phantom: ({ ...props }: {
|
|
77
|
-
[x: string]: any;
|
|
78
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
79
|
-
export declare const Solflare: ({ ...props }: {
|
|
80
|
-
[x: string]: any;
|
|
81
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
82
|
-
export declare const Backpack: ({ ...props }: {
|
|
83
|
-
[x: string]: any;
|
|
84
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
85
|
-
export declare const Bitget: ({ ...props }: {
|
|
86
|
-
[x: string]: any;
|
|
87
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
88
|
-
export declare const PlaceHolder: () => import("react/jsx-runtime").JSX.Element;
|
|
89
|
-
export declare const Dawn: ({ ...props }: {
|
|
90
|
-
[x: string]: any;
|
|
91
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
92
|
-
export declare const InfinityWallet: ({ ...props }: {
|
|
93
|
-
[x: string]: any;
|
|
94
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
95
|
-
export declare const Rabby: ({ ...props }: {
|
|
96
|
-
[x: string]: any;
|
|
97
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
98
|
-
export declare const OtherWallets: ({ ...props }: {
|
|
99
|
-
[x: string]: any;
|
|
100
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
101
|
-
export declare const SquircleIcon: ({ icon, alt, }: {
|
|
102
|
-
icon: string | React.ComponentType<any>;
|
|
103
|
-
alt: string;
|
|
104
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
105
|
-
declare const _default: {
|
|
106
|
-
Mock: ({ ...props }: {
|
|
107
|
-
[x: string]: any;
|
|
108
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
109
|
-
Injected: ({ ...props }: {
|
|
110
|
-
[x: string]: any;
|
|
111
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
112
|
-
OtherWallets: ({ ...props }: {
|
|
113
|
-
[x: string]: any;
|
|
114
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
115
|
-
WalletIcon: ({ inverted }: {
|
|
116
|
-
inverted?: boolean;
|
|
117
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
118
|
-
MetaMask: ({ background, ...props }: any) => import("react/jsx-runtime").JSX.Element;
|
|
119
|
-
Base: () => import("react/jsx-runtime").JSX.Element;
|
|
120
|
-
Family: ({ ...props }: {
|
|
121
|
-
[x: string]: any;
|
|
122
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
123
|
-
Trust: ({ background, ...props }: {
|
|
124
|
-
background?: boolean;
|
|
125
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
126
|
-
Argent: ({ ...props }: {
|
|
127
|
-
[x: string]: any;
|
|
128
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
129
|
-
ImToken: ({ ...props }: {
|
|
130
|
-
[x: string]: any;
|
|
131
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
132
|
-
Rainbow: ({ round, ...props }: any) => import("react/jsx-runtime").JSX.Element;
|
|
133
|
-
Crypto: ({ ...props }: {
|
|
134
|
-
[x: string]: any;
|
|
135
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
136
|
-
Ledger: ({ ...props }: {
|
|
137
|
-
[x: string]: any;
|
|
138
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
139
|
-
Brave: ({ ...props }: {
|
|
140
|
-
[x: string]: any;
|
|
141
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
142
|
-
Steak: ({ ...props }: {
|
|
143
|
-
[x: string]: any;
|
|
144
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
145
|
-
Unstoppable: ({ ...props }: {
|
|
146
|
-
[x: string]: any;
|
|
147
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
148
|
-
ONTO: ({ ...props }: {
|
|
149
|
-
[x: string]: any;
|
|
150
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
151
|
-
Slope: ({ ...props }: {
|
|
152
|
-
[x: string]: any;
|
|
153
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
154
|
-
Safe: ({ ...props }: {
|
|
155
|
-
[x: string]: any;
|
|
156
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
157
|
-
Frontier: ({ ...props }: {
|
|
158
|
-
[x: string]: any;
|
|
159
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
160
|
-
Zerion: ({ ...props }: {
|
|
161
|
-
[x: string]: any;
|
|
162
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
163
|
-
Phantom: ({ ...props }: {
|
|
164
|
-
[x: string]: any;
|
|
165
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
166
|
-
PlaceHolder: () => import("react/jsx-runtime").JSX.Element;
|
|
167
|
-
Frame: ({ ...props }: {
|
|
168
|
-
[x: string]: any;
|
|
169
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
170
|
-
Dawn: ({ ...props }: {
|
|
171
|
-
[x: string]: any;
|
|
172
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
173
|
-
InfinityWallet: ({ ...props }: {
|
|
174
|
-
[x: string]: any;
|
|
175
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
176
|
-
Rabby: ({ ...props }: {
|
|
177
|
-
[x: string]: any;
|
|
178
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
179
|
-
Fordefi: ({ ...props }: {
|
|
180
|
-
[x: string]: any;
|
|
181
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
182
|
-
TokenPocket: ({ ...props }: {
|
|
183
|
-
[x: string]: any;
|
|
184
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
185
|
-
Talisman: ({ ...props }: {
|
|
186
|
-
[x: string]: any;
|
|
187
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
188
|
-
SquircleIcon: ({ icon, alt, }: {
|
|
189
|
-
icon: string | React.ComponentType<any>;
|
|
190
|
-
alt: string;
|
|
191
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
192
|
-
Backpack: ({ ...props }: {
|
|
193
|
-
[x: string]: any;
|
|
194
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
195
|
-
Solflare: ({ ...props }: {
|
|
196
|
-
[x: string]: any;
|
|
197
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
198
|
-
OKX: ({ ...props }: {
|
|
199
|
-
[x: string]: any;
|
|
200
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
201
|
-
Bitget: ({ ...props }: {
|
|
202
|
-
[x: string]: any;
|
|
203
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
204
|
-
Farcaster: () => import("react/jsx-runtime").JSX.Element;
|
|
205
|
-
MiniPay: () => import("react/jsx-runtime").JSX.Element;
|
|
206
|
-
};
|
|
207
|
-
export default _default;
|
package/build/assets/wallet.d.ts
DELETED
package/build/assets/wave.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
declare const AmountInputField: React.FC<{
|
|
3
|
-
value: string;
|
|
4
|
-
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
|
-
currency?: string;
|
|
6
|
-
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
7
|
-
}>;
|
|
8
|
-
export default AmountInputField;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ROUTES } from "../../../constants/routes";
|
|
3
|
-
import { WalletPaymentOption } from "@daimo/pay-common";
|
|
4
|
-
declare const MultiCurrencySelectAmount: React.FC<{
|
|
5
|
-
selectedTokenOption: WalletPaymentOption;
|
|
6
|
-
setSelectedTokenOption: (option: WalletPaymentOption) => void;
|
|
7
|
-
nextPage: ROUTES;
|
|
8
|
-
}>;
|
|
9
|
-
export default MultiCurrencySelectAmount;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
type Hash = `0x${string}`;
|
|
3
|
-
export type CustomAvatarProps = {
|
|
4
|
-
address?: Hash | undefined;
|
|
5
|
-
ensName?: string | undefined;
|
|
6
|
-
ensImage?: string;
|
|
7
|
-
size: number;
|
|
8
|
-
radius: number;
|
|
9
|
-
};
|
|
10
|
-
/** Icon for an Ethereum address. Supports ENS names and avatars. */
|
|
11
|
-
declare const Avatar: React.FC<{
|
|
12
|
-
address?: Hash | undefined;
|
|
13
|
-
name?: string | undefined;
|
|
14
|
-
size?: number;
|
|
15
|
-
radius?: number;
|
|
16
|
-
}>;
|
|
17
|
-
export default Avatar;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const BrowserIconContainer: any;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const SpinnerContainer: any;
|
|
2
|
-
export declare const Arrow: any;
|
|
3
|
-
export declare const ArrowChevron: any;
|
|
4
|
-
export declare const ArrowLine: any;
|
|
5
|
-
export declare const DownloadArrow: any;
|
|
6
|
-
export declare const DownloadArrowInner: any;
|
|
7
|
-
export declare const ButtonContainerInner: any;
|
|
8
|
-
export declare const ButtonContainer: any;
|
|
9
|
-
export declare const InnerContainer: any;
|
|
10
|
-
export declare const IconContainer: any;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export type ButtonProps = {
|
|
3
|
-
children?: React.ReactNode;
|
|
4
|
-
variant?: "primary" | "secondary" | "tertiary";
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
icon?: React.ReactNode;
|
|
7
|
-
iconPosition?: "left" | "right";
|
|
8
|
-
roundedIcon?: boolean;
|
|
9
|
-
waiting?: boolean;
|
|
10
|
-
arrow?: boolean;
|
|
11
|
-
download?: boolean;
|
|
12
|
-
href?: string;
|
|
13
|
-
style?: React.CSSProperties;
|
|
14
|
-
onClick?: (e: any) => void;
|
|
15
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const SwitchNetworksContainer: any;
|
|
2
|
-
export declare const ChainIcon: any;
|
|
3
|
-
export declare const ChainLogoContainer: any;
|
|
4
|
-
export declare const ChainLogoSpinner: any;
|
|
5
|
-
export declare const ChainButtonContainer: any;
|
|
6
|
-
export declare const ChainButtons: any;
|
|
7
|
-
export declare const ChainButton: any;
|
|
8
|
-
export declare const ChainButtonStatus: any;
|
|
9
|
-
export declare const ChainButtonBg: any;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from "react";
|
|
2
|
-
export type CircleTimerProps = {
|
|
3
|
-
/** Total seconds in the countdown */
|
|
4
|
-
total: number;
|
|
5
|
-
/** Diameter (outer) in px – should be an even integer */
|
|
6
|
-
size?: number;
|
|
7
|
-
/** Stroke width in px – integer */
|
|
8
|
-
stroke?: number;
|
|
9
|
-
/** Externally controlled seconds left */
|
|
10
|
-
currentTime?: number;
|
|
11
|
-
/** Fired each second with updated seconds left */
|
|
12
|
-
onTimeChange?: (seconds: number) => void;
|
|
13
|
-
/** Child can be placed at the centre (e.g. an icon) */
|
|
14
|
-
children?: ReactNode;
|
|
15
|
-
};
|
|
16
|
-
declare const CircleTimer: React.FC<CircleTimerProps>;
|
|
17
|
-
export default CircleTimer;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const Pulse: import("styled-components").Keyframes;
|
|
2
|
-
export declare const ConnectorButton: any;
|
|
3
|
-
export declare const ConnectorLabel: any;
|
|
4
|
-
export declare const ConnectorIcon: any;
|
|
5
|
-
export declare const SkeletonIcon: any;
|
|
6
|
-
export declare const SkeletonLabel: any;
|
|
7
|
-
export declare const RecentlyUsedTag: any;
|
|
8
|
-
export declare const ConnectorsContainer: any;
|