@dhedge/trading-widget 5.4.0 → 5.6.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.
Files changed (33) hide show
  1. package/complex-withdraw-asset-data-CJHcItJS.cjs +1 -0
  2. package/{complex-withdraw-asset-data-CsznXzIE.js → complex-withdraw-asset-data-Dcnjfbe1.js} +2 -2
  3. package/const.cjs +1 -1
  4. package/const.js +22 -21
  5. package/core-kit/const/network.d.ts +64 -2
  6. package/core-kit/hooks/state/active-action.d.ts +5 -0
  7. package/core-kit/hooks/state/index.d.ts +1 -1
  8. package/core-kit/types/state.types.d.ts +14 -5
  9. package/core-kit/types/trading-panel.types.d.ts +0 -7
  10. package/core-kit/types/trading.types.d.ts +1 -1
  11. package/index.cjs +1 -1
  12. package/index.d.ts +3 -3
  13. package/index.js +2898 -2776
  14. package/limit-orders/component/limit-order-button/approve-and-create-limit-order-button.d.ts +6 -0
  15. package/limit-orders/component/limit-order-button/{limit-order-button.hooks.d.ts → approve-and-create-limit-order-button.hooks.d.ts} +4 -4
  16. package/limit-orders/hooks/use-approve-and-create-limit-order.d.ts +11 -0
  17. package/limit-orders/hooks/use-create-limit-order-transaction.d.ts +8 -0
  18. package/limit-orders/hooks/use-limit-order-approve-transaction.d.ts +1 -1
  19. package/limit-orders/providers/translation-provider/translation-provider.types.d.ts +3 -0
  20. package/package.json +1 -1
  21. package/{storage-DL2GNx3e.js → storage-CHA9ReGl.js} +337 -323
  22. package/storage-DWlbZwWV.cjs +1 -0
  23. package/trading-widget/components/widget/widget-overlay/trading-overlay/withdrawals/success-withdrawal-overlay.hooks.d.ts +2 -1
  24. package/trading-widget/components/widget/widget-overlay/withdraw-stepper-overlay/withdraw-stepper-overlay.hooks.d.ts +4 -3
  25. package/trading-widget/components/withdraw/complete-step/button/claim-button/claim-button.hooks.d.ts +2 -2
  26. package/utils.cjs +1 -1
  27. package/utils.js +1 -1
  28. package/complex-withdraw-asset-data-ColnUVfL.cjs +0 -1
  29. package/core-kit/hooks/state/stepper.d.ts +0 -5
  30. package/limit-orders/component/limit-order-button/limit-order-approve-button.d.ts +0 -2
  31. package/limit-orders/component/limit-order-button/limit-order-approve-button.hooks.d.ts +0 -6
  32. package/limit-orders/component/limit-order-button/limit-order-button.d.ts +0 -6
  33. package/storage-Dk8i88bn.cjs +0 -1
@@ -0,0 +1,6 @@
1
+ import type { FC } from 'react';
2
+ interface ApproveAndCreateLimitOrderButtonProps {
3
+ disabled?: boolean;
4
+ }
5
+ export declare const ApproveAndCreateLimitOrderButton: FC<ApproveAndCreateLimitOrderButtonProps>;
6
+ export {};
@@ -1,12 +1,12 @@
1
- export declare const useLimitOrderButton: () => {
2
- modifyLimitOrder: () => Promise<void>;
1
+ export declare const useApproveAndCreateLimitOrderButton: () => {
2
+ handleClick: () => Promise<void>;
3
3
  disabled: boolean;
4
4
  error: {
5
5
  title: string;
6
6
  hint?: string | undefined;
7
7
  } | null;
8
- isPending: boolean;
8
+ isLoading: boolean;
9
9
  isAmountSufficient: boolean;
10
10
  minAmount: string;
11
- isModifyTransaction: boolean;
11
+ buttonText: string;
12
12
  };
@@ -0,0 +1,11 @@
1
+ export type ApproveAndCreateLimitOrderState = 'idle' | 'approving' | 'waiting-confirmation' | 'creating';
2
+ interface UseApproveAndCreateLimitOrderParams {
3
+ createLimitOrder: () => Promise<void>;
4
+ }
5
+ export declare const useApproveAndCreateLimitOrder: ({ createLimitOrder, }: UseApproveAndCreateLimitOrderParams) => {
6
+ approveAndCreate: () => Promise<void>;
7
+ isLoading: boolean;
8
+ flowState: ApproveAndCreateLimitOrderState;
9
+ needsApproval: boolean;
10
+ };
11
+ export {};
@@ -0,0 +1,8 @@
1
+ export declare const useCreateLimitOrderTransaction: () => {
2
+ createLimitOrder: () => Promise<void>;
3
+ isModifyTransaction: boolean;
4
+ error: {
5
+ title: string;
6
+ hint?: string | undefined;
7
+ } | null;
8
+ };
@@ -1,4 +1,4 @@
1
1
  export declare const useLimitOrderApproveTransaction: () => {
2
2
  approveLimitOrder: () => Promise<void>;
3
- isApprovePending: boolean;
3
+ isApproving: boolean;
4
4
  };
@@ -16,6 +16,9 @@ export type TranslationMap = {
16
16
  limitOrderTerms: string;
17
17
  create: string;
18
18
  modify: string;
19
+ approveLimitOrderStep: string;
20
+ createLimitOrderStep: string;
21
+ modifyLimitOrderStep: string;
19
22
  delete: string;
20
23
  cancel: string;
21
24
  invalidLimitOrderPriceError: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhedge/trading-widget",
3
- "version": "5.4.0",
3
+ "version": "5.6.1",
4
4
  "dependencies": {
5
5
  "@headlessui/react": "^2.1.2",
6
6
  "@heroicons/react": "^2.1.5",