@ensofinance/checkout-widget 0.0.18 → 0.0.19

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/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { ComponentType } from 'react';
4
4
  import { JSX as JSX_2 } from 'react/jsx-runtime';
5
5
  import { SystemConfig as WidgetTheme } from '@chakra-ui/react';
6
6
 
7
- export declare const Checkout: ({ config: { apiKey, tokenOut, chainIdOut, theme, enableExchange, cexBridgeChainMapping }, onClose, wrapper, }: {
7
+ export declare const Checkout: ({ config: { apiKey, tokenOut, chainIdOut, theme, enableExchange, cexBridgeChainMapping, recipient }, onClose, wrapper, }: {
8
8
  config: CheckoutConfig;
9
9
  wrapper?: ComponentType;
10
10
  onClose?: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ensofinance/checkout-widget",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "type": "module",
5
5
  "homepage": "https://www.enso.build/",
6
6
  "repository": {
@@ -283,6 +283,9 @@ export const config = defineConfig({
283
283
  border: {
284
284
  value: "#E4E4E7",
285
285
  },
286
+ "border.subtle": {
287
+ value: "#F4F4F5",
288
+ },
286
289
  "border.emphasized": {
287
290
  value: "#1e171f4d",
288
291
  },
@@ -15,7 +15,7 @@ type ICheckoutContext = {
15
15
  const CheckoutContext = createContext<ICheckoutContext>({} as ICheckoutContext);
16
16
 
17
17
  const Checkout = ({
18
- config: { apiKey, tokenOut, chainIdOut, theme, enableExchange, cexBridgeChainMapping },
18
+ config: { apiKey, tokenOut, chainIdOut, theme, enableExchange, cexBridgeChainMapping, recipient },
19
19
  onClose,
20
20
  wrapper,
21
21
  }: {
@@ -26,6 +26,7 @@ const Checkout = ({
26
26
  const setEnsoApiToken = useAppStore((state) => state.setEnsoApiToken);
27
27
  const setTokenOut = useAppStore((state) => state.setTokenOut);
28
28
  const setChainIdOut = useAppStore((state) => state.setChainIdOut);
29
+ const setRecipient = useAppStore((state) => state.setRecipient);
29
30
 
30
31
  const handleClose = useMemo(
31
32
  () =>
@@ -42,7 +43,8 @@ const Checkout = ({
42
43
  useEffect(() => {
43
44
  setTokenOut(tokenOut);
44
45
  setChainIdOut(chainIdOut);
45
- }, [tokenOut, chainIdOut]);
46
+ setRecipient(recipient);
47
+ }, [tokenOut, chainIdOut, recipient]);
46
48
 
47
49
  useEffect(() => {
48
50
  if (!apiKey) alert("Please provide an API key");