@daimo/pay 1.7.1 → 1.7.2
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.js +8 -6
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import { WalletSignTransactionError, WalletSendTransactionError } from '@solana/
|
|
|
22
22
|
import { normalize } from 'viem/ens';
|
|
23
23
|
|
|
24
24
|
var name = "@daimo/pay";
|
|
25
|
-
var version = "1.7.
|
|
25
|
+
var version = "1.7.2";
|
|
26
26
|
var author = "Daimo";
|
|
27
27
|
var homepage = "https://pay.daimo.com";
|
|
28
28
|
var license = "BSD-2-Clause license";
|
|
@@ -61,7 +61,7 @@ var keywords = [
|
|
|
61
61
|
"crypto"
|
|
62
62
|
];
|
|
63
63
|
var dependencies = {
|
|
64
|
-
"@daimo/pay-common": "1.7.
|
|
64
|
+
"@daimo/pay-common": "1.7.2",
|
|
65
65
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
66
66
|
"@solana/wallet-adapter-base": "^0.9.23",
|
|
67
67
|
"@solana/wallet-adapter-react": "^0.15.35",
|
|
@@ -6706,7 +6706,7 @@ const ScrollArea = ({ children, height, backgroundColor, mobileDirection, hideBo
|
|
|
6706
6706
|
const { log } = usePayContext();
|
|
6707
6707
|
const ref = useRef(null);
|
|
6708
6708
|
const moreRef = useRef(null);
|
|
6709
|
-
const
|
|
6709
|
+
const isMobileFormat = isMobile() || window?.innerWidth < defaultTheme.mobileWidth;
|
|
6710
6710
|
useEffect(() => {
|
|
6711
6711
|
const el = ref.current;
|
|
6712
6712
|
if (!el)
|
|
@@ -6745,7 +6745,7 @@ const ScrollArea = ({ children, height, backgroundColor, mobileDirection, hideBo
|
|
|
6745
6745
|
el.removeEventListener("scroll", handleScroll);
|
|
6746
6746
|
};
|
|
6747
6747
|
}, [ref.current]);
|
|
6748
|
-
return (jsxs(ScrollContainer, { children: [jsx(ScrollAreaContainer, { ref: ref, "$mobile":
|
|
6748
|
+
return (jsxs(ScrollContainer, { children: [jsx(ScrollAreaContainer, { ref: ref, "$mobile": isMobileFormat, "$height": height, "$backgroundColor": backgroundColor, "$mobileDirection": mobileDirection, "$hideBottomLine": hideBottomLine, "$totalItems": totalItems, children: children }), jsx(MoreIndicator, { ref: moreRef, className: "hide", onClick: () => {
|
|
6749
6749
|
if (ref.current) {
|
|
6750
6750
|
ref.current.scrollTo({
|
|
6751
6751
|
top: ref.current.scrollHeight,
|
|
@@ -10811,6 +10811,7 @@ const ChainContainer$1 = styled(motion.div) `
|
|
|
10811
10811
|
|
|
10812
10812
|
function SelectToken() {
|
|
10813
10813
|
const { isMobile, isIOS } = useIsMobile();
|
|
10814
|
+
const isMobileFormat = useIsMobile() || window?.innerWidth < defaultTheme.mobileWidth;
|
|
10814
10815
|
const { setRoute, paymentState, wcWallet } = usePayContext();
|
|
10815
10816
|
const { isDepositFlow, walletPaymentOptions, setSelectedTokenOption } = paymentState;
|
|
10816
10817
|
const optionsList = walletPaymentOptions.options?.map((option) => {
|
|
@@ -10864,7 +10865,7 @@ function SelectToken() {
|
|
|
10864
10865
|
justifyContent: "center",
|
|
10865
10866
|
paddingTop: 16,
|
|
10866
10867
|
paddingBottom: 16,
|
|
10867
|
-
}, children: [jsx(ModalH1, { children: "Insufficient balance." }), jsx(SelectAnotherMethodButton, {})] })), jsx(OptionsList, { requiredSkeletons: 4, isLoading: walletPaymentOptions.isLoading, options: optionsList, scrollHeight:
|
|
10868
|
+
}, children: [jsx(ModalH1, { children: "Insufficient balance." }), jsx(SelectAnotherMethodButton, {})] })), jsx(OptionsList, { requiredSkeletons: 4, isLoading: walletPaymentOptions.isLoading, options: optionsList, scrollHeight: isMobileFormat ? 225 : 300, orDivider: optionsList.length != 0 }), optionsList.length != 0 && jsx(SelectAnotherMethodButton, {})] }));
|
|
10868
10869
|
}
|
|
10869
10870
|
function getDaimoTokenKey(token) {
|
|
10870
10871
|
return `${token.chainId}-${token.token}`;
|
|
@@ -11044,6 +11045,7 @@ function getDaimoSolanaTokenKey(token) {
|
|
|
11044
11045
|
const SelectSolanaToken = () => {
|
|
11045
11046
|
const { paymentState, setRoute } = usePayContext();
|
|
11046
11047
|
const { isDepositFlow, solanaPaymentOptions, setSelectedSolanaTokenOption } = paymentState;
|
|
11048
|
+
const isMobileFormat = useIsMobile() || window?.innerWidth < defaultTheme.mobileWidth;
|
|
11047
11049
|
const optionsList = solanaPaymentOptions.options?.map((option) => {
|
|
11048
11050
|
const titlePrice = isDepositFlow
|
|
11049
11051
|
? formatUsd(option.balance.usd)
|
|
@@ -11083,7 +11085,7 @@ const SelectSolanaToken = () => {
|
|
|
11083
11085
|
justifyContent: "center",
|
|
11084
11086
|
paddingTop: 16,
|
|
11085
11087
|
paddingBottom: 16,
|
|
11086
|
-
}, children: [jsx(ModalH1, { children: "Insufficient balance." }), jsx(SelectAnotherMethodButton, {})] })), jsx(OptionsList, { requiredSkeletons: 4, isLoading: solanaPaymentOptions.isLoading, options: optionsList, orDivider: optionsList.length != 0 }), optionsList.length != 0 && jsx(SelectAnotherMethodButton, {})] }));
|
|
11088
|
+
}, children: [jsx(ModalH1, { children: "Insufficient balance." }), jsx(SelectAnotherMethodButton, {})] })), jsx(OptionsList, { requiredSkeletons: 4, isLoading: solanaPaymentOptions.isLoading, options: optionsList, scrollHeight: isMobileFormat ? 225 : 300, orDivider: optionsList.length != 0 }), optionsList.length != 0 && jsx(SelectAnotherMethodButton, {})] }));
|
|
11087
11089
|
};
|
|
11088
11090
|
|
|
11089
11091
|
const WaitingDepositAddress = () => {
|