@b3dotfun/sdk 0.0.49 → 0.0.50-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/constants/index.d.ts +1 -0
- package/dist/cjs/anyspend/constants/index.js +12 -2
- package/dist/cjs/anyspend/react/components/AnySpend.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpend.js +18 -5
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +12 -3
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +11 -4
- package/dist/cjs/anyspend/react/components/common/CryptoPaySection.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/common/CryptoPaySection.js +2 -2
- package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.js +17 -11
- package/dist/cjs/anyspend/react/components/common/FeeBreakDown.d.ts +12 -0
- package/dist/cjs/anyspend/react/components/common/FeeBreakDown.js +19 -0
- package/dist/cjs/anyspend/react/components/common/FeeDetailPanel.d.ts +8 -0
- package/dist/cjs/anyspend/react/components/common/FeeDetailPanel.js +116 -0
- package/dist/cjs/anyspend/react/components/common/OrderDetails.d.ts +1 -0
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +6 -6
- package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.d.ts +1 -0
- package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +3 -2
- package/dist/cjs/anyspend/react/components/common/OrderToken.js +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmount.js +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmountFiat.js +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmountNew.js +1 -1
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +36 -21
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +2 -1
- package/dist/cjs/anyspend/react/components/common/PointsDetailPanel.js +1 -2
- package/dist/cjs/anyspend/react/contexts/FeatureFlagsContext.js +1 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.d.ts +3 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.js +1 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +48 -12
- package/dist/cjs/anyspend/types/api.d.ts +133 -178
- package/dist/cjs/anyspend/utils/chain.js +4 -4
- package/dist/cjs/bondkit/bondkitToken.d.ts +3 -1
- package/dist/cjs/bondkit/bondkitToken.js +21 -2
- package/dist/cjs/bondkit/components/TradingView.d.ts +1 -1
- package/dist/cjs/bondkit/components/TradingView.js +14 -3
- package/dist/cjs/bondkit/components/index.d.ts +1 -1
- package/dist/cjs/bondkit/components/index.js +1 -1
- package/dist/cjs/bondkit/components/types.d.ts +1 -0
- package/dist/cjs/bondkit/config.d.ts +1 -0
- package/dist/cjs/bondkit/config.js +1 -0
- package/dist/cjs/bondkit/index.d.ts +1 -1
- package/dist/cjs/bondkit/index.js +2 -6
- package/dist/cjs/bondkit/types.d.ts +15 -0
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +1 -1
- package/dist/cjs/global-account/react/components/B3Provider/RelayKitProviderWrapper.js +2 -2
- package/dist/cjs/global-account/react/components/ui/tooltip.js +1 -1
- package/dist/cjs/global-account/react/hooks/useAuthentication.js +11 -0
- package/dist/cjs/shared/generated/chain-networks.json +40 -7
- package/dist/esm/anyspend/constants/index.d.ts +1 -0
- package/dist/esm/anyspend/constants/index.js +11 -1
- package/dist/esm/anyspend/react/components/AnySpend.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpend.js +18 -5
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +14 -5
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +11 -4
- package/dist/esm/anyspend/react/components/common/CryptoPaySection.d.ts +3 -1
- package/dist/esm/anyspend/react/components/common/CryptoPaySection.js +4 -4
- package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.d.ts +3 -1
- package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.js +19 -13
- package/dist/esm/anyspend/react/components/common/FeeBreakDown.d.ts +12 -0
- package/dist/esm/anyspend/react/components/common/FeeBreakDown.js +16 -0
- package/dist/esm/anyspend/react/components/common/FeeDetailPanel.d.ts +8 -0
- package/dist/esm/anyspend/react/components/common/FeeDetailPanel.js +113 -0
- package/dist/esm/anyspend/react/components/common/OrderDetails.d.ts +1 -0
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +6 -6
- package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.d.ts +1 -0
- package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +4 -3
- package/dist/esm/anyspend/react/components/common/OrderToken.js +1 -1
- package/dist/esm/anyspend/react/components/common/OrderTokenAmount.js +1 -1
- package/dist/esm/anyspend/react/components/common/OrderTokenAmountFiat.js +1 -1
- package/dist/esm/anyspend/react/components/common/OrderTokenAmountNew.js +1 -1
- package/dist/esm/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
- package/dist/esm/anyspend/react/components/common/PanelOnramp.js +38 -23
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +2 -1
- package/dist/esm/anyspend/react/components/common/PointsDetailPanel.js +2 -3
- package/dist/esm/anyspend/react/contexts/FeatureFlagsContext.js +1 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.d.ts +3 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.js +1 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +48 -12
- package/dist/esm/anyspend/types/api.d.ts +133 -178
- package/dist/esm/anyspend/utils/chain.js +4 -4
- package/dist/esm/bondkit/bondkitToken.d.ts +3 -1
- package/dist/esm/bondkit/bondkitToken.js +21 -2
- package/dist/esm/bondkit/components/TradingView.d.ts +1 -1
- package/dist/esm/bondkit/components/TradingView.js +14 -3
- package/dist/esm/bondkit/components/index.d.ts +1 -1
- package/dist/esm/bondkit/components/index.js +1 -1
- package/dist/esm/bondkit/components/types.d.ts +1 -0
- package/dist/esm/bondkit/config.d.ts +1 -0
- package/dist/esm/bondkit/config.js +1 -0
- package/dist/esm/bondkit/index.d.ts +1 -1
- package/dist/esm/bondkit/index.js +1 -1
- package/dist/esm/bondkit/types.d.ts +15 -0
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +1 -1
- package/dist/esm/global-account/react/components/B3Provider/RelayKitProviderWrapper.js +2 -2
- package/dist/esm/global-account/react/components/ui/tooltip.js +1 -1
- package/dist/esm/global-account/react/hooks/useAuthentication.js +11 -0
- package/dist/esm/shared/generated/chain-networks.json +40 -7
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/constants/index.d.ts +1 -0
- package/dist/types/anyspend/react/components/AnySpend.d.ts +2 -1
- package/dist/types/anyspend/react/components/common/CryptoPaySection.d.ts +3 -1
- package/dist/types/anyspend/react/components/common/CryptoReceiveSection.d.ts +3 -1
- package/dist/types/anyspend/react/components/common/FeeBreakDown.d.ts +12 -0
- package/dist/types/anyspend/react/components/common/FeeDetailPanel.d.ts +8 -0
- package/dist/types/anyspend/react/components/common/OrderDetails.d.ts +1 -0
- package/dist/types/anyspend/react/components/common/OrderDetailsCollapsible.d.ts +1 -0
- package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
- package/dist/types/anyspend/react/hooks/useAnyspendFlow.d.ts +3 -1
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +48 -12
- package/dist/types/anyspend/types/api.d.ts +133 -178
- package/dist/types/bondkit/bondkitToken.d.ts +3 -1
- package/dist/types/bondkit/components/TradingView.d.ts +1 -1
- package/dist/types/bondkit/components/index.d.ts +1 -1
- package/dist/types/bondkit/components/types.d.ts +1 -0
- package/dist/types/bondkit/config.d.ts +1 -0
- package/dist/types/bondkit/index.d.ts +1 -1
- package/dist/types/bondkit/types.d.ts +15 -0
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
- package/package.json +3 -3
- package/src/anyspend/constants/index.ts +12 -1
- package/src/anyspend/react/components/AnySpend.tsx +33 -0
- package/src/anyspend/react/components/AnySpendCustom.tsx +69 -7
- package/src/anyspend/react/components/AnyspendDepositHype.tsx +24 -0
- package/src/anyspend/react/components/common/CryptoPaySection.tsx +14 -2
- package/src/anyspend/react/components/common/CryptoReceiveSection.tsx +31 -11
- package/src/anyspend/react/components/common/FeeBreakDown.tsx +105 -0
- package/src/anyspend/react/components/common/FeeDetailPanel.tsx +334 -0
- package/src/anyspend/react/components/common/OrderDetails.tsx +7 -0
- package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +16 -0
- package/src/anyspend/react/components/common/OrderToken.tsx +1 -1
- package/src/anyspend/react/components/common/OrderTokenAmount.tsx +1 -1
- package/src/anyspend/react/components/common/OrderTokenAmountFiat.tsx +1 -1
- package/src/anyspend/react/components/common/OrderTokenAmountNew.tsx +1 -1
- package/src/anyspend/react/components/common/PanelOnramp.tsx +58 -27
- package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +18 -6
- package/src/anyspend/react/components/common/PointsDetailPanel.tsx +1 -13
- package/src/anyspend/react/contexts/FeatureFlagsContext.tsx +2 -2
- package/src/anyspend/react/hooks/useAnyspendFlow.ts +1 -0
- package/src/anyspend/types/api.ts +135 -178
- package/src/anyspend/utils/chain.ts +4 -4
- package/src/bondkit/bondkitToken.ts +26 -2
- package/src/bondkit/components/TradingView.tsx +15 -3
- package/src/bondkit/components/index.ts +1 -1
- package/src/bondkit/components/types.ts +1 -0
- package/src/bondkit/config.ts +2 -0
- package/src/bondkit/index.ts +1 -1
- package/src/bondkit/types.ts +19 -0
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +1 -1
- package/src/global-account/react/components/B3Provider/RelayKitProviderWrapper.tsx +2 -2
- package/src/global-account/react/components/ui/tooltip.tsx +11 -9
- package/src/global-account/react/hooks/useAuthentication.ts +13 -1
- package/src/shared/generated/chain-networks.json +40 -7
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { useCoinbaseOnrampOptions
|
|
1
|
+
import { useCoinbaseOnrampOptions } from "@b3dotfun/sdk/anyspend/react";
|
|
2
2
|
import { components } from "@b3dotfun/sdk/anyspend/types/api";
|
|
3
3
|
import { GetQuoteResponse } from "@b3dotfun/sdk/anyspend/types/api_req_res";
|
|
4
4
|
import { ALL_CHAINS } from "@b3dotfun/sdk/anyspend/utils/chain";
|
|
5
5
|
import { Input, useGetGeo, useProfile } from "@b3dotfun/sdk/global-account/react";
|
|
6
6
|
import { cn, formatUsername } from "@b3dotfun/sdk/shared/utils";
|
|
7
7
|
import { formatAddress } from "@b3dotfun/sdk/shared/utils/formatAddress";
|
|
8
|
-
import { ChevronRight, Wallet } from "lucide-react";
|
|
8
|
+
import { ChevronRight, Info, Wallet } from "lucide-react";
|
|
9
9
|
import { useRef } from "react";
|
|
10
10
|
import { toast } from "sonner";
|
|
11
11
|
import { useFeatureFlags } from "../../contexts/FeatureFlagsContext";
|
|
@@ -30,6 +30,7 @@ export function PanelOnramp({
|
|
|
30
30
|
hideDstToken = false,
|
|
31
31
|
anyspendQuote,
|
|
32
32
|
onShowPointsDetail,
|
|
33
|
+
onShowFeeDetail,
|
|
33
34
|
customUsdInputValues = ["5", "10", "20", "25"],
|
|
34
35
|
}: {
|
|
35
36
|
srcAmountOnRamp: string;
|
|
@@ -48,39 +49,46 @@ export function PanelOnramp({
|
|
|
48
49
|
hideDstToken?: boolean;
|
|
49
50
|
anyspendQuote?: GetQuoteResponse;
|
|
50
51
|
onShowPointsDetail?: () => void;
|
|
52
|
+
onShowFeeDetail?: () => void;
|
|
51
53
|
customUsdInputValues?: string[];
|
|
52
54
|
}) {
|
|
53
55
|
const featureFlags = useFeatureFlags();
|
|
54
|
-
// Get geo-based onramp options to access fee information
|
|
55
|
-
const { stripeWeb2Support } = useGeoOnrampOptions(srcAmountOnRamp);
|
|
56
56
|
|
|
57
|
-
// Helper function to get fees from
|
|
57
|
+
// Helper function to get fees from anyspend quote
|
|
58
58
|
const getFeeFromApi = (paymentMethod: FiatPaymentMethod): number | null => {
|
|
59
|
+
// Try to get fee from anyspend quote first (most accurate)
|
|
60
|
+
if (anyspendQuote?.data?.fee) {
|
|
61
|
+
const fee = anyspendQuote.data.fee;
|
|
62
|
+
if (fee.type === "stripeweb2_fee") {
|
|
63
|
+
// Calculate total fee in USD from originalAmount - finalAmount
|
|
64
|
+
const originalAmount = Number(fee.originalAmount) / 1e6; // Convert from wei to USD
|
|
65
|
+
const finalAmount = Number(fee.finalAmount) / 1e6;
|
|
66
|
+
return originalAmount - finalAmount;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Fallback to payment method defaults
|
|
59
71
|
switch (paymentMethod) {
|
|
60
72
|
case FiatPaymentMethod.COINBASE_PAY:
|
|
61
|
-
// Coinbase
|
|
62
|
-
return 0;
|
|
73
|
+
return 0; // Coinbase has no additional fees
|
|
63
74
|
case FiatPaymentMethod.STRIPE:
|
|
64
|
-
|
|
65
|
-
if (stripeWeb2Support && "formattedFeeUsd" in stripeWeb2Support) {
|
|
66
|
-
return parseFloat(stripeWeb2Support.formattedFeeUsd) || 0;
|
|
67
|
-
}
|
|
68
|
-
return null;
|
|
75
|
+
return null; // No quote available yet
|
|
69
76
|
default:
|
|
70
|
-
return null;
|
|
77
|
+
return null;
|
|
71
78
|
}
|
|
72
79
|
};
|
|
73
80
|
|
|
74
81
|
// Helper function to get total amount from API (for Stripe) or calculate it (for others)
|
|
75
82
|
const getTotalAmount = (paymentMethod: FiatPaymentMethod): number => {
|
|
76
83
|
const baseAmount = parseFloat(srcAmountOnRamp) || 5;
|
|
77
|
-
const fee = getFeeFromApi(paymentMethod);
|
|
78
84
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return
|
|
85
|
+
// Try to get from anyspend quote first (most accurate)
|
|
86
|
+
if (anyspendQuote?.data?.fee?.type === "stripeweb2_fee") {
|
|
87
|
+
return Number(anyspendQuote.data.fee.originalAmount) / 1e6; // Convert from wei to USD
|
|
82
88
|
}
|
|
83
89
|
|
|
90
|
+
const fee = getFeeFromApi(paymentMethod);
|
|
91
|
+
|
|
84
92
|
// For Coinbase or when fee is available, calculate manually
|
|
85
93
|
if (fee !== null) {
|
|
86
94
|
return baseAmount + fee;
|
|
@@ -257,13 +265,16 @@ export function PanelOnramp({
|
|
|
257
265
|
|
|
258
266
|
<div className="">
|
|
259
267
|
<div className="flex items-center justify-between">
|
|
260
|
-
<div className="flex items-center gap-
|
|
261
|
-
<span className="text-as-tertiarry text-sm">
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
268
|
+
<div className="flex items-center gap-1.5">
|
|
269
|
+
<span className="text-as-tertiarry text-sm">Total</span>
|
|
270
|
+
{anyspendQuote?.data?.fee && onShowFeeDetail && (
|
|
271
|
+
<button
|
|
272
|
+
onClick={onShowFeeDetail}
|
|
273
|
+
className="text-as-primary/40 hover:text-as-primary/60 transition-colors"
|
|
274
|
+
>
|
|
275
|
+
<Info className="h-4 w-4" />
|
|
276
|
+
</button>
|
|
277
|
+
)}
|
|
267
278
|
{featureFlags.showPoints &&
|
|
268
279
|
anyspendQuote?.data?.pointsAmount &&
|
|
269
280
|
anyspendQuote?.data?.pointsAmount > 0 && (
|
|
@@ -274,9 +285,29 @@ export function PanelOnramp({
|
|
|
274
285
|
/>
|
|
275
286
|
)}
|
|
276
287
|
</div>
|
|
277
|
-
<
|
|
278
|
-
|
|
279
|
-
|
|
288
|
+
<div className="flex flex-col items-end gap-0.5">
|
|
289
|
+
<span className="text-as-primary font-semibold">
|
|
290
|
+
${getTotalAmount(selectedPaymentMethod || FiatPaymentMethod.NONE).toFixed(2)}
|
|
291
|
+
</span>
|
|
292
|
+
{(() => {
|
|
293
|
+
// For fiat payments, show the fee from the payment method
|
|
294
|
+
const fiatFee = getFeeFromApi(selectedPaymentMethod || FiatPaymentMethod.NONE);
|
|
295
|
+
if (fiatFee !== null && fiatFee > 0) {
|
|
296
|
+
return <span className="text-as-secondary text-xs">incl. ${fiatFee.toFixed(2)} fee</span>;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// For crypto payments (standard_fee), calculate from the quote
|
|
300
|
+
if (anyspendQuote?.data?.fee?.type === "standard_fee" && anyspendQuote.data.currencyIn?.amountUsd) {
|
|
301
|
+
const cryptoFee =
|
|
302
|
+
(Number(anyspendQuote.data.currencyIn.amountUsd) * anyspendQuote.data.fee.finalFeeBps) / 10000;
|
|
303
|
+
if (cryptoFee > 0) {
|
|
304
|
+
return <span className="text-as-secondary text-xs">incl. ${cryptoFee.toFixed(2)} fee</span>;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
return null;
|
|
309
|
+
})()}
|
|
310
|
+
</div>
|
|
280
311
|
</div>
|
|
281
312
|
</div>
|
|
282
313
|
</div>
|
|
@@ -194,12 +194,24 @@ function PanelOnrampPaymentInner(props: PanelOnrampPaymentProps) {
|
|
|
194
194
|
<div className="border-b3-react-border border-t pt-3">
|
|
195
195
|
<div className="flex items-center justify-between">
|
|
196
196
|
<p className="text-b3-react-foreground font-semibold">Amount</p>
|
|
197
|
-
<
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
197
|
+
<div className="flex flex-col items-end gap-0.5">
|
|
198
|
+
<p
|
|
199
|
+
className="text-b3-react-foreground hover:text-b3-react-foreground/80 cursor-pointer text-xl font-semibold transition-colors"
|
|
200
|
+
onClick={onBack}
|
|
201
|
+
>
|
|
202
|
+
${parseFloat(srcAmountOnRamp).toFixed(2)}
|
|
203
|
+
</p>
|
|
204
|
+
{anyspendQuote?.data?.fee?.type === "standard_fee" && anyspendQuote.data.currencyIn?.amountUsd && (
|
|
205
|
+
<p className="text-b3-react-foreground/60 text-xs">
|
|
206
|
+
incl. $
|
|
207
|
+
{(
|
|
208
|
+
(Number(anyspendQuote.data.currencyIn.amountUsd) * anyspendQuote.data.fee.finalFeeBps) /
|
|
209
|
+
10000
|
|
210
|
+
).toFixed(2)}{" "}
|
|
211
|
+
fee
|
|
212
|
+
</p>
|
|
213
|
+
)}
|
|
214
|
+
</div>
|
|
203
215
|
</div>
|
|
204
216
|
</div>
|
|
205
217
|
</div>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShinyButton } from "@b3dotfun/sdk/global-account/react";
|
|
2
2
|
import { cn } from "@b3dotfun/sdk/shared/utils/cn";
|
|
3
|
-
import { ArrowDown } from "lucide-react";
|
|
4
3
|
import Link from "next/link";
|
|
5
4
|
|
|
6
5
|
interface PointsDetailPanelProps {
|
|
@@ -11,17 +10,6 @@ interface PointsDetailPanelProps {
|
|
|
11
10
|
export function PointsDetailPanel({ pointsAmount = 0, onBack }: PointsDetailPanelProps) {
|
|
12
11
|
return (
|
|
13
12
|
<div className="mx-auto flex w-[460px] max-w-full flex-col items-center gap-4">
|
|
14
|
-
<div className="flex w-full items-center justify-between">
|
|
15
|
-
<Button
|
|
16
|
-
variant="ghost"
|
|
17
|
-
onClick={onBack}
|
|
18
|
-
className="text-as-primary/70 hover:text-as-primary flex items-center gap-2"
|
|
19
|
-
>
|
|
20
|
-
<ArrowDown className="h-4 w-4 rotate-90" />
|
|
21
|
-
Back
|
|
22
|
-
</Button>
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
13
|
<div className="flex flex-col items-center gap-4 text-center">
|
|
26
14
|
<h3 className="text-as-primary text-xl font-bold">Earn Points with Every Swap</h3>
|
|
27
15
|
<p className="text-as-primary/70 text-balance text-sm leading-relaxed">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { createContext, useContext
|
|
3
|
+
import { ReactNode, createContext, useContext } from "react";
|
|
4
4
|
|
|
5
5
|
export interface FeatureFlags {
|
|
6
6
|
showPoints?: boolean;
|
|
@@ -18,7 +18,7 @@ interface FeatureFlagsProviderProps {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
const defaultFeatureFlags: FeatureFlags = {
|
|
21
|
-
showPoints:
|
|
21
|
+
showPoints: true,
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export function FeatureFlagsProvider({ children, featureFlags = defaultFeatureFlags }: FeatureFlagsProviderProps) {
|