@dhedge/trading-widget 4.0.8-canary.2 → 4.0.9

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 (35) hide show
  1. package/README.md +4 -1
  2. package/core-kit/const/currency.d.ts +0 -1
  3. package/core-kit/const/gmx.d.ts +3 -2
  4. package/core-kit/utils/error.d.ts +1 -0
  5. package/core-kit/utils/formatter.d.ts +0 -5
  6. package/core-kit/utils/token.d.ts +0 -1
  7. package/index.cjs +10 -10
  8. package/index.js +4214 -4281
  9. package/limit-orders/component/common/price-input.d.ts +1 -0
  10. package/package.json +1 -1
  11. package/style.css +1 -1
  12. package/trading-widget/components/common/balance/balance.d.ts +1 -0
  13. package/trading-widget/components/common/button/disabled-button-with-prompt/disabled-button-with-prompt.d.ts +0 -1
  14. package/trading-widget/components/common/layout/balance/balance.d.ts +2 -0
  15. package/trading-widget/components/common/layout/index.d.ts +2 -0
  16. package/trading-widget/components/deposit/balance/balance.d.ts +2 -0
  17. package/trading-widget/components/deposit/balance/balance.hooks.d.ts +4 -0
  18. package/trading-widget/components/widget/widget-buttons/index.d.ts +0 -1
  19. package/trading-widget/components/widget/widget-input/index.d.ts +0 -3
  20. package/trading-widget/components/widget/widget-input/widget-input.d.ts +2 -2
  21. package/trading-widget/components/widget/widget-input/widget-input.hooks.d.ts +1 -0
  22. package/trading-widget/components/withdraw/init-step/balance/init-withdraw-balance.d.ts +2 -0
  23. package/trading-widget/components/withdraw/init-step/balance/init-withdraw-balance.hooks.d.ts +4 -0
  24. package/trading-widget/providers/component-provider/component-provider.d.ts +0 -1
  25. package/trading-widget/providers/component-provider/component-provider.hooks.d.ts +0 -1
  26. package/trading-widget/providers/component-provider/component-provider.types.d.ts +0 -4
  27. package/trading-widget/providers/theme-provider/theme-provider.types.d.ts +2 -11
  28. package/trading-widget/providers/translation-provider/translation-provider.types.d.ts +4 -1
  29. package/trading-widget/components/widget/widget-buttons/limit-order-button/limit-order-button.d.ts +0 -3
  30. package/trading-widget/components/widget/widget-input/input-arrow/input-arrow.d.ts +0 -2
  31. package/trading-widget/components/widget/widget-input/input-arrow/input-arrow.hooks.d.ts +0 -3
  32. package/trading-widget/components/widget/widget-input/receive-token-balance/receive-token-balance.d.ts +0 -2
  33. package/trading-widget/components/widget/widget-input/receive-token-balance/receive-token-balance.hooks.d.ts +0 -3
  34. package/trading-widget/components/widget/widget-input/send-token-balance/send-token-balance.d.ts +0 -2
  35. package/trading-widget/components/widget/widget-input/send-token-balance/send-token-balance.hooks.d.ts +0 -3
package/README.md CHANGED
@@ -507,10 +507,14 @@ path: `component.meta[name]`
507
507
  > | `lengthenLockup` | string | Lengthen lockup to remove entry fee | |
508
508
  > | `deposit` | string | Buy | |
509
509
  > | `withdraw` | string | Sell | |
510
+ > | `yourBalance` | string | Your Balance | |
510
511
  > | `max` | string | Max | |
511
512
  > | `allAssets` | string | All Assets | |
512
513
  > | `all` | string | All | |
514
+ > | `payWith` | string | Pay with | |
515
+ > | `buyEstimated` | string | Buy (estimated) | |
513
516
  > | `sell` | string | Sell | |
517
+ > | `receiveEstimated` | string | Receive (estimated) | |
514
518
  > | `confirmInWallet` | string | Please confirm in wallet | |
515
519
  > | `pending` | string | Pending... | |
516
520
  > | `approve` | string | Approve | |
@@ -578,7 +582,6 @@ path: `component.meta[name]`
578
582
  > | `paidLabel` | string | Paid | |
579
583
  > | `priceLabel` | string | Price | |
580
584
  > | `transactionLabel` | string | Transaction | |
581
- > | `stopOrder` | string | Stop Order | |
582
585
 
583
586
  ###### Source: `packages/trading-widget/src/trading-widget/providers/translation-provider/translation-provider.tsx`
584
587
 
@@ -1,4 +1,3 @@
1
1
  import type { ApyCurrency } from '../types';
2
2
  export declare const CURRENCY_SYMBOL_MAP: Record<ApyCurrency, string>;
3
3
  export declare const CURRENCY_DECIMALS_MAP: Record<ApyCurrency, number>;
4
- export declare const STABLE_TOKEN_SYMBOLS: string[];
@@ -1,5 +1,4 @@
1
1
  import type { TradingToken } from '../types';
2
- export type GmxMarketAsset = '0x09400d9db990d5ed3f35d7be61dfaeb900af03c9' | '0x47c031236e19d024b42f8ae6780e44a573170703' | '0x70d95587d40a2caf56bd97485ab3eec10bee6336' | '0x450bb6774dd8a756274e0ab4107953259d2ac541' | '0x6ecf2133e2c9751caadcb6958b9654bae198a797' | '0x6853ea96ff216fab11d2d930ce3c508556a4bdc4' | '0x0ccb4faa6f1f1b30911619f1184082ab4e25813c' | '0x0e46941f9bff8d0784bffa3d0d7883cdb82d7ae7' | '0xbcb8fe13d02b023e8f94f6881cc0192fd918a5c0' | '0x2d340912aa47e33c90efb078e69e70efe2b34b9b';
3
2
  export declare const GMX_MARKET_ASSETS_MAP: {
4
3
  readonly SOL_ARBITRUM: "0x09400d9db990d5ed3f35d7be61dfaeb900af03c9";
5
4
  readonly BTC_ARBITRUM: "0x47c031236e19d024b42f8ae6780e44a573170703";
@@ -11,6 +10,8 @@ export declare const GMX_MARKET_ASSETS_MAP: {
11
10
  readonly CRV_ARBITRUM: "0x0e46941f9bff8d0784bffa3d0d7883cdb82d7ae7";
12
11
  readonly HYPE_ARBITRUM: "0xbcb8fe13d02b023e8f94f6881cc0192fd918a5c0";
13
12
  readonly BNB_ARBITRUM: "0x2d340912aa47e33c90efb078e69e70efe2b34b9b";
13
+ readonly LINK_ARBITRUM: "0x7f1fa204bb700853d36994da19f830b6ad18455c";
14
14
  };
15
- export declare const GMX_MARKET_ASSETS: ("0x09400d9db990d5ed3f35d7be61dfaeb900af03c9" | "0x47c031236e19d024b42f8ae6780e44a573170703" | "0x70d95587d40a2caf56bd97485ab3eec10bee6336" | "0x450bb6774dd8a756274e0ab4107953259d2ac541" | "0x6ecf2133e2c9751caadcb6958b9654bae198a797" | "0x6853ea96ff216fab11d2d930ce3c508556a4bdc4" | "0x0ccb4faa6f1f1b30911619f1184082ab4e25813c" | "0x0e46941f9bff8d0784bffa3d0d7883cdb82d7ae7" | "0xbcb8fe13d02b023e8f94f6881cc0192fd918a5c0" | "0x2d340912aa47e33c90efb078e69e70efe2b34b9b")[];
15
+ export type GmxMarketAsset = (typeof GMX_MARKET_ASSETS_MAP)[keyof typeof GMX_MARKET_ASSETS_MAP];
16
+ export declare const GMX_MARKET_ASSETS: GmxMarketAsset[];
16
17
  export declare const GMX_WITHDRAW_ASSET_MAP: Record<GmxMarketAsset, TradingToken>;
@@ -7,6 +7,7 @@ export declare const getErrorMessage: (error: unknown) => string;
7
7
  export declare const validateLoggerEventParams: (paramsMap: Record<string, {
8
8
  type: 'string' | 'number';
9
9
  }>) => boolean;
10
+ export declare const getErrorKey: (value: string, keys?: string[]) => string | undefined;
10
11
  export declare const parseContractErrorMessage: ({ errorMessage, abiErrors, }: {
11
12
  errorMessage: string | undefined | null;
12
13
  abiErrors: string[];
@@ -20,8 +20,3 @@ export declare function formatBalanceInUsd(balance: string | undefined, tokenPri
20
20
  balanceInUsdNumber: number;
21
21
  };
22
22
  export declare const formatVaultBalance: (balance: bigint | undefined, tokenPrice: bigint | undefined) => Balance;
23
- export declare const formatTokenBalance: ({ balance, symbol, precision, }: {
24
- balance: string;
25
- symbol: string;
26
- precision: number;
27
- }) => string;
@@ -6,4 +6,3 @@ export declare const getNativeTokenInvestableBalance: ({ nativeTokenBalance, tok
6
6
  gasPrice: number;
7
7
  tokenDecimals: number;
8
8
  }) => BigNumber;
9
- export declare const isStableSymbol: (symbol: string) => boolean;