@dhedge/trading-widget 3.5.5 → 3.5.7

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/README.md CHANGED
@@ -483,7 +483,8 @@ path: `component.meta[name]`
483
483
  > | `connectWallet` | string | Connect Wallet | |
484
484
  > | `minimumPurchase` | string | Minimum purchase is ${value} | |
485
485
  > | `poolIsInactive` | string | {poolSymbol} token is no longer active. Please withdraw from them. | |
486
- > | `poolIsMaintenance` | string | {poolSymbol} token is under maintenance. Deposits and withdrawals are temporarily blocked. | |
486
+ > | `poolDepositsAreMaintenance` | string | {poolSymbol} token is under maintenance. Deposits are temporarily blocked. | |
487
+ > | `poolWithdrawalsAreMaintenance` | string | {poolSymbol} token is under maintenance. Withdrawals are temporarily blocked. | |
487
488
  > | `poolIsPrivate` | string | This vault is currently private | |
488
489
  > | `updateOracles` | string | Update Oracles | |
489
490
  > | `checkingOracles` | string | Checking Oracles | |
@@ -1,6 +1,10 @@
1
- import type { Address, ChainId } from '../types';
2
- export declare const FLATMONEY_LEVERAGED_ASSET_MAP: Record<ChainId, Address>;
3
- export declare const FLATMONEY_COLLATERAL_ADDRESS_MAP: Record<ChainId, Address>;
4
- export declare const FLATMONEY_COLLATERAL_SYMBOL_MAP: Record<ChainId, string>;
5
- export declare const FLATMONEY_UNIT_SYMBOL_MAP: Record<ChainId, string>;
6
- export declare const FLATMONEY_UNIT_ADDRESS_MAP: Record<ChainId, Address>;
1
+ export declare const FLAT_MONEY_LEVERAGED_ASSET_ADDRESSES: string[];
2
+ export declare const FLAT_MONEY_COLLATERAL_MAP: {
3
+ [x: string]: {
4
+ symbol: string;
5
+ decimals: number;
6
+ address: string;
7
+ };
8
+ };
9
+ export declare const FLAT_MONEY_V1_UNIT_ADDRESS = "0xb95fb324b8a2faf8ec4f76e3df46c718402736e2";
10
+ export declare const FLAT_MONEY_UNIT_ADDRESSES: string[];
@@ -1,2 +1,3 @@
1
1
  export declare const PYTH_API_LINK = "https://hermes.pyth.network";
2
2
  export declare const FLAT_MONEY_UNIT_LINK = "https://flat.money/flatcoin";
3
+ export declare const FLAT_MONEY_V1_UNIT_LINK = "https://v1.flat.money/flatcoin";
@@ -22,4 +22,4 @@ export declare const useGetSwapData: () => (args: {
22
22
  signal: AbortSignal;
23
23
  variables: import("../../types").SwapDataRequest;
24
24
  }) => Promise<import("../../types").SwapDataResponse | null>;
25
- export declare const useUpdatePoolConfig: () => (payload: Record<`0x${string}`, Pick<import("../../types").PoolConfig, "maintenance">>) => void;
25
+ export declare const useUpdatePoolConfig: () => (payload: Record<`0x${string}`, Pick<import("../../types").PoolConfig, "maintenance" | "maintenanceDeposits" | "maintenanceWithdrawals">>) => void;
@@ -14,6 +14,8 @@ export interface PoolConfig {
14
14
  };
15
15
  deprecated?: boolean;
16
16
  maintenance?: boolean;
17
+ maintenanceDeposits?: boolean;
18
+ maintenanceWithdrawals?: boolean;
17
19
  }
18
20
  export interface PoolFallbackData {
19
21
  address: Address;
@@ -43,7 +43,7 @@ export interface TradingPanelSetters {
43
43
  updateTradingModal: (payload: Partial<TradingPanelState['modal']>) => void;
44
44
  updateTransactions: (payload: UpdateTransactionsArguments) => void;
45
45
  updatePoolFallbackData: (payload: PoolFallbackData) => void;
46
- updatePoolConfig: (payload: Record<PoolConfig['address'], Pick<PoolConfig, 'maintenance'>>) => void;
46
+ updatePoolConfig: (payload: Record<PoolConfig['address'], Pick<PoolConfig, 'maintenance' | 'maintenanceDeposits' | 'maintenanceWithdrawals'>>) => void;
47
47
  }
48
48
  export interface CallbackConfig {
49
49
  onSetPoolAddress: TradingPanelSetters['setPoolAddress'];
@@ -91,7 +91,7 @@ export type TradingPanelAction = {
91
91
  payload: PoolFallbackData;
92
92
  } | {
93
93
  type: 'UPDATE_POOL_CONFIG';
94
- payload: Record<PoolConfig['address'], Pick<PoolConfig, 'maintenance'>>;
94
+ payload: Record<PoolConfig['address'], Pick<PoolConfig, 'maintenance' | 'maintenanceDeposits' | 'maintenanceWithdrawals'>>;
95
95
  };
96
96
  export interface TradingPanelContextConfig {
97
97
  actions: Partial<CallbackConfig> & Pick<CallbackConfig, 'getSwapData'>;
@@ -1,4 +1,9 @@
1
1
  import type { Address } from 'viem';
2
2
  export declare const isFmpAirdropVaultAddress: (address: Address) => boolean;
3
3
  export declare const isFlatMoneyLeveragedAsset: (address: Address) => boolean;
4
- export declare const getFlatMonetUnitSymbol: (chainId: number) => string;
4
+ export declare const getFlatMoneyCollateralByLeverageAddress: (address: string) => {
5
+ symbol: string;
6
+ decimals: number;
7
+ address: string;
8
+ };
9
+ export declare const getFlatMoneyLinkByUnitAddress: (address: string) => "https://flat.money/flatcoin" | "https://v1.flat.money/flatcoin";