@daimo/pay 0.3.9 → 0.3.12
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 +127 -77
- package/build/index.es.js.map +1 -1
- package/build/packages/paykit/packages/connectkit/src/components/DaimoPay.d.ts +1 -1
- package/build/packages/paykit/packages/connectkit/src/hooks/useExternalPaymentOptions.d.ts +9 -0
- package/build/packages/paykit/packages/connectkit/src/{utils/getPaymentInfo.d.ts → hooks/usePaymentInfo.d.ts} +10 -25
- package/build/packages/paykit/packages/connectkit/src/hooks/useWalletPaymentOptions.d.ts +11 -0
- package/package.json +3 -3
- package/build/packages/paykit/packages/connectkit/src/components/ConnectModal/ConnectUsing.d.ts +0 -2
- package/build/packages/paykit/packages/connectkit/src/components/ConnectModal/ConnectWithInjector/index.d.ts +0 -15
- package/build/packages/paykit/packages/connectkit/src/components/ConnectModal/ConnectWithInjector/styles.d.ts +0 -6
- package/build/packages/paykit/packages/connectkit/src/components/ConnectModal/ConnectWithQRCode.d.ts +0 -5
- package/build/packages/paykit/packages/connectkit/src/components/ConnectModal/index.d.ts +0 -8
package/build/index.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { http, useConfig, useAccountEffect, useConnectors as useConnectors$1, useAccount, useWriteContract, useSendTransaction, useSwitchChain, useConnect as useConnect$1, createConfig, useEnsAddress,
|
|
2
|
-
import { mainnet, base as base$1, polygon, optimism, arbitrum, linea, sepolia, baseSepolia } from 'wagmi/chains';
|
|
1
|
+
import { http, useConfig, useAccountEffect, useConnectors as useConnectors$1, useAccount, useEnsName, useWriteContract, useSendTransaction, useSwitchChain, useConnect as useConnect$1, createConfig, useEnsAddress, useEnsAvatar, useDisconnect, useBalance, useChainId, WagmiContext } from 'wagmi';
|
|
2
|
+
import { mainnet, base as base$1, polygon, optimism, arbitrum, linea, bsc, sepolia, baseSepolia } from 'wagmi/chains';
|
|
3
3
|
import { safe, injected, coinbaseWallet, walletConnect } from '@wagmi/connectors';
|
|
4
4
|
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,
|
|
8
|
+
import { ExternalPaymentOptions, readDaimoPayOrderID, assert, assertNotNull, DaimoPayOrderMode, DaimoPayOrderStatusDest, getAddressContraction, capitalize, getDisplayPrice, DaimoPayOrderStatusSource, DaimoPayIntentStatus, retryBackoff, debugJson, writeDaimoPayOrderID } from '@daimo/common';
|
|
9
9
|
import styled$1, { css, keyframes, ThemeProvider } from 'styled-components';
|
|
10
|
-
import { erc20Abi, getChainName,
|
|
10
|
+
import { ethereum, erc20Abi, getChainName, arbitrum as arbitrum$1, base as base$2, optimism as optimism$1, polygon as polygon$1, ethereumSepolia, baseSepolia as baseSepolia$1, linea as linea$1, bsc as bsc$1, getChainExplorerTxUrl } from '@daimo/contract';
|
|
11
11
|
import { zeroAddress, parseUnits } from 'viem';
|
|
12
12
|
import { createTRPCClient, httpBatchLink } from '@trpc/client';
|
|
13
13
|
import { motion, AnimatePresence, MotionConfig } from 'framer-motion';
|
|
@@ -70,6 +70,7 @@ const REQUIRED_CHAINS = [
|
|
|
70
70
|
optimism,
|
|
71
71
|
arbitrum,
|
|
72
72
|
linea,
|
|
73
|
+
bsc,
|
|
73
74
|
sepolia,
|
|
74
75
|
baseSepolia,
|
|
75
76
|
];
|
|
@@ -900,9 +901,93 @@ const trpc = createTRPCClient({
|
|
|
900
901
|
],
|
|
901
902
|
});
|
|
902
903
|
|
|
903
|
-
|
|
904
|
+
const DEFAULT_EXTERNAL_PAYMENT_OPTIONS = [
|
|
905
|
+
ExternalPaymentOptions.Coinbase,
|
|
906
|
+
ExternalPaymentOptions.Binance,
|
|
907
|
+
ExternalPaymentOptions.Daimo,
|
|
908
|
+
ExternalPaymentOptions.RampNetwork,
|
|
909
|
+
];
|
|
910
|
+
function useExternalPaymentOptions({ filterIds, usdRequired, platform, }) {
|
|
911
|
+
const [options, setOptions] = useState([]);
|
|
912
|
+
const [loading, setLoading] = useState(false);
|
|
913
|
+
useEffect(() => {
|
|
914
|
+
const refreshExternalPaymentOptions = async (usd) => {
|
|
915
|
+
if (!platform)
|
|
916
|
+
return;
|
|
917
|
+
setLoading(true);
|
|
918
|
+
try {
|
|
919
|
+
const newOptions = await trpc.getExternalPaymentOptions.query({
|
|
920
|
+
usdRequired: usd,
|
|
921
|
+
platform,
|
|
922
|
+
});
|
|
923
|
+
// Filter out options not in options JSON
|
|
924
|
+
const enabledExtPaymentOptions = filterIds || DEFAULT_EXTERNAL_PAYMENT_OPTIONS;
|
|
925
|
+
const filteredOptions = newOptions.filter((option) => enabledExtPaymentOptions.includes(option.id));
|
|
926
|
+
setOptions(filteredOptions);
|
|
927
|
+
}
|
|
928
|
+
catch (error) {
|
|
929
|
+
console.error(error);
|
|
930
|
+
}
|
|
931
|
+
finally {
|
|
932
|
+
setLoading(false);
|
|
933
|
+
}
|
|
934
|
+
};
|
|
935
|
+
if (usdRequired != null) {
|
|
936
|
+
refreshExternalPaymentOptions(usdRequired);
|
|
937
|
+
}
|
|
938
|
+
}, [usdRequired, filterIds, platform]);
|
|
939
|
+
return {
|
|
940
|
+
options,
|
|
941
|
+
loading,
|
|
942
|
+
};
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
function useWalletPaymentOptions({ address, usdRequired, destChainId, }) {
|
|
946
|
+
const [options, setOptions] = useState(null);
|
|
947
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
948
|
+
useEffect(() => {
|
|
949
|
+
const refreshWalletPaymentOptions = async () => {
|
|
950
|
+
setOptions(null);
|
|
951
|
+
setIsLoading(true);
|
|
952
|
+
try {
|
|
953
|
+
const newOptions = await trpc.getWalletPaymentOptions.query({
|
|
954
|
+
payerAddress: address,
|
|
955
|
+
usdRequired,
|
|
956
|
+
destChainId,
|
|
957
|
+
});
|
|
958
|
+
setOptions(newOptions);
|
|
959
|
+
}
|
|
960
|
+
catch (error) {
|
|
961
|
+
console.error(error);
|
|
962
|
+
}
|
|
963
|
+
finally {
|
|
964
|
+
setIsLoading(false);
|
|
965
|
+
}
|
|
966
|
+
};
|
|
967
|
+
if (!address || !usdRequired || !destChainId)
|
|
968
|
+
return;
|
|
969
|
+
if (address && usdRequired != null && destChainId) {
|
|
970
|
+
refreshWalletPaymentOptions();
|
|
971
|
+
}
|
|
972
|
+
}, [address, usdRequired, destChainId]);
|
|
973
|
+
return {
|
|
974
|
+
options,
|
|
975
|
+
isLoading,
|
|
976
|
+
};
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
function usePaymentInfo({ daimoPayOrder, setDaimoPayOrder, setOpen, log, }) {
|
|
980
|
+
// Browser state.
|
|
981
|
+
const [platform, setPlatform] = useState();
|
|
982
|
+
useEffect(() => {
|
|
983
|
+
setPlatform(detectPlatform(window.navigator.userAgent));
|
|
984
|
+
}, []);
|
|
904
985
|
// Wallet state.
|
|
905
986
|
const { address: senderAddr } = useAccount();
|
|
987
|
+
const { data: senderEnsName } = useEnsName({
|
|
988
|
+
chainId: ethereum.chainId,
|
|
989
|
+
address: senderAddr,
|
|
990
|
+
});
|
|
906
991
|
const { writeContractAsync } = useWriteContract();
|
|
907
992
|
const { sendTransactionAsync } = useSendTransaction();
|
|
908
993
|
// Daimo Pay order state.
|
|
@@ -910,14 +995,24 @@ function getPaymentInfo({ daimoPayOrder, setDaimoPayOrder, setOpen, log, }) {
|
|
|
910
995
|
// Payment UI config.
|
|
911
996
|
const [modalOptions, setModalOptions] = useState({});
|
|
912
997
|
// UI state. Selection for external payment (Binance, etc) vs wallet payment.
|
|
998
|
+
const externalPaymentOptions = useExternalPaymentOptions({
|
|
999
|
+
filterIds: daimoPayOrder?.metadata.payer?.paymentOptions,
|
|
1000
|
+
usdRequired: daimoPayOrder?.destFinalCallTokenAmount.usd,
|
|
1001
|
+
platform,
|
|
1002
|
+
});
|
|
1003
|
+
const walletPaymentOptions = useWalletPaymentOptions({
|
|
1004
|
+
address: senderAddr,
|
|
1005
|
+
usdRequired: daimoPayOrder?.destFinalCallTokenAmount.usd,
|
|
1006
|
+
destChainId: daimoPayOrder?.destFinalCallTokenAmount.token.chainId,
|
|
1007
|
+
});
|
|
913
1008
|
const [selectedExternalOption, setSelectedExternalOption] = useState();
|
|
914
1009
|
const [selectedTokenOption, setSelectedTokenOption] = useState();
|
|
915
1010
|
const payWithToken = async (tokenAmount) => {
|
|
916
|
-
assert(!!daimoPayOrder);
|
|
1011
|
+
assert(!!daimoPayOrder && !!platform);
|
|
917
1012
|
const { hydratedOrder } = await trpc.hydrateOrder.query({
|
|
918
1013
|
id: daimoPayOrder.id.toString(),
|
|
919
1014
|
chosenFinalTokenAmount: daimoPayOrder.destFinalCallTokenAmount.amount,
|
|
920
|
-
platform
|
|
1015
|
+
platform,
|
|
921
1016
|
refundAddress: senderAddr,
|
|
922
1017
|
});
|
|
923
1018
|
log(`[CHECKOUT] Hydrated order: ${JSON.stringify(hydratedOrder)}, checking out with ${tokenAmount.token.token}`);
|
|
@@ -925,7 +1020,7 @@ function getPaymentInfo({ daimoPayOrder, setDaimoPayOrder, setOpen, log, }) {
|
|
|
925
1020
|
try {
|
|
926
1021
|
if (tokenAmount.token.token === zeroAddress) {
|
|
927
1022
|
return await sendTransactionAsync({
|
|
928
|
-
to: hydratedOrder.
|
|
1023
|
+
to: hydratedOrder.intentAddr,
|
|
929
1024
|
value: BigInt(tokenAmount.amount),
|
|
930
1025
|
});
|
|
931
1026
|
}
|
|
@@ -934,7 +1029,7 @@ function getPaymentInfo({ daimoPayOrder, setDaimoPayOrder, setOpen, log, }) {
|
|
|
934
1029
|
abi: erc20Abi,
|
|
935
1030
|
address: tokenAmount.token.token,
|
|
936
1031
|
functionName: "transfer",
|
|
937
|
-
args: [hydratedOrder.
|
|
1032
|
+
args: [hydratedOrder.intentAddr, BigInt(tokenAmount.amount)],
|
|
938
1033
|
});
|
|
939
1034
|
}
|
|
940
1035
|
}
|
|
@@ -959,12 +1054,12 @@ function getPaymentInfo({ daimoPayOrder, setDaimoPayOrder, setOpen, log, }) {
|
|
|
959
1054
|
}
|
|
960
1055
|
};
|
|
961
1056
|
const payWithExternal = async (option) => {
|
|
962
|
-
assert(!!daimoPayOrder);
|
|
1057
|
+
assert(!!daimoPayOrder && !!platform);
|
|
963
1058
|
const { hydratedOrder, externalPaymentOptionData } = await trpc.hydrateOrder.query({
|
|
964
1059
|
id: daimoPayOrder.id.toString(),
|
|
965
1060
|
externalPaymentOption: option,
|
|
966
1061
|
chosenFinalTokenAmount: daimoPayOrder.destFinalCallTokenAmount.amount,
|
|
967
|
-
platform
|
|
1062
|
+
platform,
|
|
968
1063
|
});
|
|
969
1064
|
assert(!!externalPaymentOptionData);
|
|
970
1065
|
setPaymentWaitingMessage(externalPaymentOptionData.waitingMessage);
|
|
@@ -1025,6 +1120,8 @@ function getPaymentInfo({ daimoPayOrder, setDaimoPayOrder, setOpen, log, }) {
|
|
|
1025
1120
|
paymentWaitingMessage,
|
|
1026
1121
|
selectedExternalOption,
|
|
1027
1122
|
selectedTokenOption,
|
|
1123
|
+
externalPaymentOptions,
|
|
1124
|
+
walletPaymentOptions,
|
|
1028
1125
|
setSelectedExternalOption,
|
|
1029
1126
|
setSelectedTokenOption,
|
|
1030
1127
|
setChosenUsd,
|
|
@@ -1032,6 +1129,7 @@ function getPaymentInfo({ daimoPayOrder, setDaimoPayOrder, setOpen, log, }) {
|
|
|
1032
1129
|
payWithExternal,
|
|
1033
1130
|
refreshOrder,
|
|
1034
1131
|
onSuccess,
|
|
1132
|
+
senderEnsName: senderEnsName ?? undefined,
|
|
1035
1133
|
};
|
|
1036
1134
|
}
|
|
1037
1135
|
|
|
@@ -2176,7 +2274,7 @@ const ResetContainer = styled(motion.div) `
|
|
|
2176
2274
|
`;
|
|
2177
2275
|
|
|
2178
2276
|
var name = "@daimo/pay";
|
|
2179
|
-
var version = "0.3.
|
|
2277
|
+
var version = "0.3.12";
|
|
2180
2278
|
var author = "Daimo";
|
|
2181
2279
|
var homepage = "https://pay.daimo.com";
|
|
2182
2280
|
var license = "BSD-2-Clause license";
|
|
@@ -2215,8 +2313,8 @@ var keywords = [
|
|
|
2215
2313
|
"crypto"
|
|
2216
2314
|
];
|
|
2217
2315
|
var dependencies = {
|
|
2218
|
-
"@daimo/common": "0.3.
|
|
2219
|
-
"@daimo/contract": "0.3.
|
|
2316
|
+
"@daimo/common": "0.3.11",
|
|
2317
|
+
"@daimo/contract": "0.3.11",
|
|
2220
2318
|
"@trpc/client": "^11.0.0-next-beta.318",
|
|
2221
2319
|
"@trpc/server": "^11.0.0-next-beta.318",
|
|
2222
2320
|
buffer: "^6.0.3",
|
|
@@ -6869,11 +6967,7 @@ const Evmos = ({ testnet, ...props }) => (jsx("svg", { ...props, "aria-hidden":
|
|
|
6869
6967
|
? "linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)"
|
|
6870
6968
|
: "#2D2A25",
|
|
6871
6969
|
}, children: jsx("path", { d: "M18.4916 12.6668C12.9416 14.806 12.4332 20.2846 10.8418 22.8432C9.23155 25.4322 5.54251 26.8607 6.04698 28.1801C6.55143 29.4994 10.2449 28.0824 13.1669 28.9242C16.0543 29.7561 20.0831 33.4862 25.633 31.3469C28.4603 30.2573 30.5076 28.0143 31.449 25.3574C31.5502 25.0723 31.361 24.7673 31.0606 24.7391C30.874 24.7215 30.6948 24.8196 30.6106 24.9877C29.759 26.6908 28.2981 28.0934 26.3864 28.8301C23.2303 30.0465 19.777 29.0915 17.6562 26.6961C17.1746 26.1522 16.7626 25.533 16.4374 24.8487C16.348 24.6603 16.2629 24.4689 16.1875 24.2708C16.1117 24.0728 16.0473 23.8735 15.9881 23.6732C17.6562 22.8925 19.5812 22.0656 21.7635 21.2246C23.903 20.3999 25.8505 19.731 27.5841 19.1958C28.7571 18.8341 29.8322 18.5331 30.8029 18.2871C30.8732 18.2695 30.9423 18.2519 31.0112 18.2347C31.158 18.1982 31.3088 18.2769 31.363 18.4186L31.364 18.4213C31.396 18.5053 31.4236 18.5898 31.4535 18.6743C31.6453 19.2196 31.7892 19.7706 31.8841 20.3229C31.9258 20.5645 32.1888 20.6961 32.4044 20.5799C33.2014 20.1504 33.9302 19.7314 34.5814 19.3283C37.0083 17.8276 38.3538 16.5549 38.0776 15.8336C37.802 15.1119 35.9541 15.0705 33.1503 15.5854C32.2593 15.7491 31.2716 15.9691 30.207 16.2416C30.0229 16.2886 29.8365 16.3375 29.6481 16.3877C28.7522 16.6262 27.8073 16.8995 26.8234 17.2053C24.9936 17.7744 23.0305 18.4561 21.0038 19.2372C19.1078 19.9682 17.3109 20.726 15.6629 21.4812C15.6428 18.2761 17.5725 15.2461 20.7286 14.0297C22.6399 13.293 24.6605 13.3533 26.4285 14.0473C26.6029 14.116 26.8015 14.0684 26.9291 13.9298C27.1331 13.7076 27.0706 13.3537 26.8053 13.2094C24.3353 11.8685 21.319 11.5771 18.4916 12.6668Z", fill: "#FAF1E4" }) }));
|
|
6872
|
-
const BinanceSmartChain = ({ testnet, ...props }) => (
|
|
6873
|
-
background: testnet
|
|
6874
|
-
? "linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)"
|
|
6875
|
-
: "#16181A",
|
|
6876
|
-
}, children: [jsx("path", { d: "M16.0445 19.6063L21.8705 13.7805L27.6996 19.6093L31.0896 16.2193L21.8705 7L12.6545 16.2163L16.0445 19.6063Z", fill: testnet ? "#fff" : "#F3BA2F" }), jsx("path", { d: "M13.6505 21.9995L10.2606 18.6096L6.87046 21.9997L10.2604 25.3896L13.6505 21.9995Z", fill: testnet ? "#fff" : "#F3BA2F" }), jsx("path", { d: "M16.0445 24.3937L21.8705 30.2195L27.6994 24.3909L31.0913 27.779L31.0896 27.7809L21.8705 37L12.6542 27.7839L12.6495 27.7792L16.0445 24.3937Z", fill: testnet ? "#fff" : "#F3BA2F" }), jsx("path", { d: "M33.4808 25.3911L36.8709 22.001L33.481 18.6111L30.0909 22.0012L33.4808 25.3911Z", fill: testnet ? "#fff" : "#F3BA2F" }), jsx("path", { d: "M25.3091 21.9982H25.3105L21.8705 18.5582L19.3283 21.1004H19.3281L19.0362 21.3926L18.4336 21.9951L18.4289 21.9999L18.4336 22.0048L21.8705 25.4418L25.3105 22.0018L25.3122 21.9999L25.3091 21.9982Z", fill: testnet ? "#fff" : "#F3BA2F" })] }));
|
|
6970
|
+
const BinanceSmartChain = ({ testnet, ...props }) => (jsx("svg", { ...props, "aria-hidden": "true", width: "44", height: "44", version: "1.1", fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 2496 2496", children: jsxs("g", { children: [jsx("path", { style: { fillRule: "evenodd", clipRule: "evenodd", fill: "#F0B90B" }, d: "M1248,0c689.3,0,1248,558.7,1248,1248s-558.7,1248-1248,1248\n\t\tS0,1937.3,0,1248S558.7,0,1248,0L1248,0z" }), jsx("path", { style: { fill: "#FFFFFF" }, d: "M685.9,1248l0.9,330l280.4,165v193.2l-444.5-260.7v-524L685.9,1248L685.9,1248z M685.9,918v192.3\n\t\tl-163.3-96.6V821.4l163.3-96.6l164.1,96.6L685.9,918L685.9,918z M1084.3,821.4l163.3-96.6l164.1,96.6L1247.6,918L1084.3,821.4\n\t\tL1084.3,821.4z" }), jsx("path", { style: { fill: "#FFFFFF" }, d: "M803.9,1509.6v-193.2l163.3,96.6v192.3L803.9,1509.6L803.9,1509.6z M1084.3,1812.2l163.3,96.6\n\t\tl164.1-96.6v192.3l-164.1,96.6l-163.3-96.6V1812.2L1084.3,1812.2z M1645.9,821.4l163.3-96.6l164.1,96.6v192.3l-164.1,96.6V918\n\t\tL1645.9,821.4L1645.9,821.4L1645.9,821.4z M1809.2,1578l0.9-330l163.3-96.6v524l-444.5,260.7v-193.2L1809.2,1578L1809.2,1578\n\t\tL1809.2,1578z" }), jsx("polygon", { style: { fill: "#FFFFFF" }, points: "1692.1,1509.6 1528.8,1605.3 1528.8,1413 1692.1,1316.4 1692.1,1509.6 \t" }), jsx("path", { style: { fill: "#FFFFFF" }, d: "M1692.1,986.4l0.9,193.2l-281.2,165v330.8l-163.3,95.7l-163.3-95.7v-330.8l-281.2-165V986.4\n\t\tL968,889.8l279.5,165.8l281.2-165.8l164.1,96.6H1692.1L1692.1,986.4z M803.9,656.5l443.7-261.6l444.5,261.6l-163.3,96.6\n\t\tl-281.2-165.8L967.2,753.1L803.9,656.5L803.9,656.5z" })] }) }));
|
|
6877
6971
|
const Canto = ({ testnet, ...props }) => (jsx("svg", { ...props, "aria-hidden": "true", width: "44", height: "44", viewBox: "0 0 44 44", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: {
|
|
6878
6972
|
background: testnet
|
|
6879
6973
|
? "linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)"
|
|
@@ -6909,6 +7003,7 @@ const Zora = ({ testnet, ...props }) => (jsxs("svg", { ...props, width: "44", he
|
|
|
6909
7003
|
}, children: [jsx("mask", { id: "ck_zora_mask_a", style: {
|
|
6910
7004
|
maskType: "alpha",
|
|
6911
7005
|
}, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "44", height: "44", children: jsx("path", { d: "M22 44C34.1503 44 44 34.1503 44 22C44 9.84974 34.1503 0 22 0C9.84974 0 0 9.84974 0 22C0 34.1503 9.84974 44 22 44Z", fill: "#D9D9D9" }) }), jsxs("g", { mask: "url(#ck_zora_mask_a)", children: [jsx("path", { d: "M51.4558 -9.56445H-6.78906V48.6804H51.4558V-9.56445Z", fill: "#A1723A" }), jsx("g", { filter: "url(#ck_zora_filter_a)", children: jsx("path", { d: "M23.6807 43.0752C36.6464 43.0752 47.157 32.5675 47.157 19.6058C47.157 6.64397 36.6464 -3.86365 23.6807 -3.86365C10.7152 -3.86365 0.20459 6.64397 0.20459 19.6058C0.20459 32.5675 10.7152 43.0752 23.6807 43.0752Z", fill: "#531002" }) }), jsx("g", { filter: "url(#ck_zora_filter_b)", children: jsx("path", { d: "M26.2112 35.6464C36.7271 35.6464 45.2521 27.1185 45.2521 16.5988C45.2521 6.07904 36.7271 -2.44885 26.2112 -2.44885C15.6953 -2.44885 7.17041 6.07904 7.17041 16.5988C7.17041 27.1185 15.6953 35.6464 26.2112 35.6464Z", fill: "#2B5DF0" }) }), jsx("g", { filter: "url(#ck_zora_filter_c)", children: jsx("path", { d: "M25.8644 36.7348C36.8276 36.7348 45.7149 27.8444 45.7149 16.8777C45.7149 5.91084 36.8276 -2.97949 25.8644 -2.97949C14.9015 -2.97949 6.01416 5.91084 6.01416 16.8777C6.01416 27.8444 14.9015 36.7348 25.8644 36.7348Z", fill: "url(#paint0_radial_3914_1946)" }) }), jsx("g", { filter: "url(#ck_zora_filter_d)", children: jsx("path", { d: "M29.1567 21.8779C34.6797 21.8779 39.1567 17.4008 39.1567 11.8779C39.1567 6.35509 34.6797 1.87793 29.1567 1.87793C23.6338 1.87793 19.1567 6.35509 19.1567 11.8779C19.1567 17.4008 23.6338 21.8779 29.1567 21.8779Z", fill: "#FCB8D4" }) }), jsx("g", { filter: "url(#ck_zora_filter_e)", children: jsx("path", { d: "M29.15 15.8642C31.3555 15.8642 33.1432 14.0765 33.1432 11.871C33.1432 9.66562 31.3555 7.87781 29.15 7.87781C26.9445 7.87781 25.1567 9.66562 25.1567 11.871C25.1567 14.0765 26.9445 15.8642 29.15 15.8642Z", fill: "white" }) }), jsx("g", { filter: "url(#ck_zora_filter_f)", children: jsx("path", { d: "M26.4967 51.7416C46.3151 51.7416 62.3811 35.6757 62.3811 15.8573C62.3811 -3.96109 46.3151 -20.0271 26.4967 -20.0271C6.67829 -20.0271 -9.3877 -3.96109 -9.3877 15.8573C-9.3877 35.6757 6.67829 51.7416 26.4967 51.7416Z", fill: "url(#paint1_radial_3914_1946)", fillOpacity: "0.9" }) })] }), jsxs("defs", { children: [jsxs("filter", { id: "ck_zora_filter_a", x: "-5.23758", y: "-9.30581", width: "57.837", height: "57.8232", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB", children: [jsx("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), jsx("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }), jsx("feGaussianBlur", { stdDeviation: "2.72108", result: "effect1_foregroundBlur_3914_1946" })] }), jsxs("filter", { id: "ck_zora_filter_b", x: "-3.71395", y: "-13.3332", width: "59.8503", height: "59.8639", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB", children: [jsx("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), jsx("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }), jsx("feGaussianBlur", { stdDeviation: "5.44218", result: "effect1_foregroundBlur_3914_1946" })] }), jsxs("filter", { id: "ck_zora_filter_c", x: "1.93251", y: "-7.06114", width: "47.864", height: "47.8775", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB", children: [jsx("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), jsx("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }), jsx("feGaussianBlur", { stdDeviation: "2.04082", result: "effect1_foregroundBlur_3914_1946" })] }), jsxs("filter", { id: "ck_zora_filter_d", x: "10.9935", y: "-6.28533", width: "36.3265", height: "36.3265", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB", children: [jsx("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), jsx("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }), jsx("feGaussianBlur", { stdDeviation: "4.08163", result: "effect1_foregroundBlur_3914_1946" })] }), jsxs("filter", { id: "ck_zora_filter_e", x: "19.7146", y: "2.43564", width: "18.8707", height: "18.8708", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB", children: [jsx("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), jsx("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }), jsx("feGaussianBlur", { stdDeviation: "2.72108", result: "effect1_foregroundBlur_3914_1946" })] }), jsxs("filter", { id: "ck_zora_filter_f", x: "-13.4693", y: "-24.1087", width: "79.9318", height: "79.9321", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB", children: [jsx("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), jsx("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }), jsx("feGaussianBlur", { stdDeviation: "2.04082", result: "effect1_foregroundBlur_3914_1946" })] }), jsxs("radialGradient", { id: "paint0_radial_3914_1946", cx: "0", cy: "0", r: "1", gradientUnits: "userSpaceOnUse", gradientTransform: "translate(29.2127 11.2756) rotate(128.228) scale(37.4897 37.4867)", children: [jsx("stop", { offset: "0.286458", stopColor: "#387AFA" }), jsx("stop", { offset: "0.647782", stopColor: "#387AFA", stopOpacity: "0" })] }), jsxs("radialGradient", { id: "paint1_radial_3914_1946", cx: "0", cy: "0", r: "1", gradientUnits: "userSpaceOnUse", gradientTransform: "translate(26.4967 15.8573) rotate(90) scale(35.8844 35.8844)", children: [jsx("stop", { offset: "0.598958", stopOpacity: "0" }), jsx("stop", { offset: "0.671875" }), jsx("stop", { offset: "0.734375", stopOpacity: "0" })] })] })] }));
|
|
7006
|
+
const Linea = ({ testnet, ...props }) => (jsxs("svg", { ...props, width: "44", height: "44", viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx("path", { d: "M200 0H0V200H200V0Z", fill: "#121212" }), jsx("mask", { id: "mask0_267_10", style: { maskType: "luminance" }, maskUnits: "userSpaceOnUse", x: "50", y: "48", width: "100", height: "104", children: jsx("path", { d: "M149.541 48H50V151.977H149.541V48Z", fill: "white" }) }), jsxs("g", { mask: "url(#mask0_267_10)", children: [jsx("path", { d: "M132.669 151.977H50V64.8721H68.9147V135.096H132.669V151.968V151.977Z", fill: "white" }), jsx("path", { d: "M132.669 81.7441C141.987 81.7441 149.541 74.1902 149.541 64.8721C149.541 55.5539 141.987 48 132.669 48C123.35 48 115.797 55.5539 115.797 64.8721C115.797 74.1902 123.35 81.7441 132.669 81.7441Z", fill: "white" })] })] }));
|
|
6912
7007
|
const chainToLogo = {
|
|
6913
7008
|
[ethereum.chainId]: jsx(Ethereum, {}),
|
|
6914
7009
|
[arbitrum$1.chainId]: jsx(Arbitrum, {}),
|
|
@@ -6917,6 +7012,8 @@ const chainToLogo = {
|
|
|
6917
7012
|
[polygon$1.chainId]: jsx(Polygon, {}),
|
|
6918
7013
|
[ethereumSepolia.chainId]: jsx(Ethereum, {}),
|
|
6919
7014
|
[baseSepolia$1.chainId]: jsx(Base, {}),
|
|
7015
|
+
[linea$1.chainId]: jsx(Linea, {}),
|
|
7016
|
+
[bsc$1.chainId]: jsx(BinanceSmartChain, {}),
|
|
6920
7017
|
};
|
|
6921
7018
|
var ChainIcons = {
|
|
6922
7019
|
UnknownChain,
|
|
@@ -10544,12 +10641,6 @@ const IconStackItem = styled(motion.div) `
|
|
|
10544
10641
|
border-radius: 22.5%;
|
|
10545
10642
|
`;
|
|
10546
10643
|
|
|
10547
|
-
const DEFAULT_EXTERNAL_PAYMENT_OPTIONS = [
|
|
10548
|
-
ExternalPaymentOptions.Coinbase,
|
|
10549
|
-
ExternalPaymentOptions.Binance,
|
|
10550
|
-
ExternalPaymentOptions.Daimo,
|
|
10551
|
-
ExternalPaymentOptions.RampNetwork,
|
|
10552
|
-
];
|
|
10553
10644
|
// Get 3 icons, skipping the one that is already connected
|
|
10554
10645
|
function getBestUnconnectedWalletIcons(connector) {
|
|
10555
10646
|
const icons = [];
|
|
@@ -10573,13 +10664,9 @@ const SelectMethod = () => {
|
|
|
10573
10664
|
const isMobile = useIsMobile();
|
|
10574
10665
|
const { address, isConnected, connector } = useAccount();
|
|
10575
10666
|
const { disconnectAsync } = useDisconnect();
|
|
10576
|
-
const {
|
|
10577
|
-
|
|
10578
|
-
|
|
10579
|
-
});
|
|
10580
|
-
const displayName = ensName ?? (address ? getAddressContraction(address) : "wallet");
|
|
10581
|
-
const { setRoute, paymentInfo } = useContext();
|
|
10582
|
-
const { daimoPayOrder, setSelectedExternalOption } = paymentInfo;
|
|
10667
|
+
const { setRoute, paymentInfo, log } = useContext();
|
|
10668
|
+
const { setSelectedExternalOption, externalPaymentOptions, senderEnsName } = paymentInfo;
|
|
10669
|
+
const displayName = senderEnsName ?? (address ? getAddressContraction(address) : "wallet");
|
|
10583
10670
|
const connectedWalletOption = isConnected
|
|
10584
10671
|
? {
|
|
10585
10672
|
id: "connectedWallet",
|
|
@@ -10602,30 +10689,10 @@ const SelectMethod = () => {
|
|
|
10602
10689
|
const walletOptions = connectedWalletOption
|
|
10603
10690
|
? [connectedWalletOption, unconnectedWalletOption]
|
|
10604
10691
|
: [unconnectedWalletOption];
|
|
10605
|
-
|
|
10606
|
-
|
|
10607
|
-
useEffect(() => {
|
|
10608
|
-
const refreshExternalPaymentOptions = async (usd) => {
|
|
10609
|
-
setLoadingExternalPaymentOptions(true);
|
|
10610
|
-
const options = await trpc.getExternalPaymentOptions.query({
|
|
10611
|
-
usdRequired: usd,
|
|
10612
|
-
platform: detectPlatform(window.navigator.userAgent),
|
|
10613
|
-
});
|
|
10614
|
-
// Filter out options not in options JSON
|
|
10615
|
-
const enabledExtPaymentOptions = daimoPayOrder?.metadata.payer?.paymentOptions ||
|
|
10616
|
-
DEFAULT_EXTERNAL_PAYMENT_OPTIONS;
|
|
10617
|
-
const filteredOptions = options.filter((option) => enabledExtPaymentOptions.includes(option.id));
|
|
10618
|
-
setExternalPaymentOptions(filteredOptions);
|
|
10619
|
-
setLoadingExternalPaymentOptions(false);
|
|
10620
|
-
};
|
|
10621
|
-
const usd = daimoPayOrder?.destFinalCallTokenAmount.usd;
|
|
10622
|
-
if (usd != null) {
|
|
10623
|
-
refreshExternalPaymentOptions(usd);
|
|
10624
|
-
}
|
|
10625
|
-
}, [daimoPayOrder?.destFinalCallTokenAmount.usd]);
|
|
10626
|
-
return (jsxs(PageContent, { children: [jsx(OrderHeader, {}), jsx(OptionsList, { requiredSkeletons: isMobile ? 4 : 3, isLoading: loadingExternalPaymentOptions, options: [
|
|
10692
|
+
log(`[SELECT_METHOD] loading: ${externalPaymentOptions.loading}, options: ${JSON.stringify(externalPaymentOptions.options)}`);
|
|
10693
|
+
return (jsxs(PageContent, { children: [jsx(OrderHeader, {}), jsx(OptionsList, { requiredSkeletons: isMobile ? 4 : 3, isLoading: externalPaymentOptions.loading, options: [
|
|
10627
10694
|
...walletOptions,
|
|
10628
|
-
...(externalPaymentOptions ?? []).map((option) => ({
|
|
10695
|
+
...(externalPaymentOptions.options ?? []).map((option) => ({
|
|
10629
10696
|
id: option.id,
|
|
10630
10697
|
title: option.cta,
|
|
10631
10698
|
icons: [option.logoURI],
|
|
@@ -10658,32 +10725,15 @@ const ChainContainer = styled(motion.div) `
|
|
|
10658
10725
|
`;
|
|
10659
10726
|
const SelectToken = () => {
|
|
10660
10727
|
const { setRoute, paymentInfo } = useContext();
|
|
10661
|
-
const {
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
const [isLoadingOptions, setIsLoadingOptions] = useState(true);
|
|
10665
|
-
useEffect(() => {
|
|
10666
|
-
if (!payerAddress || !daimoPayOrder)
|
|
10667
|
-
return;
|
|
10668
|
-
setPaymentOptions(null);
|
|
10669
|
-
setIsLoadingOptions(true);
|
|
10670
|
-
const destChainId = daimoPayOrder.destFinalCallTokenAmount.token.chainId;
|
|
10671
|
-
trpc.getWalletPaymentOptions
|
|
10672
|
-
.query({
|
|
10673
|
-
payerAddress,
|
|
10674
|
-
usdRequired: daimoPayOrder.destFinalCallTokenAmount.usd,
|
|
10675
|
-
destChainId,
|
|
10676
|
-
})
|
|
10677
|
-
.then(setPaymentOptions)
|
|
10678
|
-
.finally(() => setIsLoadingOptions(false));
|
|
10679
|
-
}, [payerAddress, daimoPayOrder]);
|
|
10680
|
-
return (jsxs(PageContent, { children: [jsx(OrderHeader, { minified: true }), !isLoadingOptions && paymentOptions?.length === 0 && (jsxs(ModalContent, { style: {
|
|
10728
|
+
const { setSelectedTokenOption, walletPaymentOptions } = paymentInfo;
|
|
10729
|
+
return (jsxs(PageContent, { children: [jsx(OrderHeader, { minified: true }), walletPaymentOptions.isLoading &&
|
|
10730
|
+
walletPaymentOptions.options?.length === 0 && (jsxs(ModalContent, { style: {
|
|
10681
10731
|
display: "flex",
|
|
10682
10732
|
alignItems: "center",
|
|
10683
10733
|
justifyContent: "center",
|
|
10684
10734
|
paddingTop: 16,
|
|
10685
10735
|
paddingBottom: 16,
|
|
10686
|
-
}, children: [jsx(ModalH1, { children: "Insufficient balance. Please select an alternative payment method." }), jsx(Button, { onClick: () => setRoute(ROUTES.SELECT_METHOD), children: "Select Another Method" })] })), jsx(OptionsList, { requiredSkeletons: 4, isLoading:
|
|
10736
|
+
}, children: [jsx(ModalH1, { children: "Insufficient balance. Please select an alternative payment method." }), jsx(Button, { onClick: () => setRoute(ROUTES.SELECT_METHOD), children: "Select Another Method" })] })), jsx(OptionsList, { requiredSkeletons: 4, isLoading: walletPaymentOptions.isLoading, options: walletPaymentOptions.options?.map((option) => {
|
|
10687
10737
|
const capitalizedChainName = capitalize(getChainName(option.required.token.chainId));
|
|
10688
10738
|
const title = `${getDisplayPrice(option.required)} ${option.required.token.symbol} on ${capitalizedChainName}`;
|
|
10689
10739
|
const subtitle = `Balance: ${getDisplayPrice(option.balance)} ${option.balance.token.symbol}`;
|
|
@@ -10990,7 +11040,7 @@ const DaimoPayProvider = ({ children, theme = "auto", mode = "auto", customTheme
|
|
|
10990
11040
|
// downstream hooks like useDaimoPayStatus() to work correctly, we must set
|
|
10991
11041
|
// set refresh context when payment status changes; done via setDaimoPayOrder.
|
|
10992
11042
|
const [daimoPayOrder, setDaimoPayOrder] = useState();
|
|
10993
|
-
const paymentInfo =
|
|
11043
|
+
const paymentInfo = usePaymentInfo({
|
|
10994
11044
|
daimoPayOrder,
|
|
10995
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { CustomTheme, DaimoPayContextOptions, DaimoPayModalOptions, Languages, Mode, Theme } from "../types";
|
|
3
3
|
import { useConnectCallbackProps } from "../hooks/useConnectCallback";
|
|
4
|
-
import { PaymentInfo } from "../
|
|
4
|
+
import { PaymentInfo } from "../hooks/usePaymentInfo";
|
|
5
5
|
export declare enum ROUTES {
|
|
6
6
|
SELECT_METHOD = "daimoPaySelectMethod",
|
|
7
7
|
SELECT_TOKEN = "daimoPaySelectToken",
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ExternalPaymentOptionMetadata, PlatformType } from "@daimo/common";
|
|
2
|
+
export declare function useExternalPaymentOptions({ filterIds, usdRequired, platform, }: {
|
|
3
|
+
filterIds: string[] | undefined;
|
|
4
|
+
usdRequired: number | undefined;
|
|
5
|
+
platform: PlatformType | undefined;
|
|
6
|
+
}): {
|
|
7
|
+
options: ExternalPaymentOptionMetadata[];
|
|
8
|
+
loading: boolean;
|
|
9
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DaimoPayOrder, DaimoPayTokenAmount, ExternalPaymentOptionMetadata, ExternalPaymentOptions } from "@daimo/common";
|
|
2
2
|
import { DaimoPayModalOptions } from "../types";
|
|
3
|
-
import { trpc } from "
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { trpc } from "../utils/trpc";
|
|
4
|
+
import { useExternalPaymentOptions } from "./useExternalPaymentOptions";
|
|
5
|
+
import { useWalletPaymentOptions, WalletPaymentOption } from "./useWalletPaymentOptions";
|
|
6
6
|
/** Wallet payment details, sent to processSourcePayment after submitting tx. */
|
|
7
7
|
export type SourcePayment = Parameters<typeof trpc.processSourcePayment.mutate>[0];
|
|
8
8
|
/** Loads a DaimoPayOrder + manages the corresponding modal. */
|
|
@@ -12,10 +12,12 @@ export interface PaymentInfo {
|
|
|
12
12
|
modalOptions: DaimoPayModalOptions;
|
|
13
13
|
setModalOptions: (modalOptions: DaimoPayModalOptions) => void;
|
|
14
14
|
paymentWaitingMessage: string | undefined;
|
|
15
|
+
externalPaymentOptions: ReturnType<typeof useExternalPaymentOptions>;
|
|
16
|
+
walletPaymentOptions: ReturnType<typeof useWalletPaymentOptions>;
|
|
15
17
|
selectedExternalOption: ExternalPaymentOptionMetadata | undefined;
|
|
16
|
-
selectedTokenOption:
|
|
18
|
+
selectedTokenOption: WalletPaymentOption | undefined;
|
|
17
19
|
setSelectedExternalOption: (option: ExternalPaymentOptionMetadata | undefined) => void;
|
|
18
|
-
setSelectedTokenOption: (option:
|
|
20
|
+
setSelectedTokenOption: (option: WalletPaymentOption | undefined) => void;
|
|
19
21
|
setChosenUsd: (amount: number) => void;
|
|
20
22
|
payWithToken: (tokenAmount: DaimoPayTokenAmount) => Promise<void>;
|
|
21
23
|
payWithExternal: (option: ExternalPaymentOptions) => Promise<string>;
|
|
@@ -24,28 +26,11 @@ export interface PaymentInfo {
|
|
|
24
26
|
txHash: string;
|
|
25
27
|
txURL?: string;
|
|
26
28
|
}) => void;
|
|
29
|
+
senderEnsName: string | undefined;
|
|
27
30
|
}
|
|
28
|
-
export declare function
|
|
31
|
+
export declare function usePaymentInfo({ daimoPayOrder, setDaimoPayOrder, setOpen, log, }: {
|
|
29
32
|
daimoPayOrder: DaimoPayOrder | undefined;
|
|
30
33
|
setDaimoPayOrder: (o: DaimoPayOrder) => void;
|
|
31
34
|
setOpen: (showModal: boolean) => void;
|
|
32
35
|
log: (...args: any[]) => void;
|
|
33
|
-
}):
|
|
34
|
-
setPayId: (payId: string | null) => Promise<void>;
|
|
35
|
-
daimoPayOrder: DaimoPayOrder | undefined;
|
|
36
|
-
modalOptions: DaimoPayModalOptions;
|
|
37
|
-
setModalOptions: import("react").Dispatch<import("react").SetStateAction<DaimoPayModalOptions>>;
|
|
38
|
-
paymentWaitingMessage: string | undefined;
|
|
39
|
-
selectedExternalOption: ExternalPaymentOptionMetadata | undefined;
|
|
40
|
-
selectedTokenOption: any;
|
|
41
|
-
setSelectedExternalOption: import("react").Dispatch<import("react").SetStateAction<ExternalPaymentOptionMetadata | undefined>>;
|
|
42
|
-
setSelectedTokenOption: import("react").Dispatch<any>;
|
|
43
|
-
setChosenUsd: (usdAmount: number) => void;
|
|
44
|
-
payWithToken: (tokenAmount: DaimoPayTokenAmount) => Promise<void>;
|
|
45
|
-
payWithExternal: (option: ExternalPaymentOptions) => Promise<any>;
|
|
46
|
-
refreshOrder: () => Promise<void>;
|
|
47
|
-
onSuccess: ({ txHash, txURL }: {
|
|
48
|
-
txHash: string;
|
|
49
|
-
txURL?: string;
|
|
50
|
-
}) => void;
|
|
51
|
-
};
|
|
36
|
+
}): PaymentInfo;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { trpc } from "../utils/trpc";
|
|
2
|
+
/** Wallet payment options. User picks one. */
|
|
3
|
+
export type WalletPaymentOption = Awaited<ReturnType<typeof trpc.getWalletPaymentOptions.query>>[0];
|
|
4
|
+
export declare function useWalletPaymentOptions({ address, usdRequired, destChainId, }: {
|
|
5
|
+
address: string | undefined;
|
|
6
|
+
usdRequired: number | undefined;
|
|
7
|
+
destChainId: number | undefined;
|
|
8
|
+
}): {
|
|
9
|
+
options: any[] | null;
|
|
10
|
+
isLoading: boolean;
|
|
11
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daimo/pay",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.12",
|
|
5
5
|
"author": "Daimo",
|
|
6
6
|
"homepage": "https://pay.daimo.com",
|
|
7
7
|
"license": "BSD-2-Clause license",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"crypto"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@daimo/common": "0.3.
|
|
44
|
-
"@daimo/contract": "0.3.
|
|
43
|
+
"@daimo/common": "0.3.11",
|
|
44
|
+
"@daimo/contract": "0.3.11",
|
|
45
45
|
"@trpc/client": "^11.0.0-next-beta.318",
|
|
46
46
|
"@trpc/server": "^11.0.0-next-beta.318",
|
|
47
47
|
"buffer": "^6.0.3",
|
|
@@ -1,15 +0,0 @@
|
|
|
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;
|