@b3dotfun/sdk 0.0.28 → 0.0.29-alpha.1
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/dist/cjs/anyspend/abis/escrow.d.ts +987 -0
- package/dist/cjs/anyspend/abis/escrow.js +1275 -0
- package/dist/cjs/anyspend/react/components/AnySpend.js +10 -168
- package/dist/cjs/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendBondKit.js +23 -24
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +2 -2
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +10 -0
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +263 -0
- package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.d.ts +17 -0
- package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.js +53 -0
- package/dist/cjs/anyspend/react/components/common/ErrorSection.d.ts +6 -0
- package/dist/cjs/anyspend/react/components/common/ErrorSection.js +12 -0
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +2 -2
- package/dist/cjs/anyspend/react/components/common/PaySection.d.ts +20 -0
- package/dist/cjs/anyspend/react/components/common/PaySection.js +58 -0
- package/dist/cjs/anyspend/react/components/common/TabSection.d.ts +10 -0
- package/dist/cjs/anyspend/react/components/common/TabSection.js +18 -0
- package/dist/cjs/anyspend/react/components/index.d.ts +2 -0
- package/dist/cjs/anyspend/react/components/index.js +5 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.d.ts +165 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.js +184 -0
- package/dist/cjs/anyspend/react/hooks/useSigMint.d.ts +2 -2
- package/dist/cjs/bondkit/abis/BondkitTokenABI.d.ts +2 -5
- package/dist/cjs/bondkit/abis/BondkitTokenABI.js +2 -3
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +3 -0
- package/dist/cjs/global-account/react/components/custom/Button.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/button.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/command.d.ts +2 -2
- package/dist/cjs/global-account/react/hooks/useSiwe.native.d.ts +4 -0
- package/dist/cjs/global-account/react/hooks/useSiwe.native.js +40 -0
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +19 -3
- package/dist/cjs/shared/constants/chains/b3Chain.d.ts +1 -1
- package/dist/cjs/shared/constants/chains/supported.d.ts +3 -3
- package/dist/esm/anyspend/abis/escrow.d.ts +987 -0
- package/dist/esm/anyspend/abis/escrow.js +1272 -0
- package/dist/esm/anyspend/react/components/AnySpend.js +12 -170
- package/dist/esm/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendBondKit.js +23 -24
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +3 -3
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +10 -0
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +257 -0
- package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.d.ts +17 -0
- package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.js +50 -0
- package/dist/esm/anyspend/react/components/common/ErrorSection.d.ts +6 -0
- package/dist/esm/anyspend/react/components/common/ErrorSection.js +9 -0
- package/dist/esm/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
- package/dist/esm/anyspend/react/components/common/PanelOnramp.js +2 -2
- package/dist/esm/anyspend/react/components/common/PaySection.d.ts +20 -0
- package/dist/esm/anyspend/react/components/common/PaySection.js +55 -0
- package/dist/esm/anyspend/react/components/common/TabSection.d.ts +10 -0
- package/dist/esm/anyspend/react/components/common/TabSection.js +15 -0
- package/dist/esm/anyspend/react/components/index.d.ts +2 -0
- package/dist/esm/anyspend/react/components/index.js +2 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.d.ts +165 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.js +180 -0
- package/dist/esm/anyspend/react/hooks/useSigMint.d.ts +2 -2
- package/dist/esm/bondkit/abis/BondkitTokenABI.d.ts +2 -5
- package/dist/esm/bondkit/abis/BondkitTokenABI.js +2 -3
- package/dist/esm/global-account/react/components/B3DynamicModal.js +3 -0
- package/dist/esm/global-account/react/components/custom/Button.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/button.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/command.d.ts +2 -2
- package/dist/esm/global-account/react/hooks/useSiwe.native.d.ts +4 -0
- package/dist/esm/global-account/react/hooks/useSiwe.native.js +34 -0
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +19 -3
- package/dist/esm/shared/constants/chains/b3Chain.d.ts +1 -1
- package/dist/esm/shared/constants/chains/supported.d.ts +3 -3
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/abis/escrow.d.ts +987 -0
- package/dist/types/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +10 -0
- package/dist/types/anyspend/react/components/common/CryptoReceiveSection.d.ts +17 -0
- package/dist/types/anyspend/react/components/common/ErrorSection.d.ts +6 -0
- package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
- package/dist/types/anyspend/react/components/common/PaySection.d.ts +20 -0
- package/dist/types/anyspend/react/components/common/TabSection.d.ts +10 -0
- package/dist/types/anyspend/react/components/index.d.ts +2 -0
- package/dist/types/anyspend/react/hooks/useAnyspendFlow.d.ts +165 -0
- package/dist/types/anyspend/react/hooks/useSigMint.d.ts +2 -2
- package/dist/types/bondkit/abis/BondkitTokenABI.d.ts +2 -5
- package/dist/types/global-account/react/components/custom/Button.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/button.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/command.d.ts +2 -2
- package/dist/types/global-account/react/hooks/useSiwe.native.d.ts +4 -0
- package/dist/types/global-account/react/stores/useModalStore.d.ts +19 -3
- package/dist/types/shared/constants/chains/b3Chain.d.ts +1 -1
- package/dist/types/shared/constants/chains/supported.d.ts +3 -3
- package/package.json +13 -1
- package/src/anyspend/abis/escrow.ts +1272 -0
- package/src/anyspend/react/components/AnySpend.tsx +48 -389
- package/src/anyspend/react/components/AnySpendBondKit.tsx +28 -28
- package/src/anyspend/react/components/AnySpendCustom.tsx +2 -10
- package/src/anyspend/react/components/AnyspendDepositHype.tsx +525 -0
- package/src/anyspend/react/components/common/CryptoReceiveSection.tsx +152 -0
- package/src/anyspend/react/components/common/ErrorSection.tsx +21 -0
- package/src/anyspend/react/components/common/PanelOnramp.tsx +4 -2
- package/src/anyspend/react/components/common/PaySection.tsx +222 -0
- package/src/anyspend/react/components/common/TabSection.tsx +58 -0
- package/src/anyspend/react/components/index.ts +2 -0
- package/src/anyspend/react/hooks/useAnyspendFlow.ts +226 -0
- package/src/bondkit/abis/BondkitTokenABI.ts +2 -3
- package/src/global-account/react/components/B3DynamicModal.tsx +3 -0
- package/src/global-account/react/hooks/useSiwe.native.tsx +40 -0
- package/src/global-account/react/stores/useModalStore.ts +21 -3
- package/dist/cjs/anyspend/abis/bondKit.d.ts +0 -35
- package/dist/cjs/anyspend/abis/bondKit.js +0 -29
- package/dist/esm/anyspend/abis/bondKit.d.ts +0 -35
- package/dist/esm/anyspend/abis/bondKit.js +0 -26
- package/dist/types/anyspend/abis/bondKit.d.ts +0 -35
- package/src/anyspend/abis/bondKit.ts +0 -26
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AnySpendDepositHype = AnySpendDepositHype;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const anyspend_1 = require("../../../anyspend");
|
|
9
|
+
const react_1 = require("../../../global-account/react");
|
|
10
|
+
const cn_1 = require("../../../shared/utils/cn");
|
|
11
|
+
const invariant_1 = __importDefault(require("invariant"));
|
|
12
|
+
const react_2 = require("motion/react");
|
|
13
|
+
const react_3 = require("react");
|
|
14
|
+
const sonner_1 = require("sonner");
|
|
15
|
+
const viem_1 = require("viem");
|
|
16
|
+
const chains_1 = require("viem/chains");
|
|
17
|
+
const useAnyspendFlow_1 = require("../hooks/useAnyspendFlow");
|
|
18
|
+
const AnySpendFingerprintWrapper_1 = require("./AnySpendFingerprintWrapper");
|
|
19
|
+
const CryptoPaymentMethod_1 = require("./common/CryptoPaymentMethod");
|
|
20
|
+
const CryptoReceiveSection_1 = require("./common/CryptoReceiveSection");
|
|
21
|
+
const ErrorSection_1 = require("./common/ErrorSection");
|
|
22
|
+
const FiatPaymentMethod_1 = require("./common/FiatPaymentMethod");
|
|
23
|
+
const OrderDetails_1 = require("./common/OrderDetails");
|
|
24
|
+
const OrderStatus_1 = require("./common/OrderStatus");
|
|
25
|
+
const PaySection_1 = require("./common/PaySection");
|
|
26
|
+
const RecipientSelection_1 = require("./common/RecipientSelection");
|
|
27
|
+
const escrow_1 = require("../../../anyspend/abis/escrow");
|
|
28
|
+
const lucide_react_1 = require("lucide-react");
|
|
29
|
+
const PanelOnramp_1 = require("./common/PanelOnramp");
|
|
30
|
+
function generateEncodedDataForDepositHype(amount, beneficiary) {
|
|
31
|
+
(0, invariant_1.default)(BigInt(amount) > 0, "Amount must be greater than zero");
|
|
32
|
+
const encodedData = (0, viem_1.encodeFunctionData)({
|
|
33
|
+
abi: escrow_1.ESCROW_ABI,
|
|
34
|
+
functionName: "depositFor",
|
|
35
|
+
args: [beneficiary, anyspend_1.B3_TOKEN.address, BigInt(amount)],
|
|
36
|
+
});
|
|
37
|
+
return encodedData;
|
|
38
|
+
}
|
|
39
|
+
function AnySpendDepositHype(props) {
|
|
40
|
+
const fingerprintConfig = (0, AnySpendFingerprintWrapper_1.getFingerprintConfig)();
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(AnySpendFingerprintWrapper_1.AnySpendFingerprintWrapper, { fingerprint: fingerprintConfig, children: (0, jsx_runtime_1.jsx)(AnySpendDepositHypeInner, { ...props }) }));
|
|
42
|
+
}
|
|
43
|
+
function AnySpendDepositHypeInner({ loadOrder, mode = "modal", recipientAddress, paymentType = "crypto", sourceTokenAddress, sourceTokenChainId, onSuccess, depositContractAddress, }) {
|
|
44
|
+
// Use shared flow hook
|
|
45
|
+
const { activePanel, setActivePanel, orderId, oat, selectedSrcChainId, setSelectedSrcChainId, selectedSrcToken, setSelectedSrcToken, srcAmount, setSrcAmount, dstAmount, setIsSrcInputDirty, selectedCryptoPaymentMethod, setSelectedCryptoPaymentMethod, selectedFiatPaymentMethod, setSelectedFiatPaymentMethod, selectedRecipientAddress, setSelectedRecipientAddress, recipientName, globalAddress, anyspendQuote, isLoadingAnyspendQuote, getAnyspendQuoteError, activeInputAmountInWei, geoData, coinbaseAvailablePaymentMethods, stripeWeb2Support, createOrder, isCreatingOrder, createOnrampOrder, isCreatingOnrampOrder, } = (0, useAnyspendFlow_1.useAnyspendFlow)({
|
|
46
|
+
paymentType,
|
|
47
|
+
recipientAddress,
|
|
48
|
+
loadOrder,
|
|
49
|
+
isDepositMode: true,
|
|
50
|
+
onTransactionSuccess: onSuccess,
|
|
51
|
+
sourceTokenAddress,
|
|
52
|
+
sourceTokenChainId,
|
|
53
|
+
});
|
|
54
|
+
// Button state logic
|
|
55
|
+
const btnInfo = (0, react_3.useMemo)(() => {
|
|
56
|
+
if (activeInputAmountInWei === "0")
|
|
57
|
+
return { text: "Enter an amount", disable: true, error: false };
|
|
58
|
+
if (isLoadingAnyspendQuote)
|
|
59
|
+
return { text: "Loading quote...", disable: true, error: false };
|
|
60
|
+
if (isCreatingOrder || isCreatingOnrampOrder)
|
|
61
|
+
return { text: "Creating order...", disable: true, error: false };
|
|
62
|
+
if (!selectedRecipientAddress)
|
|
63
|
+
return { text: "Select recipient", disable: false, error: false };
|
|
64
|
+
if (!anyspendQuote || !anyspendQuote.success)
|
|
65
|
+
return { text: "Get quote error", disable: true, error: true };
|
|
66
|
+
if (!dstAmount)
|
|
67
|
+
return { text: "No quote available", disable: true, error: true };
|
|
68
|
+
// Check minimum deposit amount (10 HYPE)
|
|
69
|
+
// Use the raw amount from the quote instead of the formatted display string
|
|
70
|
+
if (anyspendQuote.data?.currencyOut?.amount && anyspendQuote.data.currencyOut.currency?.decimals) {
|
|
71
|
+
const rawAmountInWei = anyspendQuote.data.currencyOut.amount;
|
|
72
|
+
const decimals = anyspendQuote.data.currencyOut.currency.decimals;
|
|
73
|
+
const actualAmount = parseFloat(rawAmountInWei) / Math.pow(10, decimals);
|
|
74
|
+
if (actualAmount < 10) {
|
|
75
|
+
return { text: "Minimum 10 HYPE deposit", disable: true, error: true };
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (paymentType === "crypto") {
|
|
79
|
+
if (selectedCryptoPaymentMethod === CryptoPaymentMethod_1.CryptoPaymentMethodType.NONE) {
|
|
80
|
+
return { text: "Choose payment method", disable: false, error: false };
|
|
81
|
+
}
|
|
82
|
+
return { text: "Continue to deposit", disable: false, error: false };
|
|
83
|
+
}
|
|
84
|
+
if (paymentType === "fiat") {
|
|
85
|
+
if (selectedFiatPaymentMethod === FiatPaymentMethod_1.FiatPaymentMethod.NONE) {
|
|
86
|
+
return { text: "Select payment method", disable: false, error: false };
|
|
87
|
+
}
|
|
88
|
+
return { text: "Buy", disable: false, error: false };
|
|
89
|
+
}
|
|
90
|
+
return { text: "Continue to deposit", disable: false, error: false };
|
|
91
|
+
}, [
|
|
92
|
+
activeInputAmountInWei,
|
|
93
|
+
isLoadingAnyspendQuote,
|
|
94
|
+
isCreatingOrder,
|
|
95
|
+
isCreatingOnrampOrder,
|
|
96
|
+
selectedRecipientAddress,
|
|
97
|
+
anyspendQuote,
|
|
98
|
+
dstAmount,
|
|
99
|
+
paymentType,
|
|
100
|
+
selectedCryptoPaymentMethod,
|
|
101
|
+
selectedFiatPaymentMethod,
|
|
102
|
+
]);
|
|
103
|
+
const onMainButtonClick = async () => {
|
|
104
|
+
if (btnInfo.disable)
|
|
105
|
+
return;
|
|
106
|
+
if (!selectedRecipientAddress) {
|
|
107
|
+
setActivePanel(useAnyspendFlow_1.PanelView.RECIPIENT_SELECTION);
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
if (paymentType === "crypto") {
|
|
111
|
+
if (selectedCryptoPaymentMethod === CryptoPaymentMethod_1.CryptoPaymentMethodType.NONE) {
|
|
112
|
+
setActivePanel(useAnyspendFlow_1.PanelView.CRYPTO_PAYMENT_METHOD);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
await handleCryptoOrder();
|
|
116
|
+
}
|
|
117
|
+
else if (paymentType === "fiat") {
|
|
118
|
+
if (selectedFiatPaymentMethod === FiatPaymentMethod_1.FiatPaymentMethod.NONE) {
|
|
119
|
+
setActivePanel(useAnyspendFlow_1.PanelView.FIAT_PAYMENT_METHOD);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
await handleFiatOrder();
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
// Handle crypto order creation
|
|
126
|
+
const handleCryptoOrder = async () => {
|
|
127
|
+
try {
|
|
128
|
+
(0, invariant_1.default)(anyspendQuote, "Relay price is not found");
|
|
129
|
+
(0, invariant_1.default)(selectedRecipientAddress, "Recipient address is not found");
|
|
130
|
+
(0, invariant_1.default)(depositContractAddress, "Deposit contract address is not found");
|
|
131
|
+
const srcAmountBigInt = BigInt(activeInputAmountInWei);
|
|
132
|
+
const depositAmountWei = anyspendQuote.data?.currencyOut?.amount || "0";
|
|
133
|
+
const encodedData = generateEncodedDataForDepositHype(depositAmountWei, selectedRecipientAddress);
|
|
134
|
+
createOrder({
|
|
135
|
+
recipientAddress: selectedRecipientAddress,
|
|
136
|
+
orderType: "custom",
|
|
137
|
+
srcChain: selectedSrcChainId,
|
|
138
|
+
dstChain: chains_1.base.id,
|
|
139
|
+
srcToken: selectedSrcToken,
|
|
140
|
+
dstToken: anyspend_1.B3_TOKEN,
|
|
141
|
+
srcAmount: srcAmountBigInt.toString(),
|
|
142
|
+
creatorAddress: globalAddress,
|
|
143
|
+
payload: {
|
|
144
|
+
amount: depositAmountWei,
|
|
145
|
+
data: encodedData,
|
|
146
|
+
to: depositContractAddress,
|
|
147
|
+
action: "deposit HYPE",
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
catch (err) {
|
|
152
|
+
console.error(err);
|
|
153
|
+
sonner_1.toast.error("Failed to create order: " + err.message);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
// Handle fiat order creation
|
|
157
|
+
const handleFiatOrder = async () => {
|
|
158
|
+
try {
|
|
159
|
+
(0, invariant_1.default)(anyspendQuote, "Relay price is not found");
|
|
160
|
+
(0, invariant_1.default)(selectedRecipientAddress, "Recipient address is not found");
|
|
161
|
+
(0, invariant_1.default)(depositContractAddress, "Deposit contract address is not found");
|
|
162
|
+
if (!srcAmount || parseFloat(srcAmount) <= 0) {
|
|
163
|
+
sonner_1.toast.error("Please enter a valid amount");
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
// Determine vendor and payment method string
|
|
167
|
+
let vendor;
|
|
168
|
+
let paymentMethodString = "";
|
|
169
|
+
if (selectedFiatPaymentMethod === FiatPaymentMethod_1.FiatPaymentMethod.COINBASE_PAY) {
|
|
170
|
+
if (coinbaseAvailablePaymentMethods.length === 0) {
|
|
171
|
+
sonner_1.toast.error("Coinbase Pay not available");
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
vendor = "coinbase";
|
|
175
|
+
paymentMethodString = coinbaseAvailablePaymentMethods[0]?.id || "";
|
|
176
|
+
}
|
|
177
|
+
else if (selectedFiatPaymentMethod === FiatPaymentMethod_1.FiatPaymentMethod.STRIPE) {
|
|
178
|
+
if (!stripeWeb2Support || !stripeWeb2Support.isSupport) {
|
|
179
|
+
sonner_1.toast.error("Stripe not available");
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
vendor = "stripe-web2";
|
|
183
|
+
paymentMethodString = "";
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
sonner_1.toast.error("Please select a payment method");
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
const depositAmountWei = anyspendQuote.data?.currencyOut?.amount || "0";
|
|
190
|
+
const encodedData = generateEncodedDataForDepositHype(depositAmountWei, selectedRecipientAddress);
|
|
191
|
+
createOnrampOrder({
|
|
192
|
+
recipientAddress: selectedRecipientAddress,
|
|
193
|
+
orderType: "custom",
|
|
194
|
+
dstChain: chains_1.base.id,
|
|
195
|
+
dstToken: anyspend_1.B3_TOKEN,
|
|
196
|
+
srcFiatAmount: srcAmount,
|
|
197
|
+
onramp: {
|
|
198
|
+
vendor: vendor,
|
|
199
|
+
paymentMethod: paymentMethodString,
|
|
200
|
+
country: geoData?.country || "US",
|
|
201
|
+
redirectUrl: window.location.origin,
|
|
202
|
+
},
|
|
203
|
+
expectedDstAmount: anyspendQuote?.data?.currencyOut?.amount?.toString() || "0",
|
|
204
|
+
creatorAddress: globalAddress,
|
|
205
|
+
payload: {
|
|
206
|
+
amount: depositAmountWei,
|
|
207
|
+
data: encodedData,
|
|
208
|
+
to: depositContractAddress,
|
|
209
|
+
action: "deposit HYPE",
|
|
210
|
+
},
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
catch (err) {
|
|
214
|
+
console.error(err);
|
|
215
|
+
sonner_1.toast.error("Failed to create order: " + err.message);
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
// Order details view
|
|
219
|
+
const orderDetailsView = ((0, jsx_runtime_1.jsx)("div", { className: "mx-auto w-[460px] max-w-full", children: (0, jsx_runtime_1.jsx)("div", { className: "relative flex flex-col gap-4", children: oat && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(OrderStatus_1.OrderStatus, { order: oat.data.order }), (0, jsx_runtime_1.jsx)(OrderDetails_1.OrderDetails, { mode: mode, order: oat.data.order, depositTxs: oat.data.depositTxs, relayTx: oat.data.relayTx, executeTx: oat.data.executeTx, refundTxs: oat.data.refundTxs, cryptoPaymentMethod: paymentType === "fiat" ? CryptoPaymentMethod_1.CryptoPaymentMethodType.NONE : selectedCryptoPaymentMethod, onBack: () => {
|
|
220
|
+
setActivePanel(useAnyspendFlow_1.PanelView.MAIN);
|
|
221
|
+
onSuccess?.();
|
|
222
|
+
} })] })) }) }));
|
|
223
|
+
// Loading view
|
|
224
|
+
const loadingView = ((0, jsx_runtime_1.jsx)("div", { className: "mx-auto flex w-full flex-col items-center gap-4 p-5", children: (0, jsx_runtime_1.jsx)("div", { className: "text-as-primary", children: "Loading order details..." }) }));
|
|
225
|
+
// Panel views
|
|
226
|
+
const recipientSelectionView = ((0, jsx_runtime_1.jsx)(RecipientSelection_1.RecipientSelection, { initialValue: selectedRecipientAddress || "", onBack: () => setActivePanel(useAnyspendFlow_1.PanelView.MAIN), onConfirm: address => {
|
|
227
|
+
setSelectedRecipientAddress(address);
|
|
228
|
+
setActivePanel(useAnyspendFlow_1.PanelView.MAIN);
|
|
229
|
+
} }));
|
|
230
|
+
const cryptoPaymentMethodView = ((0, jsx_runtime_1.jsx)(CryptoPaymentMethod_1.CryptoPaymentMethod, { globalAddress: globalAddress, globalWallet: undefined, selectedPaymentMethod: selectedCryptoPaymentMethod, setSelectedPaymentMethod: setSelectedCryptoPaymentMethod, isCreatingOrder: isCreatingOrder, onBack: () => setActivePanel(useAnyspendFlow_1.PanelView.MAIN), onSelectPaymentMethod: (method) => {
|
|
231
|
+
setSelectedCryptoPaymentMethod(method);
|
|
232
|
+
setActivePanel(useAnyspendFlow_1.PanelView.MAIN);
|
|
233
|
+
} }));
|
|
234
|
+
const fiatPaymentMethodView = ((0, jsx_runtime_1.jsx)(FiatPaymentMethod_1.FiatPaymentMethodComponent, { selectedPaymentMethod: selectedFiatPaymentMethod, setSelectedPaymentMethod: setSelectedFiatPaymentMethod, onBack: () => setActivePanel(useAnyspendFlow_1.PanelView.MAIN), onSelectPaymentMethod: (method) => {
|
|
235
|
+
setSelectedFiatPaymentMethod(method);
|
|
236
|
+
setActivePanel(useAnyspendFlow_1.PanelView.MAIN);
|
|
237
|
+
}, srcAmountOnRamp: srcAmount }));
|
|
238
|
+
// If showing token selection, render with panel transitions
|
|
239
|
+
return ((0, jsx_runtime_1.jsx)(react_1.StyleRoot, { children: (0, jsx_runtime_1.jsx)("div", { className: (0, cn_1.cn)("anyspend-container font-inter mx-auto w-full max-w-[460px]", mode === "page" &&
|
|
240
|
+
"bg-as-surface-primary border-as-border-secondary overflow-hidden rounded-2xl border shadow-xl"), children: (0, jsx_runtime_1.jsx)(react_1.TransitionPanel, { activeIndex: orderId
|
|
241
|
+
? oat
|
|
242
|
+
? useAnyspendFlow_1.PanelView.ORDER_DETAILS
|
|
243
|
+
: useAnyspendFlow_1.PanelView.LOADING
|
|
244
|
+
: activePanel === useAnyspendFlow_1.PanelView.ORDER_DETAILS
|
|
245
|
+
? useAnyspendFlow_1.PanelView.MAIN
|
|
246
|
+
: activePanel, className: (0, cn_1.cn)("rounded-2xl", {
|
|
247
|
+
"mt-0": mode === "modal",
|
|
248
|
+
}), variants: {
|
|
249
|
+
enter: { x: 300, opacity: 0 },
|
|
250
|
+
center: { x: 0, opacity: 1 },
|
|
251
|
+
exit: { x: -300, opacity: 0 },
|
|
252
|
+
}, transition: { type: "spring", stiffness: 300, damping: 30 }, children: [
|
|
253
|
+
(0, jsx_runtime_1.jsx)("div", { className: (0, cn_1.cn)(mode === "page" && "p-6"), children: (0, jsx_runtime_1.jsxs)("div", { className: "mx-auto flex w-[460px] max-w-full flex-col items-center gap-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-4 flex flex-col items-center gap-3 text-center", children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("h1", { className: "text-as-primary text-xl font-bold", children: paymentType === "crypto" ? "Deposit Crypto" : "Fund with Fiat" }) }) }), (0, jsx_runtime_1.jsx)("div", { className: "relative flex w-full max-w-[calc(100vw-32px)] flex-col gap-2", children: (0, jsx_runtime_1.jsxs)("div", { className: "relative flex w-full max-w-[calc(100vw-32px)] flex-col gap-2", children: [paymentType === "crypto" ? ((0, jsx_runtime_1.jsx)(PaySection_1.PaySection, { paymentType: "crypto", selectedSrcChainId: selectedSrcChainId, setSelectedSrcChainId: setSelectedSrcChainId, selectedSrcToken: selectedSrcToken, setSelectedSrcToken: setSelectedSrcToken, srcAmount: srcAmount, setSrcAmount: setSrcAmount, setIsSrcInputDirty: setIsSrcInputDirty, selectedCryptoPaymentMethod: selectedCryptoPaymentMethod, selectedFiatPaymentMethod: selectedFiatPaymentMethod, onSelectCryptoPaymentMethod: () => setActivePanel(useAnyspendFlow_1.PanelView.CRYPTO_PAYMENT_METHOD), onSelectFiatPaymentMethod: () => setActivePanel(useAnyspendFlow_1.PanelView.FIAT_PAYMENT_METHOD), anyspendQuote: anyspendQuote })) : ((0, jsx_runtime_1.jsx)(react_2.motion.div, { initial: { opacity: 0, y: 20, filter: "blur(10px)" }, animate: { opacity: 1, y: 0, filter: "blur(0px)" }, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, children: (0, jsx_runtime_1.jsx)(PanelOnramp_1.PanelOnramp, { srcAmountOnRamp: srcAmount, setSrcAmountOnRamp: setSrcAmount, selectedPaymentMethod: selectedFiatPaymentMethod, setActivePanel: setActivePanel, _recipientAddress: recipientAddress, destinationToken: anyspend_1.B3_TOKEN, destinationChainId: chains_1.base.id, destinationAmount: dstAmount, onDestinationTokenChange: () => { }, onDestinationChainChange: () => { }, fiatPaymentMethodIndex: useAnyspendFlow_1.PanelView.FIAT_PAYMENT_METHOD }) })), (0, jsx_runtime_1.jsx)(react_1.Button, { variant: "ghost", className: (0, cn_1.cn)("swap-direction-button border-as-stroke bg-as-surface-primary absolute left-1/2 top-[calc(50%+56px)] z-10 h-10 w-10 -translate-x-1/2 -translate-y-1/2 cursor-default rounded-xl border-2 sm:h-8 sm:w-8 sm:rounded-xl", paymentType === "fiat" && "hidden"), children: (0, jsx_runtime_1.jsx)("div", { className: "relative flex items-center justify-center transition-opacity", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowDown, { className: "text-as-primary/50 h-5 w-5" }) }) }), paymentType === "crypto" && ((0, jsx_runtime_1.jsx)(CryptoReceiveSection_1.CryptoReceiveSection, { isDepositMode: false, isBuyMode: true, selectedRecipientAddress: recipientAddress, recipientName: recipientName || undefined, onSelectRecipient: () => setActivePanel(useAnyspendFlow_1.PanelView.RECIPIENT_SELECTION), dstAmount: dstAmount, dstToken: anyspend_1.B3_TOKEN, selectedDstChainId: chains_1.base.id, setSelectedDstChainId: () => { }, setSelectedDstToken: () => { }, onChangeDstAmount: value => {
|
|
254
|
+
setIsSrcInputDirty(false);
|
|
255
|
+
setSrcAmount(value);
|
|
256
|
+
}, anyspendQuote: anyspendQuote }))] }) }), (0, jsx_runtime_1.jsx)(ErrorSection_1.ErrorSection, { error: getAnyspendQuoteError }), (0, jsx_runtime_1.jsx)(react_2.motion.div, { initial: { opacity: 0, y: 20, filter: "blur(10px)" }, animate: { opacity: 1, y: 0, filter: "blur(0px)" }, transition: { duration: 0.3, delay: 0.2, ease: "easeInOut" }, className: (0, cn_1.cn)("mt-4 flex w-full max-w-[460px] flex-col gap-2", getAnyspendQuoteError && "mt-0"), children: (0, jsx_runtime_1.jsx)(react_1.ShinyButton, { accentColor: "hsl(var(--as-brand))", disabled: btnInfo.disable, onClick: onMainButtonClick, className: (0, cn_1.cn)("as-main-button relative w-full", btnInfo.error ? "!bg-as-red" : btnInfo.disable ? "!bg-as-on-surface-2" : "!bg-as-brand"), textClassName: (0, cn_1.cn)(btnInfo.error ? "text-white" : btnInfo.disable ? "text-as-secondary" : "text-white"), children: btnInfo.text }) })] }) }, "main-view"),
|
|
257
|
+
(0, jsx_runtime_1.jsx)("div", { className: (0, cn_1.cn)(mode === "page" && "p-6"), children: cryptoPaymentMethodView }, "crypto-payment-method-view"),
|
|
258
|
+
(0, jsx_runtime_1.jsx)("div", { className: (0, cn_1.cn)(mode === "page" && "p-6"), children: fiatPaymentMethodView }, "fiat-payment-method-view"),
|
|
259
|
+
(0, jsx_runtime_1.jsx)("div", { className: (0, cn_1.cn)(mode === "page" && "p-6"), children: recipientSelectionView }, "recipient-selection-view"),
|
|
260
|
+
(0, jsx_runtime_1.jsx)("div", { className: (0, cn_1.cn)(mode === "page" && "p-6"), children: orderDetailsView }, "order-details-view"),
|
|
261
|
+
(0, jsx_runtime_1.jsx)("div", { className: (0, cn_1.cn)(mode === "page" && "p-6"), children: loadingView }, "loading-view"),
|
|
262
|
+
] }) }) }));
|
|
263
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { components } from "../../../types/api";
|
|
2
|
+
interface CryptoReceiveSectionProps {
|
|
3
|
+
isDepositMode?: boolean;
|
|
4
|
+
isBuyMode?: boolean;
|
|
5
|
+
selectedRecipientAddress?: string;
|
|
6
|
+
recipientName?: string;
|
|
7
|
+
onSelectRecipient: () => void;
|
|
8
|
+
dstAmount: string;
|
|
9
|
+
dstToken: components["schemas"]["Token"];
|
|
10
|
+
selectedDstChainId?: number;
|
|
11
|
+
setSelectedDstChainId?: (chainId: number) => void;
|
|
12
|
+
setSelectedDstToken?: (token: components["schemas"]["Token"]) => void;
|
|
13
|
+
onChangeDstAmount?: (value: string) => void;
|
|
14
|
+
anyspendQuote?: any;
|
|
15
|
+
}
|
|
16
|
+
export declare function CryptoReceiveSection({ isDepositMode, isBuyMode, selectedRecipientAddress, recipientName, onSelectRecipient, dstAmount, dstToken, selectedDstChainId, setSelectedDstChainId, setSelectedDstToken, onChangeDstAmount, anyspendQuote, }: CryptoReceiveSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CryptoReceiveSection = CryptoReceiveSection;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const utils_1 = require("../../../../shared/utils");
|
|
6
|
+
const cn_1 = require("../../../../shared/utils/cn");
|
|
7
|
+
const formatAddress_1 = require("../../../../shared/utils/formatAddress");
|
|
8
|
+
const number_1 = require("../../../../shared/utils/number");
|
|
9
|
+
const lucide_react_1 = require("lucide-react");
|
|
10
|
+
const react_1 = require("motion/react");
|
|
11
|
+
const OrderTokenAmount_1 = require("./OrderTokenAmount");
|
|
12
|
+
function CryptoReceiveSection({ isDepositMode = false, isBuyMode = false, selectedRecipientAddress, recipientName, onSelectRecipient, dstAmount, dstToken, selectedDstChainId, setSelectedDstChainId, setSelectedDstToken, onChangeDstAmount, anyspendQuote, }) {
|
|
13
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.motion.div, { initial: { opacity: 0, y: 20, filter: "blur(10px)" }, animate: { opacity: 1, y: 0, filter: "blur(0px)" }, transition: { duration: 0.3, delay: 0.1, ease: "easeInOut" }, className: "receive-section bg-as-surface-secondary border-as-border-secondary relative flex w-full flex-col gap-2 rounded-2xl border p-4 sm:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex w-full items-center justify-between", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-primary/50 flex h-7 items-center text-sm", children: isDepositMode ? "Deposit" : "Receive" }), selectedRecipientAddress ? ((0, jsx_runtime_1.jsx)("button", { className: (0, cn_1.cn)("text-as-tertiarry flex h-7 items-center gap-2 rounded-lg"), onClick: onSelectRecipient, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { className: "text-as-tertiarry flex items-center gap-1 text-sm", children: recipientName ? (0, utils_1.formatUsername)(recipientName) : (0, formatAddress_1.shortenAddress)(selectedRecipientAddress || "") }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] }) })) : ((0, jsx_runtime_1.jsx)("button", { className: "text-as-primary/70 flex items-center gap-1 rounded-lg", onClick: onSelectRecipient, children: (0, jsx_runtime_1.jsx)("div", { className: "text-sm font-medium", children: "Select recipient" }) }))] }), isBuyMode || isDepositMode ? (
|
|
14
|
+
// Fixed destination token display for buy mode and deposit mode
|
|
15
|
+
(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-primary text-2xl font-bold", children: dstAmount || "0" }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-as-brand/10 border-as-brand/30 flex items-center gap-3 rounded-xl border px-4 py-3", children: [dstToken.metadata?.logoURI && ((0, jsx_runtime_1.jsx)("img", { src: dstToken.metadata.logoURI, alt: dstToken.symbol, className: "h-8 w-8 rounded-full" })), (0, jsx_runtime_1.jsx)("span", { className: "text-as-brand text-lg font-bold", children: dstToken.symbol })] })] })) : (
|
|
16
|
+
// Token selection for regular swap mode
|
|
17
|
+
(0, jsx_runtime_1.jsx)(OrderTokenAmount_1.OrderTokenAmount, { address: selectedRecipientAddress, context: "to", inputValue: dstAmount, onChangeInput: onChangeDstAmount || (() => { }), chainId: selectedDstChainId || dstToken.chainId, setChainId: setSelectedDstChainId || (() => { }), token: dstToken, setToken: setSelectedDstToken || (() => { }) })), (0, jsx_runtime_1.jsxs)("div", { className: "text-as-primary/50 flex h-5 items-center text-sm", children: [(0, number_1.formatDisplayNumber)(anyspendQuote?.data?.currencyOut?.amountUsd, {
|
|
18
|
+
style: "currency",
|
|
19
|
+
fallback: "",
|
|
20
|
+
}), anyspendQuote?.data?.currencyIn?.amountUsd &&
|
|
21
|
+
anyspendQuote?.data?.currencyOut?.amountUsd &&
|
|
22
|
+
(() => {
|
|
23
|
+
const calculatePriceImpact = (inputUsd, outputUsd) => {
|
|
24
|
+
if (!inputUsd || !outputUsd) {
|
|
25
|
+
return { percentage: "0.00", isNegative: false };
|
|
26
|
+
}
|
|
27
|
+
const input = Number(inputUsd);
|
|
28
|
+
const output = Number(outputUsd);
|
|
29
|
+
// Handle edge cases
|
|
30
|
+
if (input === 0 || isNaN(input) || isNaN(output) || input <= output) {
|
|
31
|
+
return { percentage: "0.00", isNegative: false };
|
|
32
|
+
}
|
|
33
|
+
const percentageValue = ((output - input) / input) * 100;
|
|
34
|
+
// Handle the -0.00% case
|
|
35
|
+
if (percentageValue > -0.005 && percentageValue < 0) {
|
|
36
|
+
return { percentage: "0.00", isNegative: false };
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
percentage: Math.abs(percentageValue).toFixed(2),
|
|
40
|
+
isNegative: percentageValue < 0,
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
const { percentage, isNegative } = calculatePriceImpact(anyspendQuote.data.currencyIn.amountUsd, anyspendQuote.data.currencyOut.amountUsd);
|
|
44
|
+
// Parse the percentage as a number for comparison
|
|
45
|
+
const percentageNum = parseFloat(percentage);
|
|
46
|
+
// Don't show if less than 1%
|
|
47
|
+
if (percentageNum < 1) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
// Using inline style to ensure color displays
|
|
51
|
+
return ((0, jsx_runtime_1.jsxs)("span", { className: "ml-2", style: { color: percentageNum >= 10 ? "red" : "#FFD700" }, children: ["(", isNegative ? "-" : "", percentage, "%)"] }));
|
|
52
|
+
})()] })] }));
|
|
53
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ErrorSection = ErrorSection;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const lucide_react_1 = require("lucide-react");
|
|
6
|
+
function ErrorSection({ error, message }) {
|
|
7
|
+
if (!error && !message) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
const errorMessage = message || error?.message || "An error occurred";
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "error-section bg-as-on-surface-1 flex w-full max-w-[460px] items-center gap-2 rounded-2xl px-4 py-2", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.CircleAlert, { className: "bg-as-red h-4 min-h-4 w-4 min-w-4 rounded-full p-0 text-sm font-medium text-white" }), (0, jsx_runtime_1.jsx)("div", { className: "text-as-red text-sm", children: errorMessage })] }));
|
|
12
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { components } from "../../../../anyspend/types/api";
|
|
2
2
|
import { FiatPaymentMethod } from "./FiatPaymentMethod";
|
|
3
|
-
export declare function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, selectedPaymentMethod, setActivePanel, _recipientAddress, destinationToken, destinationChainId, destinationAmount, onDestinationTokenChange, onDestinationChainChange, }: {
|
|
3
|
+
export declare function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, selectedPaymentMethod, setActivePanel, _recipientAddress, destinationToken, destinationChainId, destinationAmount, onDestinationTokenChange, onDestinationChainChange, fiatPaymentMethodIndex, }: {
|
|
4
4
|
srcAmountOnRamp: string;
|
|
5
5
|
setSrcAmountOnRamp: (amount: string) => void;
|
|
6
6
|
selectedPaymentMethod?: FiatPaymentMethod;
|
|
@@ -11,4 +11,5 @@ export declare function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, selec
|
|
|
11
11
|
destinationAmount?: string;
|
|
12
12
|
onDestinationTokenChange?: (token: components["schemas"]["Token"]) => void;
|
|
13
13
|
onDestinationChainChange?: (chainId: number) => void;
|
|
14
|
+
fiatPaymentMethodIndex: number;
|
|
14
15
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,7 +12,7 @@ const react_3 = require("react");
|
|
|
12
12
|
const sonner_1 = require("sonner");
|
|
13
13
|
const FiatPaymentMethod_1 = require("./FiatPaymentMethod");
|
|
14
14
|
const OrderTokenAmountFiat_1 = require("./OrderTokenAmountFiat");
|
|
15
|
-
function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, selectedPaymentMethod, setActivePanel, _recipientAddress, destinationToken, destinationChainId, destinationAmount, onDestinationTokenChange, onDestinationChainChange, }) {
|
|
15
|
+
function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, selectedPaymentMethod, setActivePanel, _recipientAddress, destinationToken, destinationChainId, destinationAmount, onDestinationTokenChange, onDestinationChainChange, fiatPaymentMethodIndex, }) {
|
|
16
16
|
// Get geo-based onramp options to access fee information
|
|
17
17
|
const { stripeWeb2Support } = (0, react_1.useGeoOnrampOptions)(srcAmountOnRamp);
|
|
18
18
|
// Helper function to get fees from API data
|
|
@@ -69,7 +69,7 @@ function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, selectedPaymentMetho
|
|
|
69
69
|
const handleQuickAmount = (value) => {
|
|
70
70
|
setSrcAmountOnRamp(value);
|
|
71
71
|
};
|
|
72
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "bg-as-surface-primary flex w-full flex-col", children: [(0, jsx_runtime_1.jsxs)("div", { className: "border-as-border-secondary bg-as-surface-secondary relative flex w-full flex-col rounded-2xl border p-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex h-7 w-full items-center justify-between", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-as-tertiarry flex items-center text-sm font-bold", children: "Pay" }), (0, jsx_runtime_1.jsx)("button", { className: "text-as-tertiarry flex h-7 items-center gap-1 text-sm", onClick: () => setActivePanel(
|
|
72
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "panel-onramp bg-as-surface-primary flex w-full flex-col", children: [(0, jsx_runtime_1.jsxs)("div", { className: "border-as-border-secondary bg-as-surface-secondary relative flex w-full flex-col rounded-2xl border p-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex h-7 w-full items-center justify-between", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-as-tertiarry flex items-center text-sm font-bold", children: "Pay" }), (0, jsx_runtime_1.jsx)("button", { className: "text-as-tertiarry flex h-7 items-center gap-1 text-sm", onClick: () => setActivePanel(fiatPaymentMethodIndex), children: selectedPaymentMethod === FiatPaymentMethod_1.FiatPaymentMethod.COINBASE_PAY ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-blue-600", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs font-bold text-white", children: "C" }) }), "Coinbase Pay"] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) : selectedPaymentMethod === FiatPaymentMethod_1.FiatPaymentMethod.STRIPE ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-blue-600", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs font-bold text-white", children: "S" }) }), "Stripe"] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Select payment method", (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) })] }), (0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center pb-2 pt-8", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-1", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-as-tertiarry text-2xl font-bold", children: "$" }), (0, jsx_runtime_1.jsx)(react_2.Input, { ref: amountInputRef, type: "text", value: srcAmountOnRamp, onChange: handleAmountChange, placeholder: "5", className: "text-as-primary placeholder:text-as-primary/50 h-auto min-w-[70px] border-0 bg-transparent p-0 px-3 pt-1 text-4xl font-bold focus-visible:ring-0 focus-visible:ring-offset-0", style: {
|
|
73
73
|
width: `${Math.max(50, srcAmountOnRamp.length * 34)}px`,
|
|
74
74
|
} })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "mx-auto mb-6 inline-grid grid-cols-4 gap-2", children: ["5", "10", "20", "25"].map(value => ((0, jsx_runtime_1.jsxs)("button", { onClick: () => handleQuickAmount(value), className: `bg-as-surface-secondary border-as-border-secondary hover:border-as-border-secondary h-7 w-14 rounded-lg border text-sm font-medium transition-all duration-200 ${srcAmountOnRamp === value
|
|
75
75
|
? "border-as-border-secondary bg-as-surface-secondary"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { components } from "../../../types/api";
|
|
2
|
+
import { CryptoPaymentMethodType } from "./CryptoPaymentMethod";
|
|
3
|
+
import { FiatPaymentMethod } from "./FiatPaymentMethod";
|
|
4
|
+
interface PaySectionProps {
|
|
5
|
+
paymentType: "crypto" | "fiat";
|
|
6
|
+
selectedSrcChainId: number;
|
|
7
|
+
setSelectedSrcChainId: (chainId: number) => void;
|
|
8
|
+
selectedSrcToken: components["schemas"]["Token"];
|
|
9
|
+
setSelectedSrcToken: (token: components["schemas"]["Token"]) => void;
|
|
10
|
+
srcAmount: string;
|
|
11
|
+
setSrcAmount: (amount: string) => void;
|
|
12
|
+
setIsSrcInputDirty: (dirty: boolean) => void;
|
|
13
|
+
selectedCryptoPaymentMethod: CryptoPaymentMethodType;
|
|
14
|
+
selectedFiatPaymentMethod: FiatPaymentMethod;
|
|
15
|
+
onSelectCryptoPaymentMethod: () => void;
|
|
16
|
+
onSelectFiatPaymentMethod: () => void;
|
|
17
|
+
anyspendQuote?: any;
|
|
18
|
+
}
|
|
19
|
+
export declare function PaySection({ paymentType, selectedSrcChainId, setSelectedSrcChainId, selectedSrcToken, setSelectedSrcToken, srcAmount, setSrcAmount, setIsSrcInputDirty, selectedCryptoPaymentMethod, selectedFiatPaymentMethod, onSelectCryptoPaymentMethod, onSelectFiatPaymentMethod, anyspendQuote, }: PaySectionProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaySection = PaySection;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("../../../../global-account/react");
|
|
6
|
+
const utils_1 = require("../../../../shared/utils");
|
|
7
|
+
const formatAddress_1 = require("../../../../shared/utils/formatAddress");
|
|
8
|
+
const number_1 = require("../../../../shared/utils/number");
|
|
9
|
+
const lucide_react_1 = require("lucide-react");
|
|
10
|
+
const react_2 = require("motion/react");
|
|
11
|
+
const react_3 = require("react");
|
|
12
|
+
const CryptoPaymentMethod_1 = require("./CryptoPaymentMethod");
|
|
13
|
+
const FiatPaymentMethod_1 = require("./FiatPaymentMethod");
|
|
14
|
+
const OrderTokenAmount_1 = require("./OrderTokenAmount");
|
|
15
|
+
const TokenBalance_1 = require("./TokenBalance");
|
|
16
|
+
function PaySection({ paymentType, selectedSrcChainId, setSelectedSrcChainId, selectedSrcToken, setSelectedSrcToken, srcAmount, setSrcAmount, setIsSrcInputDirty, selectedCryptoPaymentMethod, selectedFiatPaymentMethod, onSelectCryptoPaymentMethod, onSelectFiatPaymentMethod, anyspendQuote, }) {
|
|
17
|
+
const { address: globalAddress, wallet: globalWallet, ensName: connectedName } = (0, react_1.useAccountWallet)();
|
|
18
|
+
const connectedAddress = globalWallet?.address;
|
|
19
|
+
const { data: srcTokenMetadata } = (0, react_1.useTokenData)(selectedSrcToken?.chainId, selectedSrcToken?.address);
|
|
20
|
+
// Add ref to track if we've applied metadata
|
|
21
|
+
const appliedSrcMetadataRef = (0, react_3.useRef)(false);
|
|
22
|
+
// Update source token with metadata
|
|
23
|
+
(0, react_3.useEffect)(() => {
|
|
24
|
+
if (selectedSrcToken && srcTokenMetadata && !appliedSrcMetadataRef.current) {
|
|
25
|
+
// Mark as applied
|
|
26
|
+
appliedSrcMetadataRef.current = true;
|
|
27
|
+
const enhancedToken = {
|
|
28
|
+
...selectedSrcToken,
|
|
29
|
+
decimals: srcTokenMetadata.decimals || selectedSrcToken.decimals,
|
|
30
|
+
symbol: srcTokenMetadata.symbol || selectedSrcToken.symbol,
|
|
31
|
+
name: srcTokenMetadata.name || selectedSrcToken.name,
|
|
32
|
+
metadata: {
|
|
33
|
+
...selectedSrcToken.metadata,
|
|
34
|
+
logoURI: srcTokenMetadata?.logoURI || selectedSrcToken.metadata.logoURI,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
setSelectedSrcToken(enhancedToken);
|
|
38
|
+
}
|
|
39
|
+
}, [srcTokenMetadata, selectedSrcToken, setSelectedSrcToken]);
|
|
40
|
+
// Reset source token ref when address/chain changes
|
|
41
|
+
(0, react_3.useEffect)(() => {
|
|
42
|
+
appliedSrcMetadataRef.current = false;
|
|
43
|
+
}, [selectedSrcToken.address, selectedSrcToken.chainId]);
|
|
44
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.motion.div, { initial: { opacity: 0, y: 20, filter: "blur(10px)" }, animate: { opacity: 1, y: 0, filter: "blur(0px)" }, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, className: "bg-as-surface-secondary border-as-border-secondary relative flex w-full flex-col gap-2 rounded-2xl border p-4 sm:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-primary/50 flex h-7 items-center text-sm", children: "Pay" }), paymentType === "crypto" ? ((0, jsx_runtime_1.jsx)("button", { className: "text-as-tertiarry flex h-7 items-center gap-2 text-sm transition-colors", onClick: onSelectCryptoPaymentMethod, children: selectedCryptoPaymentMethod === CryptoPaymentMethod_1.CryptoPaymentMethodType.CONNECT_WALLET ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [globalAddress ? ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-1", children: connectedName ? (0, utils_1.formatUsername)(connectedName) : (0, formatAddress_1.shortenAddress)(connectedAddress || "") })) : ("Connect wallet"), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) : selectedCryptoPaymentMethod === CryptoPaymentMethod_1.CryptoPaymentMethodType.TRANSFER_CRYPTO ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Transfer crypto", (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Select payment method", (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) })) : ((0, jsx_runtime_1.jsx)("button", { className: "text-as-tertiarry flex h-7 items-center gap-2 text-sm transition-colors", onClick: onSelectFiatPaymentMethod, children: selectedFiatPaymentMethod === FiatPaymentMethod_1.FiatPaymentMethod.COINBASE_PAY ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-blue-600", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs font-bold text-white", children: "C" }) }), "Coinbase Pay"] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) : selectedFiatPaymentMethod === FiatPaymentMethod_1.FiatPaymentMethod.STRIPE ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-blue-600", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs font-bold text-white", children: "S" }) }), "Credit/Debit Card"] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Select payment method", (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) }))] }), paymentType === "crypto" ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(OrderTokenAmount_1.OrderTokenAmount, { address: globalAddress, context: "from", inputValue: srcAmount, onChangeInput: value => {
|
|
45
|
+
setIsSrcInputDirty(true);
|
|
46
|
+
setSrcAmount(value);
|
|
47
|
+
}, chainId: selectedSrcChainId, setChainId: setSelectedSrcChainId, token: selectedSrcToken, setToken: setSelectedSrcToken }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-primary/50 flex h-5 items-center text-sm", children: (0, number_1.formatDisplayNumber)(anyspendQuote?.data?.currencyIn?.amountUsd, {
|
|
48
|
+
style: "currency",
|
|
49
|
+
fallback: "",
|
|
50
|
+
}) }), (0, jsx_runtime_1.jsx)(TokenBalance_1.TokenBalance, { token: selectedSrcToken, walletAddress: globalAddress, onChangeInput: value => {
|
|
51
|
+
setIsSrcInputDirty(true);
|
|
52
|
+
setSrcAmount(value);
|
|
53
|
+
} })] })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center pb-2 pt-8", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-1", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-as-tertiarry text-2xl font-bold", children: "$" }), (0, jsx_runtime_1.jsx)(react_1.Input, { type: "text", value: srcAmount, onChange: e => setSrcAmount(e.target.value.replace(/[^0-9.]/g, "")), placeholder: "5", className: "text-as-primary placeholder:text-as-primary/50 h-auto min-w-[70px] border-0 bg-transparent p-0 px-3 pt-1 text-4xl font-bold focus-visible:ring-0 focus-visible:ring-offset-0", style: {
|
|
54
|
+
width: `${Math.max(50, srcAmount.length * 34)}px`,
|
|
55
|
+
} })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "mx-auto mb-6 inline-grid grid-cols-4 gap-2", children: ["5", "10", "20", "25"].map(value => ((0, jsx_runtime_1.jsxs)("button", { onClick: () => setSrcAmount(value), className: `bg-as-surface-secondary border-as-border-secondary hover:border-as-border-secondary h-7 w-14 rounded-lg border text-sm font-medium transition-all duration-200 ${srcAmount === value
|
|
56
|
+
? "border-as-border-secondary bg-as-surface-secondary"
|
|
57
|
+
: "bg-as-surface-secondary hover:bg-as-surface-secondary"}`, children: ["$", value] }, value))) })] }))] }));
|
|
58
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CryptoPaymentMethodType } from "./CryptoPaymentMethod";
|
|
2
|
+
import { FiatPaymentMethod } from "./FiatPaymentMethod";
|
|
3
|
+
interface TabSectionProps {
|
|
4
|
+
activeTab: "crypto" | "fiat";
|
|
5
|
+
setActiveTab: (tab: "crypto" | "fiat") => void;
|
|
6
|
+
setSelectedCryptoPaymentMethod: (method: CryptoPaymentMethodType) => void;
|
|
7
|
+
setSelectedFiatPaymentMethod: (method: FiatPaymentMethod) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function TabSection({ activeTab, setActiveTab, setSelectedCryptoPaymentMethod, setSelectedFiatPaymentMethod, }: TabSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TabSection = TabSection;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const cn_1 = require("../../../../shared/utils/cn");
|
|
6
|
+
const CryptoPaymentMethod_1 = require("./CryptoPaymentMethod");
|
|
7
|
+
const FiatPaymentMethod_1 = require("./FiatPaymentMethod");
|
|
8
|
+
function TabSection({ activeTab, setActiveTab, setSelectedCryptoPaymentMethod, setSelectedFiatPaymentMethod, }) {
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "tab-section w-full", children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-as-surface-secondary relative mb-4 grid h-10 grid-cols-2 rounded-xl", children: [(0, jsx_runtime_1.jsx)("div", { className: (0, cn_1.cn)("bg-as-brand absolute bottom-0 left-0 top-0 z-0 rounded-xl transition-transform duration-100", "h-full w-1/2", activeTab === "fiat" ? "translate-x-full" : "translate-x-0"), style: { willChange: "transform" } }), (0, jsx_runtime_1.jsx)("button", { className: (0, cn_1.cn)("relative z-10 h-full w-full rounded-xl px-3 text-sm font-medium transition-colors duration-100", activeTab === "crypto" ? "text-white" : "text-as-primary/70 hover:bg-as-on-surface-2 bg-transparent"), onClick: () => {
|
|
10
|
+
setActiveTab("crypto");
|
|
11
|
+
setSelectedCryptoPaymentMethod(CryptoPaymentMethod_1.CryptoPaymentMethodType.NONE); // Reset payment method when switching to crypto
|
|
12
|
+
setSelectedFiatPaymentMethod(FiatPaymentMethod_1.FiatPaymentMethod.NONE); // Reset fiat payment method when switching to crypto
|
|
13
|
+
}, children: "Pay with crypto" }), (0, jsx_runtime_1.jsx)("button", { className: (0, cn_1.cn)("relative z-10 h-full w-full rounded-xl px-3 text-sm font-medium transition-colors duration-100", activeTab === "fiat" ? "text-white" : "text-as-primary/70 hover:bg-as-on-surface-2 bg-transparent"), onClick: () => {
|
|
14
|
+
setActiveTab("fiat");
|
|
15
|
+
setSelectedCryptoPaymentMethod(CryptoPaymentMethod_1.CryptoPaymentMethodType.NONE); // Reset crypto payment method when switching to fiat
|
|
16
|
+
setSelectedFiatPaymentMethod(FiatPaymentMethod_1.FiatPaymentMethod.NONE); // Reset fiat payment method when switching to fiat
|
|
17
|
+
}, children: "Pay with Fiat" })] }) }));
|
|
18
|
+
}
|
|
@@ -9,6 +9,7 @@ export { AnySpendStakeB3 } from "./AnySpendStakeB3";
|
|
|
9
9
|
export { AnySpendTournament } from "./AnySpendTournament";
|
|
10
10
|
export { AnySpendNFTButton } from "./common/AnySpendNFTButton";
|
|
11
11
|
export { ChainTokenIcon } from "./common/ChainTokenIcon";
|
|
12
|
+
export { CryptoReceiveSection } from "./common/CryptoReceiveSection";
|
|
12
13
|
export { OrderDetails } from "./common/OrderDetails";
|
|
13
14
|
export { OrderDetailsCollapsible } from "./common/OrderDetailsCollapsible";
|
|
14
15
|
export { OrderHistory } from "./common/OrderHistory";
|
|
@@ -16,6 +17,7 @@ export { OrderHistoryItem } from "./common/OrderHistoryItem";
|
|
|
16
17
|
export { OrderStatus } from "./common/OrderStatus";
|
|
17
18
|
export { OrderToken } from "./common/OrderToken";
|
|
18
19
|
export { OrderTokenAmount } from "./common/OrderTokenAmount";
|
|
20
|
+
export { PaySection } from "./common/PaySection";
|
|
19
21
|
export { RecipientSelection } from "./common/RecipientSelection";
|
|
20
22
|
export { StepProgress } from "./common/StepProgress";
|
|
21
23
|
export { TokenBalance } from "./common/TokenBalance";
|
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.WebviewOnrampPayment = exports.WebviewOnrampOrderStatus = exports.TransferCryptoDetails = exports.TokenBalance = exports.StepProgress = exports.RecipientSelection = exports.OrderTokenAmount = exports.OrderToken = exports.OrderStatus = exports.OrderHistoryItem = exports.OrderHistory = exports.OrderDetailsCollapsible = exports.OrderDetails = exports.ChainTokenIcon = exports.AnySpendNFTButton = exports.AnySpendTournament = exports.AnySpendStakeB3 = exports.AnyspendSignatureMint = exports.AnySpendNFT = exports.AnySpendCustom = exports.AnySpendBuySpin = exports.AnySpendBondKit = exports.AnySpend = void 0;
|
|
17
|
+
exports.WebviewOnrampPayment = exports.WebviewOnrampOrderStatus = exports.TransferCryptoDetails = exports.TokenBalance = exports.StepProgress = exports.RecipientSelection = exports.PaySection = exports.OrderTokenAmount = exports.OrderToken = exports.OrderStatus = exports.OrderHistoryItem = exports.OrderHistory = exports.OrderDetailsCollapsible = exports.OrderDetails = exports.CryptoReceiveSection = exports.ChainTokenIcon = exports.AnySpendNFTButton = exports.AnySpendTournament = exports.AnySpendStakeB3 = exports.AnyspendSignatureMint = exports.AnySpendNFT = exports.AnySpendCustom = exports.AnySpendBuySpin = exports.AnySpendBondKit = exports.AnySpend = void 0;
|
|
18
18
|
// Components
|
|
19
19
|
var AnySpend_1 = require("./AnySpend");
|
|
20
20
|
Object.defineProperty(exports, "AnySpend", { enumerable: true, get: function () { return AnySpend_1.AnySpend; } });
|
|
@@ -38,6 +38,8 @@ Object.defineProperty(exports, "AnySpendNFTButton", { enumerable: true, get: fun
|
|
|
38
38
|
// Common Components
|
|
39
39
|
var ChainTokenIcon_1 = require("./common/ChainTokenIcon");
|
|
40
40
|
Object.defineProperty(exports, "ChainTokenIcon", { enumerable: true, get: function () { return ChainTokenIcon_1.ChainTokenIcon; } });
|
|
41
|
+
var CryptoReceiveSection_1 = require("./common/CryptoReceiveSection");
|
|
42
|
+
Object.defineProperty(exports, "CryptoReceiveSection", { enumerable: true, get: function () { return CryptoReceiveSection_1.CryptoReceiveSection; } });
|
|
41
43
|
var OrderDetails_1 = require("./common/OrderDetails");
|
|
42
44
|
Object.defineProperty(exports, "OrderDetails", { enumerable: true, get: function () { return OrderDetails_1.OrderDetails; } });
|
|
43
45
|
var OrderDetailsCollapsible_1 = require("./common/OrderDetailsCollapsible");
|
|
@@ -52,6 +54,8 @@ var OrderToken_1 = require("./common/OrderToken");
|
|
|
52
54
|
Object.defineProperty(exports, "OrderToken", { enumerable: true, get: function () { return OrderToken_1.OrderToken; } });
|
|
53
55
|
var OrderTokenAmount_1 = require("./common/OrderTokenAmount");
|
|
54
56
|
Object.defineProperty(exports, "OrderTokenAmount", { enumerable: true, get: function () { return OrderTokenAmount_1.OrderTokenAmount; } });
|
|
57
|
+
var PaySection_1 = require("./common/PaySection");
|
|
58
|
+
Object.defineProperty(exports, "PaySection", { enumerable: true, get: function () { return PaySection_1.PaySection; } });
|
|
55
59
|
var RecipientSelection_1 = require("./common/RecipientSelection");
|
|
56
60
|
Object.defineProperty(exports, "RecipientSelection", { enumerable: true, get: function () { return RecipientSelection_1.RecipientSelection; } });
|
|
57
61
|
var StepProgress_1 = require("./common/StepProgress");
|