@daimo/pay 0.3.6 → 0.3.8

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.8";
2168
2181
  var author = "Daimo";
2169
2182
  var homepage = "https://pay.daimo.com";
2170
2183
  var license = "BSD-2-Clause license";
@@ -6950,7 +6963,11 @@ const CoinLogos = ({ $size = 24 }) => {
6950
6963
  const InputUnderlineField = ({ value, onChange, onBlur, onKeyDown, }) => {
6951
6964
  // subtract width for decimal point if necessary
6952
6965
  const width = value.length - 0.5 * (value.includes(".") ? 1 : 0) + "ch";
6953
- return (jsxs("div", { style: { width: "auto", position: "relative" }, children: [jsx(InputField, { "$width": width, type: "text", pattern: "\\d*.\\d{2}", value: value, onChange: onChange, onBlur: onBlur, onKeyDown: onKeyDown, autoFocus: true }), jsx(Underline, {})] }));
6966
+ const selectAll = (e) => {
6967
+ // When entering edit mode, select the amount for quicker editing
6968
+ setTimeout(() => e.target.select(), 100);
6969
+ };
6970
+ return (jsxs("div", { style: { width: "auto", position: "relative" }, children: [jsx(InputField, { "$width": width, type: "text", pattern: "\\d*.\\d{2}", value: value, onChange: onChange, onBlur: onBlur, onFocus: selectAll, onKeyDown: onKeyDown, autoFocus: true }), jsx(Underline, {})] }));
6954
6971
  };
6955
6972
  const InputField = styled(motion.input) `
6956
6973
  box-sizing: border-box;
@@ -6979,14 +6996,15 @@ const Underline = styled(motion.div) `
6979
6996
  `;
6980
6997
  const OrderHeader = ({ minified = false }) => {
6981
6998
  const { paymentInfo } = useContext();
6982
- const price = paymentInfo.daimoPayOrder?.destFinalCallTokenAmount.usd.toFixed(2);
6999
+ const amount = paymentInfo.daimoPayOrder?.destFinalCallTokenAmount.usd.toFixed(2);
6983
7000
  const isEditable = paymentInfo.daimoPayOrder?.mode === DaimoPayOrderMode.CHOOSE_AMOUNT;
6984
- const [editablePrice, setEditablePrice] = useState(price ?? "");
6985
- const [isEditing, setIsEditing] = useState(false);
7001
+ const [editableAmount, setEditableAmount] = useState(amount ?? "");
7002
+ // Start out in edit mode immediately if amount = 0.
7003
+ const [isEditing, setIsEditing] = useState(amount === "0.00");
6986
7004
  const handleSave = () => {
6987
7005
  if (!isEditing)
6988
7006
  return;
6989
- paymentInfo.setChosenUsd(Number(editablePrice));
7007
+ paymentInfo.setChosenUsd(Number(editableAmount));
6990
7008
  setIsEditing(false);
6991
7009
  };
6992
7010
  const handleKeyDown = (e) => {
@@ -6994,20 +7012,20 @@ const OrderHeader = ({ minified = false }) => {
6994
7012
  handleSave();
6995
7013
  }
6996
7014
  };
6997
- const sanitizeAndSetPrice = (price) => {
6998
- if (!price.match(/^[0-9]*(\.[0-9]{0,2})?$/)) {
7015
+ const sanitizeAndSetAmount = (amount) => {
7016
+ if (!amount.match(/^[0-9]*(\.[0-9]{0,2})?$/)) {
6999
7017
  return;
7000
7018
  }
7001
7019
  const [digitsBeforeDecimal, digitsAfterDecimal] = (() => {
7002
- if (price.includes("."))
7003
- return price.split(".");
7020
+ if (amount.includes("."))
7021
+ return amount.split(".");
7004
7022
  else
7005
- return [price, ""];
7023
+ return [amount, ""];
7006
7024
  })();
7007
7025
  if (digitsBeforeDecimal.length > 5 || digitsAfterDecimal.length > 2) {
7008
7026
  return;
7009
7027
  }
7010
- setEditablePrice(price);
7028
+ setEditableAmount(amount);
7011
7029
  };
7012
7030
  const titleAmountContent = (() => {
7013
7031
  const buttonStyles = (() => {
@@ -7028,7 +7046,7 @@ const OrderHeader = ({ minified = false }) => {
7028
7046
  fontSize: "20px",
7029
7047
  };
7030
7048
  })();
7031
- return (jsxs(Fragment, { children: [isEditable && !minified && (jsx("div", { style: { width: buttonStyles.width, height: buttonStyles.height } })), !isEditing ? (jsxs("span", { children: ["$", price] })) : (jsxs("div", { style: { display: "flex" }, children: ["$", jsx(InputUnderlineField, { value: editablePrice, onChange: (e) => sanitizeAndSetPrice(e.target.value), onBlur: (e) => {
7049
+ return (jsxs(Fragment, { children: [isEditable && !minified && (jsx("div", { style: { width: buttonStyles.width, height: buttonStyles.height } })), !isEditing ? (jsxs("span", { children: ["$", amount] })) : (jsxs("div", { style: { display: "flex" }, children: ["$", jsx(InputUnderlineField, { value: editableAmount, onChange: (e) => sanitizeAndSetAmount(e.target.value), onBlur: (e) => {
7032
7050
  if (!e.relatedTarget) {
7033
7051
  setIsEditing(false);
7034
7052
  }
@@ -10038,26 +10056,27 @@ const Confirmation = () => {
10038
10056
  }, 300);
10039
10057
  return () => clearInterval(interval);
10040
10058
  }, [refreshOrder]);
10041
- const { done, txURL, currency } = (() => {
10059
+ const { done, txURL } = (() => {
10042
10060
  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) {
10061
+ // Frontends are optimistic, assume submits will be successful
10062
+ const { destStatus } = daimoPayOrder;
10063
+ if (destStatus === DaimoPayOrderStatusDest.FAST_FINISH_SUBMITTED ||
10064
+ destStatus === DaimoPayOrderStatusDest.FAST_FINISHED ||
10065
+ destStatus === DaimoPayOrderStatusDest.CLAIM_SUCCESSFUL) {
10047
10066
  const txHash = daimoPayOrder.destFastFinishTxHash ?? daimoPayOrder.destClaimTxHash;
10048
10067
  const chainId = daimoPayOrder.destFinalCallTokenAmount.token.chainId;
10049
- const currency = `${capitalize(getChainName(chainId))} ${daimoPayOrder.destFinalCallTokenAmount.token.symbol}`;
10068
+ assert(txHash != null, `Dest ${destStatus}, but missing txHash`);
10069
+ const txURL = getChainExplorerTxUrl(chainId, txHash);
10070
+ paymentInfo.onSuccess({ txHash, txURL });
10050
10071
  return {
10051
10072
  done: true,
10052
- txURL: txHash ? getChainExplorerTxUrl(chainId, txHash) : undefined,
10053
- currency,
10073
+ txURL,
10054
10074
  };
10055
10075
  }
10056
10076
  }
10057
10077
  return {
10058
10078
  done: false,
10059
10079
  txURL: undefined,
10060
- currency: undefined,
10061
10080
  };
10062
10081
  })();
10063
10082
  return (jsx(PageContent, { style: {
@@ -10069,7 +10088,7 @@ const Confirmation = () => {
10069
10088
  justifyContent: "center",
10070
10089
  alignItems: "center",
10071
10090
  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, {})] }) }));
10091
+ }, 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
10092
  };
10074
10093
  const AnimationContainer$2 = styled(motion.div) `
10075
10094
  position: relative;
@@ -10607,7 +10626,7 @@ const SelectMethod = () => {
10607
10626
  setLoadingExternalPaymentOptions(false);
10608
10627
  };
10609
10628
  const usd = daimoPayOrder?.destFinalCallTokenAmount.usd;
10610
- if (usd) {
10629
+ if (usd != null) {
10611
10630
  refreshExternalPaymentOptions(usd);
10612
10631
  }
10613
10632
  }, [daimoPayOrder?.destFinalCallTokenAmount.usd]);
@@ -10766,7 +10785,7 @@ const AnimationContainer = styled(motion.div) `
10766
10785
  `;
10767
10786
 
10768
10787
  const customThemeDefault = {};
10769
- const ConnectModal = ({ mode = "auto", theme = "auto", customTheme = customThemeDefault, lang = "en-US", }) => {
10788
+ const DaimoPayModal = ({ mode = "auto", theme = "auto", customTheme = customThemeDefault, lang = "en-US", }) => {
10770
10789
  const context = useContext();
10771
10790
  const { setSelectedExternalOption, setSelectedTokenOption } = context.paymentInfo;
10772
10791
  const { isConnected, chain } = useAccount();
@@ -10924,6 +10943,7 @@ const DaimoPayProvider = ({ children, theme = "auto", mode = "auto", customTheme
10924
10943
  enforceSupportedChains: false,
10925
10944
  ethereumOnboardingUrl: undefined,
10926
10945
  walletOnboardingUrl: undefined,
10946
+ overlayBlur: undefined,
10927
10947
  };
10928
10948
  const opts = Object.assign({}, defaultOptions, options);
10929
10949
  if (typeof window !== "undefined") {
@@ -10972,9 +10992,11 @@ const DaimoPayProvider = ({ children, theme = "auto", mode = "auto", customTheme
10972
10992
  }
10973
10993
  }, [injectedConnector]);
10974
10994
  const log = debugMode ? console.log : () => { };
10975
- const paymentInfo = getPaymentInfo(log);
10976
- const loadPayment = async (payId) => {
10995
+ const paymentInfo = getPaymentInfo(setOpen, log);
10996
+ const loadAndShowPayment = async (payId, modalOptions) => {
10997
+ log(`[PAY] showing order ${payId}, options ${debugJson(modalOptions)}`);
10977
10998
  await paymentInfo.setPayId(payId);
10999
+ paymentInfo.setModalOptions(modalOptions);
10978
11000
  const daimoPayOrder = paymentInfo.daimoPayOrder;
10979
11001
  if (daimoPayOrder &&
10980
11002
  daimoPayOrder.mode === DaimoPayOrderMode.HYDRATED &&
@@ -10984,6 +11006,7 @@ const DaimoPayProvider = ({ children, theme = "auto", mode = "auto", customTheme
10984
11006
  else {
10985
11007
  setRoute(ROUTES.SELECT_METHOD);
10986
11008
  }
11009
+ setOpen(true);
10987
11010
  };
10988
11011
  const value = {
10989
11012
  theme: ckTheme,
@@ -10998,7 +11021,7 @@ const DaimoPayProvider = ({ children, theme = "auto", mode = "auto", customTheme
10998
11021
  setOpen,
10999
11022
  route,
11000
11023
  setRoute,
11001
- loadPayment,
11024
+ loadAndShowPayment,
11002
11025
  connector,
11003
11026
  setConnector,
11004
11027
  onConnect,
@@ -11019,7 +11042,7 @@ const DaimoPayProvider = ({ children, theme = "auto", mode = "auto", customTheme
11019
11042
  triggerResize: () => onResize((prev) => prev + 1),
11020
11043
  paymentInfo,
11021
11044
  };
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 })] }) }));
11045
+ 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
11046
  };
11024
11047
  const useContext = () => {
11025
11048
  const context = React.useContext(Context);
@@ -11028,41 +11051,6 @@ const useContext = () => {
11028
11051
  return context;
11029
11052
  };
11030
11053
 
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
11054
  const TextContainer = styled(motion.div) `
11067
11055
  top: 0;
11068
11056
  bottom: 0;
@@ -11299,28 +11287,23 @@ const contentVariants = {
11299
11287
  },
11300
11288
  },
11301
11289
  };
11302
- const DaimoPayButtonRenderer = ({ payId, children, }) => {
11290
+ const DaimoPayButtonRenderer = ({ payId, closeOnSuccess, children, }) => {
11303
11291
  const isMounted = useIsMounted();
11304
11292
  const context = useContext();
11305
- const { open, setOpen } = useModal();
11306
- const { address, isConnected, chain } = useAccount();
11293
+ const { address, chain } = useAccount();
11307
11294
  const isChainSupported = useChainIsSupported(chain?.id);
11308
11295
  const { data: ensName } = useEnsName({
11309
11296
  chainId: 1,
11310
11297
  address: address,
11311
11298
  });
11312
- function hide() {
11313
- setOpen(false);
11314
- }
11315
11299
  // Pre-load payment info in background.
11316
11300
  const { setPayId } = context.paymentInfo;
11317
11301
  useEffect(() => {
11318
11302
  setPayId(payId);
11319
11303
  }, [payId]);
11320
- async function show() {
11321
- await context.loadPayment(payId); // ensure payment info is loaded before opening.
11322
- context.setOpen(true);
11323
- }
11304
+ const hide = () => context.setOpen(false);
11305
+ const modalOptions = { closeOnSuccess };
11306
+ const show = () => context.loadAndShowPayment(payId, modalOptions);
11324
11307
  if (!children)
11325
11308
  return null;
11326
11309
  if (!isMounted)
@@ -11332,7 +11315,7 @@ const DaimoPayButtonRenderer = ({ payId, children, }) => {
11332
11315
  chain: chain,
11333
11316
  unsupported: !isChainSupported,
11334
11317
  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
11318
+ isConnecting: context.open,
11336
11319
  address: address,
11337
11320
  truncatedAddress: address ? truncateEthAddress(address) : undefined,
11338
11321
  ensName: ensName?.toString(),
@@ -11341,17 +11324,12 @@ const DaimoPayButtonRenderer = ({ payId, children, }) => {
11341
11324
  DaimoPayButtonRenderer.displayName = "DaimoPayButton.Custom";
11342
11325
  function DaimoPayButtonInner() {
11343
11326
  const { paymentInfo } = useContext();
11344
- const label = paymentInfo?.daimoPayOrder?.metadata.intent ?? "Pay";
11327
+ const label = paymentInfo?.daimoPayOrder?.metadata?.intent ?? "Pay";
11345
11328
  return (jsx(AnimatePresence, { initial: false, children: jsx(TextContainer, { initial: "initial", animate: "animate", exit: "exit", variants: contentVariants, style: {
11346
11329
  height: 40,
11347
- //padding: '0 5px',
11348
11330
  }, children: label }, "connectWalletText") }));
11349
11331
  }
11350
- function DaimoPayButton({ payId,
11351
- // Theming
11352
- theme, mode, customTheme,
11353
- // Events
11354
- onClick, }) {
11332
+ function DaimoPayButton({ payId, theme, mode, customTheme, closeOnSuccess, onClick, }) {
11355
11333
  const isMounted = useIsMounted();
11356
11334
  const context = useContext();
11357
11335
  // Pre-load payment info in background.
@@ -11359,10 +11337,8 @@ onClick, }) {
11359
11337
  useEffect(() => {
11360
11338
  setPayId(payId);
11361
11339
  }, [payId]);
11362
- async function show() {
11363
- await context.loadPayment(payId); // ensure payment info is loaded
11364
- context.setOpen(true);
11365
- }
11340
+ const modalOptions = { closeOnSuccess };
11341
+ const show = () => context.loadAndShowPayment(payId, modalOptions);
11366
11342
  if (!isMounted)
11367
11343
  return null;
11368
11344
  return (jsx(ResetContainer, { "$useTheme": theme ?? context.theme, "$useMode": mode ?? context.mode, "$customTheme": customTheme ?? context.customTheme, children: jsx(ThemeContainer, { onClick: () => {
@@ -11376,6 +11352,41 @@ onClick, }) {
11376
11352
  }
11377
11353
  DaimoPayButton.Custom = DaimoPayButtonRenderer;
11378
11354
 
11355
+ const useModal = ({ onConnect, onDisconnect } = {}) => {
11356
+ const context = useContext();
11357
+ useConnectCallback({
11358
+ onConnect,
11359
+ onDisconnect,
11360
+ });
11361
+ const close = () => {
11362
+ context.setOpen(false);
11363
+ };
11364
+ const open = () => {
11365
+ context.setOpen(true);
11366
+ };
11367
+ const gotoAndOpen = (route) => {
11368
+ context.setRoute(route);
11369
+ open();
11370
+ };
11371
+ return {
11372
+ open: context.open,
11373
+ setOpen: (show) => {
11374
+ if (show) {
11375
+ gotoAndOpen(ROUTES.SELECT_METHOD);
11376
+ }
11377
+ else {
11378
+ close();
11379
+ }
11380
+ },
11381
+ // Disconnected Routes
11382
+ openAbout: () => gotoAndOpen(ROUTES.ABOUT),
11383
+ openOnboarding: () => gotoAndOpen(ROUTES.ONBOARDING),
11384
+ // Connected Routes
11385
+ openProfile: () => gotoAndOpen(ROUTES.PROFILE),
11386
+ openSwitchNetworks: () => gotoAndOpen(ROUTES.SWITCHNETWORKS),
11387
+ };
11388
+ };
11389
+
11379
11390
  function useDaimoPayStatus() {
11380
11391
  const { paymentInfo } = useContext();
11381
11392
  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.8",
5
5
  "author": "Daimo",
6
6
  "homepage": "https://pay.daimo.com",
7
7
  "license": "BSD-2-Clause license",