@daimo/pay 0.3.6 → 0.3.7

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.es.js CHANGED
@@ -5,7 +5,7 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
5
5
  import { detect } from 'detect-browser';
6
6
  import React, { useEffect, useState, useCallback, useRef, useLayoutEffect, useMemo, createContext, createElement } from 'react';
7
7
  import { Buffer } from 'buffer';
8
- import { readDaimoPayOrderID, assert, assertNotNull, DaimoPayOrderMode, DaimoPayOrderStatusDest, capitalize, ExternalPaymentOptions, getAddressContraction, getDisplayPrice, writeDaimoPayOrderID, DaimoPayIntentStatus, DaimoPayOrderStatusSource } from '@daimo/common';
8
+ import { readDaimoPayOrderID, assert, assertNotNull, DaimoPayOrderMode, DaimoPayOrderStatusDest, ExternalPaymentOptions, getAddressContraction, capitalize, getDisplayPrice, debugJson, writeDaimoPayOrderID, DaimoPayIntentStatus, DaimoPayOrderStatusSource } from '@daimo/common';
9
9
  import styled$1, { css, keyframes, ThemeProvider } from 'styled-components';
10
10
  import { erc20Abi, getChainName, ethereum, arbitrum as arbitrum$1, base as base$2, optimism as optimism$1, polygon as polygon$1, ethereumSepolia, baseSepolia as baseSepolia$1, getChainExplorerTxUrl } from '@daimo/contract';
11
11
  import { zeroAddress, parseUnits } from 'viem';
@@ -900,14 +900,17 @@ const trpc = createTRPCClient({
900
900
  ],
901
901
  });
902
902
 
903
- function getPaymentInfo(log) {
903
+ function getPaymentInfo(setOpen, log) {
904
904
  // Wallet state.
905
905
  const { address: senderAddr } = useAccount();
906
906
  const { writeContractAsync } = useWriteContract();
907
907
  const { sendTransactionAsync } = useSendTransaction();
908
908
  // Daimo Pay order state.
909
- const [daimoPayOrder, setDaimoPayOrder] = useState(null);
910
- const [paymentWaitingMessage, setPaymentWaitingMessage] = useState(null);
909
+ const [daimoPayOrder, setDaimoPayOrder] = useState();
910
+ const [paymentWaitingMessage, setPaymentWaitingMessage] = useState();
911
+ // Payment UI config.
912
+ const [modalOptions, setModalOptions] = useState({});
913
+ // UI state. Selection for external payment (Binance, etc) vs wallet payment.
911
914
  const [selectedExternalOption, setSelectedExternalOption] = useState();
912
915
  const [selectedTokenOption, setSelectedTokenOption] = useState();
913
916
  const payWithToken = async (tokenAmount) => {
@@ -978,6 +981,7 @@ function getPaymentInfo(log) {
978
981
  });
979
982
  setDaimoPayOrder(order);
980
983
  }, [daimoPayOrder?.id]);
984
+ /** User picked a different deposit amount. */
981
985
  const setChosenUsd = (usdAmount) => {
982
986
  log(`[CHECKOUT] Setting chosen USD amount to ${usdAmount}`);
983
987
  assert(!!daimoPayOrder);
@@ -1008,9 +1012,17 @@ function getPaymentInfo(log) {
1008
1012
  log(`[CHECKOUT] Parsed order: ${JSON.stringify(order)}`);
1009
1013
  setDaimoPayOrder(order);
1010
1014
  }, [daimoPayOrder]);
1015
+ const onSuccess = ({ txHash, txURL }) => {
1016
+ if (modalOptions?.closeOnSuccess) {
1017
+ log(`[CHECKOUT] transaction succeeded, closing: ${txHash} ${txURL}`);
1018
+ setTimeout(() => setOpen(false), 1000);
1019
+ }
1020
+ };
1011
1021
  return {
1012
1022
  setPayId,
1013
1023
  daimoPayOrder,
1024
+ modalOptions,
1025
+ setModalOptions,
1014
1026
  paymentWaitingMessage,
1015
1027
  selectedExternalOption,
1016
1028
  selectedTokenOption,
@@ -1020,6 +1032,7 @@ function getPaymentInfo(log) {
1020
1032
  payWithToken,
1021
1033
  payWithExternal,
1022
1034
  refreshOrder,
1035
+ onSuccess,
1023
1036
  };
1024
1037
  }
1025
1038
 
@@ -2164,7 +2177,7 @@ const ResetContainer = styled(motion.div) `
2164
2177
  `;
2165
2178
 
2166
2179
  var name = "@daimo/pay";
2167
- var version = "0.3.6";
2180
+ var version = "0.3.7";
2168
2181
  var author = "Daimo";
2169
2182
  var homepage = "https://pay.daimo.com";
2170
2183
  var license = "BSD-2-Clause license";
@@ -10038,26 +10051,27 @@ const Confirmation = () => {
10038
10051
  }, 300);
10039
10052
  return () => clearInterval(interval);
10040
10053
  }, [refreshOrder]);
10041
- const { done, txURL, currency } = (() => {
10054
+ const { done, txURL } = (() => {
10042
10055
  if (daimoPayOrder && daimoPayOrder.mode === DaimoPayOrderMode.HYDRATED) {
10043
- if (daimoPayOrder.destStatus ===
10044
- DaimoPayOrderStatusDest.FAST_FINISH_SUBMITTED || // Frontends are optimistic, assume submits will be successful
10045
- daimoPayOrder.destStatus === DaimoPayOrderStatusDest.FAST_FINISHED ||
10046
- daimoPayOrder.destStatus === DaimoPayOrderStatusDest.CLAIM_SUCCESSFUL) {
10056
+ // Frontends are optimistic, assume submits will be successful
10057
+ const { destStatus } = daimoPayOrder;
10058
+ if (destStatus === DaimoPayOrderStatusDest.FAST_FINISH_SUBMITTED ||
10059
+ destStatus === DaimoPayOrderStatusDest.FAST_FINISHED ||
10060
+ destStatus === DaimoPayOrderStatusDest.CLAIM_SUCCESSFUL) {
10047
10061
  const txHash = daimoPayOrder.destFastFinishTxHash ?? daimoPayOrder.destClaimTxHash;
10048
10062
  const chainId = daimoPayOrder.destFinalCallTokenAmount.token.chainId;
10049
- const currency = `${capitalize(getChainName(chainId))} ${daimoPayOrder.destFinalCallTokenAmount.token.symbol}`;
10063
+ assert(txHash != null, `Dest ${destStatus}, but missing txHash`);
10064
+ const txURL = getChainExplorerTxUrl(chainId, txHash);
10065
+ paymentInfo.onSuccess({ txHash, txURL });
10050
10066
  return {
10051
10067
  done: true,
10052
- txURL: txHash ? getChainExplorerTxUrl(chainId, txHash) : undefined,
10053
- currency,
10068
+ txURL,
10054
10069
  };
10055
10070
  }
10056
10071
  }
10057
10072
  return {
10058
10073
  done: false,
10059
10074
  txURL: undefined,
10060
- currency: undefined,
10061
10075
  };
10062
10076
  })();
10063
10077
  return (jsx(PageContent, { style: {
@@ -10069,7 +10083,7 @@ const Confirmation = () => {
10069
10083
  justifyContent: "center",
10070
10084
  alignItems: "center",
10071
10085
  paddingBottom: 0,
10072
- }, children: [jsx(AnimationContainer$2, { children: jsxs(InsetContainer, { children: [jsx(Spinner, { "$status": done }), jsx(SuccessIcon, { "$status": done })] }) }), !done ? (jsx(ModalH1, { children: "Confirming..." })) : (jsx(ModalH1, { children: jsxs(Link, { href: txURL, target: "_blank", rel: "noopener noreferrer", children: ["Payment completed in ", currency] }) })), jsx(PoweredByFooter, {})] }) }));
10086
+ }, children: [jsx(AnimationContainer$2, { children: jsxs(InsetContainer, { children: [jsx(Spinner, { "$status": done }), jsx(SuccessIcon, { "$status": done })] }) }), !done ? (jsx(ModalH1, { children: "Confirming..." })) : (jsx(ModalH1, { children: jsx(Link, { href: txURL, target: "_blank", rel: "noopener noreferrer", children: "Payment completed" }) })), jsx(PoweredByFooter, {})] }) }));
10073
10087
  };
10074
10088
  const AnimationContainer$2 = styled(motion.div) `
10075
10089
  position: relative;
@@ -10766,7 +10780,7 @@ const AnimationContainer = styled(motion.div) `
10766
10780
  `;
10767
10781
 
10768
10782
  const customThemeDefault = {};
10769
- const ConnectModal = ({ mode = "auto", theme = "auto", customTheme = customThemeDefault, lang = "en-US", }) => {
10783
+ const DaimoPayModal = ({ mode = "auto", theme = "auto", customTheme = customThemeDefault, lang = "en-US", }) => {
10770
10784
  const context = useContext();
10771
10785
  const { setSelectedExternalOption, setSelectedTokenOption } = context.paymentInfo;
10772
10786
  const { isConnected, chain } = useAccount();
@@ -10924,6 +10938,7 @@ const DaimoPayProvider = ({ children, theme = "auto", mode = "auto", customTheme
10924
10938
  enforceSupportedChains: false,
10925
10939
  ethereumOnboardingUrl: undefined,
10926
10940
  walletOnboardingUrl: undefined,
10941
+ overlayBlur: undefined,
10927
10942
  };
10928
10943
  const opts = Object.assign({}, defaultOptions, options);
10929
10944
  if (typeof window !== "undefined") {
@@ -10972,9 +10987,11 @@ const DaimoPayProvider = ({ children, theme = "auto", mode = "auto", customTheme
10972
10987
  }
10973
10988
  }, [injectedConnector]);
10974
10989
  const log = debugMode ? console.log : () => { };
10975
- const paymentInfo = getPaymentInfo(log);
10976
- const loadPayment = async (payId) => {
10990
+ const paymentInfo = getPaymentInfo(setOpen, log);
10991
+ const loadAndShowPayment = async (payId, modalOptions) => {
10992
+ log(`[PAY] showing order ${payId}, options ${debugJson(modalOptions)}`);
10977
10993
  await paymentInfo.setPayId(payId);
10994
+ paymentInfo.setModalOptions(modalOptions);
10978
10995
  const daimoPayOrder = paymentInfo.daimoPayOrder;
10979
10996
  if (daimoPayOrder &&
10980
10997
  daimoPayOrder.mode === DaimoPayOrderMode.HYDRATED &&
@@ -10984,6 +11001,7 @@ const DaimoPayProvider = ({ children, theme = "auto", mode = "auto", customTheme
10984
11001
  else {
10985
11002
  setRoute(ROUTES.SELECT_METHOD);
10986
11003
  }
11004
+ setOpen(true);
10987
11005
  };
10988
11006
  const value = {
10989
11007
  theme: ckTheme,
@@ -10998,7 +11016,7 @@ const DaimoPayProvider = ({ children, theme = "auto", mode = "auto", customTheme
10998
11016
  setOpen,
10999
11017
  route,
11000
11018
  setRoute,
11001
- loadPayment,
11019
+ loadAndShowPayment,
11002
11020
  connector,
11003
11021
  setConnector,
11004
11022
  onConnect,
@@ -11019,7 +11037,7 @@ const DaimoPayProvider = ({ children, theme = "auto", mode = "auto", customTheme
11019
11037
  triggerResize: () => onResize((prev) => prev + 1),
11020
11038
  paymentInfo,
11021
11039
  };
11022
- return createElement(Context.Provider, { value }, jsx(Web3ContextProvider, { enabled: open, children: jsxs(ThemeProvider, { theme: defaultTheme$1, children: [children, jsx(ConnectModal, { lang: ckLang, theme: ckTheme, mode: mode, customTheme: ckCustomTheme })] }) }));
11040
+ return createElement(Context.Provider, { value }, jsx(Web3ContextProvider, { enabled: open, children: jsxs(ThemeProvider, { theme: defaultTheme$1, children: [children, jsx(DaimoPayModal, { lang: ckLang, theme: ckTheme, mode: mode, customTheme: ckCustomTheme })] }) }));
11023
11041
  };
11024
11042
  const useContext = () => {
11025
11043
  const context = React.useContext(Context);
@@ -11028,41 +11046,6 @@ const useContext = () => {
11028
11046
  return context;
11029
11047
  };
11030
11048
 
11031
- const useModal = ({ onConnect, onDisconnect } = {}) => {
11032
- const context = useContext();
11033
- useConnectCallback({
11034
- onConnect,
11035
- onDisconnect,
11036
- });
11037
- const close = () => {
11038
- context.setOpen(false);
11039
- };
11040
- const open = () => {
11041
- context.setOpen(true);
11042
- };
11043
- const gotoAndOpen = (route) => {
11044
- context.setRoute(route);
11045
- open();
11046
- };
11047
- return {
11048
- open: context.open,
11049
- setOpen: (show) => {
11050
- if (show) {
11051
- gotoAndOpen(ROUTES.SELECT_METHOD);
11052
- }
11053
- else {
11054
- close();
11055
- }
11056
- },
11057
- // Disconnected Routes
11058
- openAbout: () => gotoAndOpen(ROUTES.ABOUT),
11059
- openOnboarding: () => gotoAndOpen(ROUTES.ONBOARDING),
11060
- // Connected Routes
11061
- openProfile: () => gotoAndOpen(ROUTES.PROFILE),
11062
- openSwitchNetworks: () => gotoAndOpen(ROUTES.SWITCHNETWORKS),
11063
- };
11064
- };
11065
-
11066
11049
  const TextContainer = styled(motion.div) `
11067
11050
  top: 0;
11068
11051
  bottom: 0;
@@ -11299,28 +11282,23 @@ const contentVariants = {
11299
11282
  },
11300
11283
  },
11301
11284
  };
11302
- const DaimoPayButtonRenderer = ({ payId, children, }) => {
11285
+ const DaimoPayButtonRenderer = ({ payId, closeOnSuccess, children, }) => {
11303
11286
  const isMounted = useIsMounted();
11304
11287
  const context = useContext();
11305
- const { open, setOpen } = useModal();
11306
- const { address, isConnected, chain } = useAccount();
11288
+ const { address, chain } = useAccount();
11307
11289
  const isChainSupported = useChainIsSupported(chain?.id);
11308
11290
  const { data: ensName } = useEnsName({
11309
11291
  chainId: 1,
11310
11292
  address: address,
11311
11293
  });
11312
- function hide() {
11313
- setOpen(false);
11314
- }
11315
11294
  // Pre-load payment info in background.
11316
11295
  const { setPayId } = context.paymentInfo;
11317
11296
  useEffect(() => {
11318
11297
  setPayId(payId);
11319
11298
  }, [payId]);
11320
- async function show() {
11321
- await context.loadPayment(payId); // ensure payment info is loaded before opening.
11322
- context.setOpen(true);
11323
- }
11299
+ const hide = () => context.setOpen(false);
11300
+ const modalOptions = { closeOnSuccess };
11301
+ const show = () => context.loadAndShowPayment(payId, modalOptions);
11324
11302
  if (!children)
11325
11303
  return null;
11326
11304
  if (!isMounted)
@@ -11332,7 +11310,7 @@ const DaimoPayButtonRenderer = ({ payId, children, }) => {
11332
11310
  chain: chain,
11333
11311
  unsupported: !isChainSupported,
11334
11312
  isConnected: !!address,
11335
- isConnecting: open, // Using `open` to determine if connecting as wagmi isConnecting only is set to true when an active connector is awaiting connection
11313
+ isConnecting: context.open,
11336
11314
  address: address,
11337
11315
  truncatedAddress: address ? truncateEthAddress(address) : undefined,
11338
11316
  ensName: ensName?.toString(),
@@ -11341,17 +11319,12 @@ const DaimoPayButtonRenderer = ({ payId, children, }) => {
11341
11319
  DaimoPayButtonRenderer.displayName = "DaimoPayButton.Custom";
11342
11320
  function DaimoPayButtonInner() {
11343
11321
  const { paymentInfo } = useContext();
11344
- const label = paymentInfo?.daimoPayOrder?.metadata.intent ?? "Pay";
11322
+ const label = paymentInfo?.daimoPayOrder?.metadata?.intent ?? "Pay";
11345
11323
  return (jsx(AnimatePresence, { initial: false, children: jsx(TextContainer, { initial: "initial", animate: "animate", exit: "exit", variants: contentVariants, style: {
11346
11324
  height: 40,
11347
- //padding: '0 5px',
11348
11325
  }, children: label }, "connectWalletText") }));
11349
11326
  }
11350
- function DaimoPayButton({ payId,
11351
- // Theming
11352
- theme, mode, customTheme,
11353
- // Events
11354
- onClick, }) {
11327
+ function DaimoPayButton({ payId, theme, mode, customTheme, closeOnSuccess, onClick, }) {
11355
11328
  const isMounted = useIsMounted();
11356
11329
  const context = useContext();
11357
11330
  // Pre-load payment info in background.
@@ -11359,10 +11332,8 @@ onClick, }) {
11359
11332
  useEffect(() => {
11360
11333
  setPayId(payId);
11361
11334
  }, [payId]);
11362
- async function show() {
11363
- await context.loadPayment(payId); // ensure payment info is loaded
11364
- context.setOpen(true);
11365
- }
11335
+ const modalOptions = { closeOnSuccess };
11336
+ const show = () => context.loadAndShowPayment(payId, modalOptions);
11366
11337
  if (!isMounted)
11367
11338
  return null;
11368
11339
  return (jsx(ResetContainer, { "$useTheme": theme ?? context.theme, "$useMode": mode ?? context.mode, "$customTheme": customTheme ?? context.customTheme, children: jsx(ThemeContainer, { onClick: () => {
@@ -11376,6 +11347,41 @@ onClick, }) {
11376
11347
  }
11377
11348
  DaimoPayButton.Custom = DaimoPayButtonRenderer;
11378
11349
 
11350
+ const useModal = ({ onConnect, onDisconnect } = {}) => {
11351
+ const context = useContext();
11352
+ useConnectCallback({
11353
+ onConnect,
11354
+ onDisconnect,
11355
+ });
11356
+ const close = () => {
11357
+ context.setOpen(false);
11358
+ };
11359
+ const open = () => {
11360
+ context.setOpen(true);
11361
+ };
11362
+ const gotoAndOpen = (route) => {
11363
+ context.setRoute(route);
11364
+ open();
11365
+ };
11366
+ return {
11367
+ open: context.open,
11368
+ setOpen: (show) => {
11369
+ if (show) {
11370
+ gotoAndOpen(ROUTES.SELECT_METHOD);
11371
+ }
11372
+ else {
11373
+ close();
11374
+ }
11375
+ },
11376
+ // Disconnected Routes
11377
+ openAbout: () => gotoAndOpen(ROUTES.ABOUT),
11378
+ openOnboarding: () => gotoAndOpen(ROUTES.ONBOARDING),
11379
+ // Connected Routes
11380
+ openProfile: () => gotoAndOpen(ROUTES.PROFILE),
11381
+ openSwitchNetworks: () => gotoAndOpen(ROUTES.SWITCHNETWORKS),
11382
+ };
11383
+ };
11384
+
11379
11385
  function useDaimoPayStatus() {
11380
11386
  const { paymentInfo } = useContext();
11381
11387
  const status = (() => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
- import React, { ReactNode } from "react";
2
- import { CustomAvatarProps, CustomTheme, Languages, Mode, Theme } from "../types";
1
+ import React from "react";
2
+ import { CustomTheme, DaimoPayContextOptions, DaimoPayModalOptions, Languages, Mode, Theme } from "../types";
3
3
  import { useConnectCallbackProps } from "../hooks/useConnectCallback";
4
4
  import { PaymentInfo } from "../utils/getPaymentInfo";
5
5
  export declare enum ROUTES {
@@ -34,47 +34,28 @@ type ContextValue = {
34
34
  setOpen: React.Dispatch<React.SetStateAction<boolean>>;
35
35
  route: string;
36
36
  setRoute: React.Dispatch<React.SetStateAction<ROUTES>>;
37
- loadPayment: (payId: string) => Promise<void>;
38
37
  connector: Connector;
39
38
  setConnector: React.Dispatch<React.SetStateAction<Connector>>;
40
39
  errorMessage: Error;
41
- options?: DaimoPayOptions;
42
40
  debugMode?: boolean;
43
41
  log: (...props: any) => void;
44
42
  displayError: (message: string | React.ReactNode | null, code?: any) => void;
45
43
  resize: number;
46
44
  triggerResize: () => void;
45
+ /** Global options, across all pay buttons and payments. */
46
+ options?: DaimoPayContextOptions;
47
+ /** Loads a payment, then shows the modal to complete payment. */
48
+ loadAndShowPayment: (payId: string, modalOptions: DaimoPayModalOptions) => Promise<void>;
49
+ /** Payment status & callbacks. */
47
50
  paymentInfo: PaymentInfo;
48
51
  } & useConnectCallbackProps;
49
52
  export declare const Context: React.Context<ContextValue | null>;
50
- export type DaimoPayOptions = {
51
- language?: Languages;
52
- hideBalance?: boolean;
53
- hideTooltips?: boolean;
54
- hideQuestionMarkCTA?: boolean;
55
- hideNoWalletCTA?: boolean;
56
- hideRecentBadge?: boolean;
57
- walletConnectCTA?: "link" | "modal" | "both";
58
- avoidLayoutShift?: boolean;
59
- embedGoogleFonts?: boolean;
60
- truncateLongENSAddress?: boolean;
61
- walletConnectName?: string;
62
- reducedMotion?: boolean;
63
- disclaimer?: ReactNode | string;
64
- bufferPolyfill?: boolean;
65
- customAvatar?: React.FC<CustomAvatarProps>;
66
- initialChainId?: number;
67
- enforceSupportedChains?: boolean;
68
- ethereumOnboardingUrl?: string;
69
- walletOnboardingUrl?: string;
70
- overlayBlur?: number;
71
- };
72
53
  type DaimoPayProviderProps = {
73
54
  children?: React.ReactNode;
74
55
  theme?: Theme;
75
56
  mode?: Mode;
76
57
  customTheme?: CustomTheme;
77
- options?: DaimoPayOptions;
58
+ options?: DaimoPayContextOptions;
78
59
  debugMode?: boolean;
79
60
  } & useConnectCallbackProps;
80
61
  export declare const DaimoPayProvider: ({ children, theme, mode, customTheme, options, onConnect, onDisconnect, debugMode, }: DaimoPayProviderProps) => React.FunctionComponentElement<React.ProviderProps<ContextValue | null>>;
@@ -3,7 +3,11 @@ import { Chain } from "viem";
3
3
  import { CustomTheme, Mode, Theme } from "../../types";
4
4
  type Hash = `0x${string}`;
5
5
  type DaimoPayButtonRendererProps = {
6
+ /** The payment ID, generated via the Daimo Pay API. */
6
7
  payId: string;
8
+ /** Automatically close the modal after a successful payment. */
9
+ closeOnSuccess?: boolean;
10
+ /** Custom renderer */
7
11
  children?: (renderProps: {
8
12
  show?: () => void;
9
13
  hide?: () => void;
@@ -20,13 +24,20 @@ type DaimoPayButtonRendererProps = {
20
24
  }) => React.ReactNode;
21
25
  };
22
26
  type DaimoPayButtonProps = {
27
+ /** The payment ID, generated via the Daimo Pay API. */
23
28
  payId: string;
24
- theme?: Theme;
29
+ /** Light mode, dark mode, or auto. */
25
30
  mode?: Mode;
31
+ /** Named theme. See docs for options. */
32
+ theme?: Theme;
33
+ /** Custom theme. See docs for options. */
26
34
  customTheme?: CustomTheme;
35
+ /** Automatically close the modal after a successful payment. */
36
+ closeOnSuccess?: boolean;
37
+ /** Get notified when the user clicks, opening the payment modal. */
27
38
  onClick?: (open: () => void) => void;
28
39
  };
29
- export declare function DaimoPayButton({ payId, theme, mode, customTheme, onClick, }: DaimoPayButtonProps): import("react/jsx-runtime").JSX.Element | null;
40
+ export declare function DaimoPayButton({ payId, theme, mode, customTheme, closeOnSuccess, onClick, }: DaimoPayButtonProps): import("react/jsx-runtime").JSX.Element | null;
30
41
  export declare namespace DaimoPayButton {
31
42
  var Custom: React.FC<DaimoPayButtonRendererProps>;
32
43
  }
@@ -0,0 +1,2 @@
1
+ declare const ConnectUsing: () => import("react/jsx-runtime").JSX.Element;
2
+ export default ConnectUsing;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ export declare const states: {
3
+ CONNECTED: string;
4
+ CONNECTING: string;
5
+ EXPIRING: string;
6
+ FAILED: string;
7
+ REJECTED: string;
8
+ NOTCONNECTED: string;
9
+ UNAVAILABLE: string;
10
+ };
11
+ declare const ConnectWithInjector: React.FC<{
12
+ switchConnectMethod: (id?: string) => void;
13
+ forceState?: typeof states;
14
+ }>;
15
+ export default ConnectWithInjector;
@@ -0,0 +1,6 @@
1
+ export declare const Content: any;
2
+ export declare const Container: any;
3
+ export declare const ConnectingContainer: any;
4
+ export declare const ConnectingAnimation: any;
5
+ export declare const RetryButton: any;
6
+ export declare const RetryIconContainer: any;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ declare const ConnectWithQRCode: React.FC<{
3
+ switchConnectMethod: (id?: string) => void;
4
+ }>;
5
+ export default ConnectWithQRCode;
@@ -0,0 +1,7 @@
1
+ import { CustomTheme, Languages, Mode, Theme } from "../../types";
2
+ export declare const DaimoPayModal: React.FC<{
3
+ mode?: Mode;
4
+ theme?: Theme;
5
+ customTheme?: CustomTheme;
6
+ lang?: Languages;
7
+ }>;
@@ -1,3 +1,5 @@
1
+ import { ReactNode } from "react";
2
+ import { CustomAvatarProps } from "./components/Common/Avatar";
1
3
  import { Languages as Lang } from "./localizations";
2
4
  export type Languages = Lang;
3
5
  export type Theme = "auto" | "web95" | "retro" | "soft" | "midnight" | "minimal" | "rounded" | "nouns";
@@ -9,5 +11,34 @@ export type All = {
9
11
  customTheme?: CustomTheme;
10
12
  lang?: Languages;
11
13
  };
12
- export type { CustomAvatarProps } from "./components/Common/Avatar";
13
- export type { DaimoPayOptions } from "./components/DaimoPay";
14
+ export type { CustomAvatarProps };
15
+ /** Global options, across all pay buttons and payments. */
16
+ export type DaimoPayContextOptions = {
17
+ language?: Languages;
18
+ hideBalance?: boolean;
19
+ hideTooltips?: boolean;
20
+ hideQuestionMarkCTA?: boolean;
21
+ hideNoWalletCTA?: boolean;
22
+ hideRecentBadge?: boolean;
23
+ walletConnectCTA?: "link" | "modal" | "both";
24
+ /** Avoids layout shift when the DaimoPay modal is open by adding padding to the body */
25
+ avoidLayoutShift?: boolean;
26
+ /** Automatically embeds Google Font of the current theme. Does not work with custom themes */
27
+ embedGoogleFonts?: boolean;
28
+ truncateLongENSAddress?: boolean;
29
+ walletConnectName?: string;
30
+ reducedMotion?: boolean;
31
+ disclaimer?: ReactNode | string;
32
+ bufferPolyfill?: boolean;
33
+ customAvatar?: React.FC<CustomAvatarProps>;
34
+ initialChainId?: number;
35
+ enforceSupportedChains?: boolean;
36
+ ethereumOnboardingUrl?: string;
37
+ walletOnboardingUrl?: string;
38
+ /** Blur the background when the modal is open */
39
+ overlayBlur?: number;
40
+ };
41
+ /** Modal UI options, set on the pay button triggering that modal. */
42
+ export type DaimoPayModalOptions = {
43
+ closeOnSuccess?: boolean;
44
+ };
@@ -1,11 +1,17 @@
1
1
  import { DaimoPayOrder, DaimoPayTokenAmount, ExternalPaymentOptionMetadata, ExternalPaymentOptions } from "@daimo/common";
2
+ import { DaimoPayModalOptions } from "../types";
2
3
  import { trpc } from "./trpc";
3
- export type SourcePayment = Parameters<typeof trpc.processSourcePayment.mutate>[0];
4
+ /** Wallet payment options. User picks one. */
4
5
  export type PaymentOption = Awaited<ReturnType<typeof trpc.getWalletPaymentOptions.query>>[0];
6
+ /** Wallet payment details, sent to processSourcePayment after submitting tx. */
7
+ export type SourcePayment = Parameters<typeof trpc.processSourcePayment.mutate>[0];
8
+ /** Loads a DaimoPayOrder + manages the corresponding modal. */
5
9
  export interface PaymentInfo {
6
10
  setPayId: (id: string | null) => Promise<void>;
7
- daimoPayOrder: DaimoPayOrder | null;
8
- paymentWaitingMessage: string | null;
11
+ daimoPayOrder: DaimoPayOrder | undefined;
12
+ modalOptions: DaimoPayModalOptions;
13
+ setModalOptions: (modalOptions: DaimoPayModalOptions) => void;
14
+ paymentWaitingMessage: string | undefined;
9
15
  selectedExternalOption: ExternalPaymentOptionMetadata | undefined;
10
16
  selectedTokenOption: PaymentOption | undefined;
11
17
  setSelectedExternalOption: (option: ExternalPaymentOptionMetadata | undefined) => void;
@@ -14,11 +20,17 @@ export interface PaymentInfo {
14
20
  payWithToken: (tokenAmount: DaimoPayTokenAmount) => Promise<void>;
15
21
  payWithExternal: (option: ExternalPaymentOptions) => Promise<string>;
16
22
  refreshOrder: () => Promise<void>;
23
+ onSuccess: (args: {
24
+ txHash: string;
25
+ txURL?: string;
26
+ }) => void;
17
27
  }
18
- export declare function getPaymentInfo(log: (...args: any[]) => void): {
28
+ export declare function getPaymentInfo(setOpen: (showModal: boolean) => void, log: (...args: any[]) => void): {
19
29
  setPayId: (payId: string | null) => Promise<void>;
20
- daimoPayOrder: DaimoPayOrder | null;
21
- paymentWaitingMessage: string | null;
30
+ daimoPayOrder: DaimoPayOrder | undefined;
31
+ modalOptions: DaimoPayModalOptions;
32
+ setModalOptions: import("react").Dispatch<import("react").SetStateAction<DaimoPayModalOptions>>;
33
+ paymentWaitingMessage: string | undefined;
22
34
  selectedExternalOption: ExternalPaymentOptionMetadata | undefined;
23
35
  selectedTokenOption: any;
24
36
  setSelectedExternalOption: import("react").Dispatch<import("react").SetStateAction<ExternalPaymentOptionMetadata | undefined>>;
@@ -27,4 +39,8 @@ export declare function getPaymentInfo(log: (...args: any[]) => void): {
27
39
  payWithToken: (tokenAmount: DaimoPayTokenAmount) => Promise<void>;
28
40
  payWithExternal: (option: ExternalPaymentOptions) => Promise<any>;
29
41
  refreshOrder: () => Promise<void>;
42
+ onSuccess: ({ txHash, txURL }: {
43
+ txHash: string;
44
+ txURL?: string;
45
+ }) => void;
30
46
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@daimo/pay",
3
3
  "private": false,
4
- "version": "0.3.6",
4
+ "version": "0.3.7",
5
5
  "author": "Daimo",
6
6
  "homepage": "https://pay.daimo.com",
7
7
  "license": "BSD-2-Clause license",