From 3a326b0fe9e6a8ca8fbeaeafe513bafbcbd325ca Mon Sep 17 00:00:00 2001 From: huy9x101 <118549188+huy9x101@users.noreply.github.com> Date: Thu, 12 Dec 2024 09:59:44 +0700 Subject: [PATCH 01/28] Update config scheman for custom announcement banner --- config.schema.json | 58 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 52 insertions(+), 6 deletions(-) diff --git a/config.schema.json b/config.schema.json index ffcfe0e..ef2682d 100644 --- a/config.schema.json +++ b/config.schema.json @@ -17,7 +17,11 @@ "properties": { "network": { "type": "string", - "enum": ["mainnet", "testnet", "devnet"] + "enum": [ + "mainnet", + "testnet", + "devnet" + ] }, "prelaunch_markets": { "type": "array", @@ -135,7 +139,11 @@ "description": "Ongoing survey configs for typeform survey widget", "items": { "type": "object", - "required": ["surveyLink", "endTime", "pages"], + "required": [ + "surveyLink", + "endTime", + "pages" + ], "properties": { "message": { "type": "string" @@ -218,7 +226,10 @@ "description": "List of banner information to be displayed over the TradingView chart for the required market", "items": { "type": "object", - "required": ["market_id", "content"], + "required": [ + "market_id", + "content" + ], "properties": { "market_id": { "$ref": "#/$defs/market_id" @@ -388,7 +399,10 @@ "additional_ibc_token_info": { "type": "object", "description": "Information for token that (1) is not added on Carbon blockchain or (2) requires packet forwarding.", - "required": ["baseDenom", "chainRoutes"], + "required": [ + "baseDenom", + "chainRoutes" + ], "properties": { "baseDenom": { "type": "string", @@ -428,7 +442,10 @@ "description": "List of perp pool banners", "items": { "type": "object", - "required": ["perp_pool_id", "title"], + "required": [ + "perp_pool_id", + "title" + ], "properties": { "perp_pool_id": { "$ref": "#/$defs/perp_pool_id" @@ -472,6 +489,35 @@ } }, "additionalProperties": false + }, + "announcement_banner": { + "type": "object", + "description": "Custom announcement banner through all or only on specificed paths", + "required": [ + "content" + ], + "patternProperties": { + "show_from": { + "$ref": "#/$defs/show_from" + }, + "show_until": { + "$ref": "#/$defs/show_until" + }, + "content": { + "$ref": "#/$defs/content" + }, + "hideable": { + "$ref": "#/$defs/hideable" + }, + "show_only_on": { + "type": "array", + "description": "List of paths that announcement will be show on. Empty array will be shown on all paths", + "items": { + "type": "string" + }, + "minItems": 0 + } + } } } -} +} \ No newline at end of file From b2c28268beac456ee79eee56516c88960916fc31 Mon Sep 17 00:00:00 2001 From: huy9x101 <118549188+huy9x101@users.noreply.github.com> Date: Mon, 16 Dec 2024 17:06:59 +0700 Subject: [PATCH 02/28] update announement banner schema and config --- .github/markets/pr_template.md | 16 +++++- README.md | 11 +++++ config.schema.json | 43 ++++++++++++++++ configs/devnet.json | 10 +++- configs/mainnet.json | 39 +++++++++++++-- configs/testnet.json | 8 +++ scripts/check_configs.ts | 89 +++++++++++++++++++++++++++++++++- 7 files changed, 209 insertions(+), 7 deletions(-) diff --git a/.github/markets/pr_template.md b/.github/markets/pr_template.md index e09bd72..6ecb128 100644 --- a/.github/markets/pr_template.md +++ b/.github/markets/pr_template.md @@ -10,6 +10,8 @@ Each json file under the [configs](../../configs) folder correspond to their res |`blacklisted_markets` |`string[]` |true |The array of market names that are blacklisted. A market can be blacklisted for a number of reasons, such as it being invalid/duplicate/wrongly-added/etc. |The market names listed here **MUST** match the market names listed under the Carbon [Markets API](https://api.carbon.network/carbon/market/v1/markets?pagination.limit=10000). The market names listed here **CANNOT** be under the `prelaunch_markets` field at the same time. | |`blacklisted_pools` |`string[]` |true |The array of pool ids that are blacklisted. A pool can be blacklisted for a number of reasons, such as it being invalid/duplicate/wrongly-added/etc. |The pool ids listed here **MUST** match the pool ids listed under the Carbon [Liquidity Pool API](https://api.carbon.network/carbon/liquiditypool/v1/pools?pagination.limit=10000). | |`blacklisted_tokens` |`string[]` |true |The array of token denoms that are blacklisted. A token can be blacklisted for a number of reasons, such as it being invalid/deprecated/etc. |The token denoms listed here **MUST** match the token denoms listed under the Carbon [Tokens API](https://api.carbon.network/carbon/coin/v1/tokens?pagination.limit=10000). | +| `transfer_disabled_tokens` |`TransferDisabledTokens` |true |Object that contains tokens for which deposits and withdrawals are temporarily disabled | | +| `token_name_override_map` |`object` |true |Object that contains token denoms and their respective token name overrides. This is used if we need to override the full token name of the tokens listed here. |The token denoms listed here **MUST** match the token denoms listed under the Carbon [Tokens API](https://api.carbon.network/carbon/coin/v1/tokens?pagination.limit=10000). | |`transfer_options` |`object` |true |A collection of blockchain networks along with their associated priority numbers, used to establish their order in the transfer options list for deposit and withdrawal forms. |Blockchain network listed here **MUST** match the valid chainName of the bridges listed under BridgeAll RPC call.

To view the values of BridgeAll RPC call, simply run `yarn get-bridges [network]` on the command line. Sample for mainnet: `yarn get-bridges mainnet`| |`network_fees` |`object` |true |List of token denoms along with their associated priority numbers, used to establish their default order in the network fees preference list. |Token denoms listed here **MUST** match the valid denoms listed under MinGasPriceAll RPC call.

To view the values of MinGasPriceAll RPC call, simply run `yarn get-min-gas-prices [network]` on the command line. Sample for mainnet: `yarn get-min-gas-prices mainnet`| |`maintenance` |`Maintenance` |false |Object that dictates whether or not the maintenance page is displayed on each particular network. The maintenance page is displayed when the Carbon chain is down (i.e. blocks are not moving). | If the `maintenance` property is omitted, the maintenance page will not be shown. @@ -26,6 +28,13 @@ Each json file under the [configs](../../configs) folder correspond to their res | `native_token_contracts_map` | `object` | false | Map of token denoms to their respective contract addresses on the native chain. | | | `native_depositor_contracts_map` | `object` | false | Map of axelar connection ids to their respective native depositor contract addresses |`market_promo` |`MarketPromo` |false |Map of Objects that contains market promo parameters for each market |If the `market_promo` property is omitted, no promo will be shown. The key of each entry is the ids of the market with existing promo. | +|`spot_pool_config` |`SpotPoolConfig` |false |Object that contains the config parameters for the [Spot Pools](https://app.dem.exchange/pools/spot) page on Demex | + +## TransferDisabledTokens Data Structure +|Field |Type |Required |Description |Notes | +|---|---|---|---|---| +|`deposit` |`string[]` |true |List of tokens for which deposits are temporarily disabled |The token denoms listed here **MUST** match the token denoms listed under the Carbon [Tokens API](https://api.carbon.network/carbon/coin/v1/tokens?pagination.limit=10000). | +|`withdraw` |`string[]` |true |List of tokens for which withdrawals are temporarily disabled |The token denoms listed here **MUST** match the token denoms listed under the Carbon [Tokens API](https://api.carbon.network/carbon/coin/v1/tokens?pagination.limit=10000). | ## Maintenance Data Structure |Field |Type |Required |Description |Notes | @@ -105,4 +114,9 @@ Each json file under the [configs](../../configs) folder correspond to their res |---|---|---|---|---| |`start` |`string` |true |Start time of the promo. | |`end` |`string` |true |End time of the promo. | -|`tooltip` |`string` |false |Tooltip message for perp trading boost tag. | \ No newline at end of file +|`tooltip` |`string` |false |Tooltip message for perp trading boost tag. | + +## SpotPoolConfig Data Structure +|Field |Type |Required |Description |Notes | +|---|---|---|---|---| +|`show_apr_tooltip` |`boolean` |true |Indicates whether or not to show the Annual Percentage Returns (APR) tooltip on [Spot Pools](https://app.dem.exchange/pools/spot) page | \ No newline at end of file diff --git a/README.md b/README.md index efa8d77..0f7f551 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ Currently, each JSON file contain the following data on its corresponding networ - blacklisted markets - blacklisted pools - blacklisted tokens +- tokens for which deposits/withdrawals are disabled +- list of tokens and their token name overrides (which are used if we need to override the token's full name on the Demex webapp) - default blockchain transfer option order in deposit/withdrawal forms dropdown - default network token fee order - cross selling source tokens @@ -46,6 +48,15 @@ More metadata will be added in the future if required by the Demex frontend. Ple "blacklisted_token_2", "blacklisted_token_3" ], + "transfer_disabled_tokens": [ + "transfer_disabled_token_1", + "transfer_disabled_token_2", + "transfer_disabled_token_3" + ], + "token_name_override_map": { + "token_1": "token_name_override_1", + "token_2": "token_name_override_2" + }, "transfer_options": { "chain_1": 0, "chain_2": 1, diff --git a/config.schema.json b/config.schema.json index ef2682d..0242745 100644 --- a/config.schema.json +++ b/config.schema.json @@ -8,6 +8,8 @@ "blacklisted_markets", "blacklisted_pools", "blacklisted_tokens", + "transfer_disabled_tokens", + "token_name_override_map", "transfer_options", "network_fees", "cross_selling_source_tokens", @@ -51,6 +53,37 @@ "$ref": "#/$defs/blacklisted_token" } }, + "transfer_disabled_tokens": { + "type": "object", + "description": "Object containing tokens for which deposits and withdrawals have been temporarily disabled", + "required": ["deposit", "withdraw"], + "properties": { + "deposit": { + "type": "array", + "description": "List of tokens for which deposits have been temporarily disabled", + "items": { + "type": "string" + } + }, + "withdraw": { + "type": "array", + "description": "List of tokens for which withdrawals have been temporarily disabled", + "items": { + "type": "string" + } + } + } + }, + "token_name_override_map": { + "type": "object", + "description": "Object that contains token denoms and their respective token name overrides.", + "patternProperties": { + ".*": { + "type": "string", + "minLength": 2 + } + } + }, "transfer_options": { "type": "object", "description": "List of blockchain networks and their priority numbers, used to set their order in deposit and withdrawal forms transfer option dropdown", @@ -490,6 +523,16 @@ }, "additionalProperties": false }, + "spot_pool_config": { + "type": "object", + "description": "Config parameters for Spot Pools page", + "properties": { + "show_apr_tooltip": { + "type": "boolean", + "description": "Indicates whether or not to show APR tooltip on Spot Pools page" + } + } + }, "announcement_banner": { "type": "object", "description": "Custom announcement banner through all or only on specificed paths", diff --git a/configs/devnet.json b/configs/devnet.json index 99f2321..86d3aff 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -8,6 +8,11 @@ ], "blacklisted_pools": [], "blacklisted_tokens": [], + "transfer_disabled_tokens": { + "deposit": [], + "withdraw": [] + }, + "token_name_override_map": {}, "transfer_options": {}, "network_fees": { "swth": 0, @@ -37,5 +42,8 @@ "content": "Hello World", "hideable": true } - ] + ], + "spot_pool_config": { + "show_apr_tooltip": false + } } \ No newline at end of file diff --git a/configs/mainnet.json b/configs/mainnet.json index d0c9c3f..1fb070d 100644 --- a/configs/mainnet.json +++ b/configs/mainnet.json @@ -17,6 +17,34 @@ "usdc.1.6.e70e14", "bit.1.2.9d68c4" ], + "transfer_disabled_tokens": { + "deposit": [ + "nex.1.17.59c1ba", + "gmx.1.19.70275d", + "wbnb.1.6.ad598c", + "blur.1.2.0c0069", + "brdg/0b02ac3efc9df2e80d00f141133c180cdaee0122f92d3e2e310f704e82425a18", + "brdg/1768794901f8a19c2ec795a5402653cef6cbfe6b3ec6398d39fc37de963cb667", + "brdg/a8bbd91ae3dda9de2e50926a0d93be4d0d5cea34f3080014e5c0c0db6eaf61a4", + "bnb.1.6.773edb", + "zbnb.1.18.c406be" + ], + "withdraw": [ + "nex.1.17.59c1ba", + "gmx.1.19.70275d", + "wbnb.1.6.ad598c", + "blur.1.2.0c0069", + "brdg/0b02ac3efc9df2e80d00f141133c180cdaee0122f92d3e2e310f704e82425a18", + "brdg/1768794901f8a19c2ec795a5402653cef6cbfe6b3ec6398d39fc37de963cb667", + "brdg/a8bbd91ae3dda9de2e50926a0d93be4d0d5cea34f3080014e5c0c0db6eaf61a4", + "bnb.1.6.773edb", + "zbnb.1.18.c406be" + ] + }, + "token_name_override_map": { + "brdg/1299d2e94c483e72f64100088886b8a5b7c13595047e53e032c9938d07a98c20": "Ether (Arbitrum)", + "brdg/e3877e2c8ed05e404e04417747e2f430285c11dc839663b943b39ff7cbb56377": "Ether (Ethereum)" + }, "transfer_options": { "Mantle": 0, "Base": 1, @@ -419,10 +447,10 @@ "native_token_contracts_map": { "brdg/6418666cedaf875fb344dbd90bea7c842300939872365b933f7ee8b6c1e825e8": "0x0000000000000000000000000000000000000000", "brdg/a02afc2c1edf77cc023eefa25fc036c184612faf9365cda9c1daa3b1675ebf8f": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000", - "brdg/41589e35bdd37fa000a2a310fe076015e52dfd78fc9a09b504903c7b83fb9c4b": "0x0000000000000000000000000000000000000000", - "brdg/54d7e3e21eeac0b0761a0294142b0c4f234e5e08a23f770e435755ebebdb951c": "0x0000000000000000000000000000000000000000", - "brdg/80e8c20d295cf162023922ecfa61fd73184b6e0bd1f3f4b32265fc69ae7aed23": "0x0000000000000000000000000000000000000000", - "brdg/a07dd6e75ea4045aaa3949322b6243163293aebd8610333eff20b6db4beffa0e": "0x0000000000000000000000000000000000000000" + "brdg/1299d2e94c483e72f64100088886b8a5b7c13595047e53e032c9938d07a98c20": "0x0000000000000000000000000000000000000000", + "brdg/1768794901f8a19c2ec795a5402653cef6cbfe6b3ec6398d39fc37de963cb667": "0x0000000000000000000000000000000000000000", + "brdg/e3877e2c8ed05e404e04417747e2f430285c11dc839663b943b39ff7cbb56377": "0x0000000000000000000000000000000000000000", + "brdg/e2238fb8fc5f08299c1789177d6d89bb2853238a65f6e48a9ec3b67e289f5601": "0x0000000000000000000000000000000000000000" }, "native_depositor_contracts_map": { "3/arbitrum/0x4ab44c7e881ee37cb02bc0c98547a0bbfad9291b": "0xd91a2AcbE1f9635277120fc200F73574f1Cdad65", @@ -450,5 +478,8 @@ "end": "2024-12-20T08:00:00Z", "tooltip": "Trade MNT-PERP to earn 3x points in the Mantle Trading League!" } + }, + "spot_pool_config": { + "show_apr_tooltip": true } } diff --git a/configs/testnet.json b/configs/testnet.json index d614e60..2d3c393 100644 --- a/configs/testnet.json +++ b/configs/testnet.json @@ -10,6 +10,11 @@ ], "blacklisted_pools": [], "blacklisted_tokens": [], + "transfer_disabled_tokens": { + "deposit": [], + "withdraw": [] + }, + "token_name_override_map": {}, "transfer_options": {}, "network_fees": { "swth": 0, @@ -51,5 +56,8 @@ ], "direct_deposit": { "domain": "https://test-dagger.dem.exchange" + }, + "spot_pool_config": { + "show_apr_tooltip": false } } diff --git a/scripts/check_configs.ts b/scripts/check_configs.ts index 9cd7d3b..c13f7d3 100644 --- a/scripts/check_configs.ts +++ b/scripts/check_configs.ts @@ -12,6 +12,8 @@ interface ConfigJSON { blacklisted_markets: string[]; blacklisted_pools: string[]; blacklisted_tokens: string[]; + transfer_disabled_tokens: TransferDisabledTokensObj; + token_name_override_map: TokenNameOverrideMap; transfer_options: { [chainKey: string]: number; }; @@ -31,6 +33,7 @@ interface ConfigJSON { wswth_contract?: string; market_banners?: MarketBanner[]; market_promo?: {[marketId: string]: MarketPromo}; + spot_pool_config?: SpotPoolConfig; } interface InvalidEntry { @@ -56,6 +59,15 @@ interface PerpPoolBanner { subtext?: string; } +interface TransferDisabledTokensObj { + deposit: string[]; + withdraw: string[]; +} + +type TokenNameOverrideMap = { + [denom: string]: string; +} + interface DemexPointsConfig { depositsPerSpin: number; tradingVolumePerSpin: number; @@ -116,6 +128,10 @@ interface MarketPromo { tooltip?: string; } +interface SpotPoolConfig { + show_apr_tooltip: boolean; +} + type OutcomeMap = { [key in CarbonSDK.Network]: boolean }; // true = success, false = failure const outcomeMap: OutcomeMap = { @@ -175,6 +191,16 @@ function checkAddressIsEVM(address: string): Boolean { return regex.test(address) } +function isErrorOutcome(outcome: DuplicateEntry): boolean { + return Boolean(outcome.status && outcome.entry?.length && outcome.entry.length > 0); +} + +function joinEntriesIntoStr(entriesArr: string[]): string { + return entriesArr.length > 1 + ? `${entriesArr.slice(0, -1).join(", ")} and ${entriesArr[entriesArr.length - 1]}` + : entriesArr[0]; +} + // check list of markets to ensure that it does not have blacklisted markets function checkBlacklistedMarkets(marketData: string[], blacklistedMarkets: string[]): InvalidEntry { let overlappingMarkets: string[] = []; @@ -191,6 +217,50 @@ function checkBlacklistedMarkets(marketData: string[], blacklistedMarkets: strin }; } +function isValidTransferDisabledTokens(transferDisabledTokens: TransferDisabledTokensObj, denoms: string[], network: CarbonSDK.Network): boolean { + const dupDepositTknsOutcome = checkDuplicateEntries(transferDisabledTokens.deposit); + const dupWithdrawTknsOutcome = checkDuplicateEntries(transferDisabledTokens.withdraw); + + if (dupDepositTknsOutcome.status || dupWithdrawTknsOutcome.status) { + if (isErrorOutcome(dupDepositTknsOutcome)) { + const duplicateDepositTokensStr = joinEntriesIntoStr(dupDepositTknsOutcome.entry!); + console.error(`[ERROR] transfer_disabled_tokens.deposit of ${network}.json has the following duplicate token denoms: ${duplicateDepositTokensStr}. Please make sure to input each denom only once.`); + } + if (isErrorOutcome(dupWithdrawTknsOutcome)) { + const duplicateWithdrawTokensStr = joinEntriesIntoStr(dupWithdrawTknsOutcome.entry!); + console.error(`[ERROR] transfer_disabled_tokens.withdraw of ${network}.json has the following duplicate token denoms: ${duplicateWithdrawTokensStr}. Please make sure to input each denom only once.`); + } + return false; + } + + const validDepositTknsOutcome = checkValidEntries(transferDisabledTokens.deposit, denoms); + const validWithdrawTknsOutcome = checkValidEntries(transferDisabledTokens.withdraw, denoms); + if (validDepositTknsOutcome.status || dupWithdrawTknsOutcome.status) { + if (isErrorOutcome(validDepositTknsOutcome)) { + const invalidDepositTokensStr = joinEntriesIntoStr(validDepositTknsOutcome.entry!); + console.error(`[ERROR] transfer_disabled_tokens.deposit of ${network}.json has the following invalid token denoms: ${invalidDepositTokensStr}. Please make sure to input only valid token denoms.`); + } + if (isErrorOutcome(validWithdrawTknsOutcome)) { + const invalidWithdrawTokensStr = joinEntriesIntoStr(validWithdrawTknsOutcome.entry!); + console.error(`[ERROR] transfer_disabled_tokens.withdraw of ${network}.json has the following invalid token denoms: ${invalidWithdrawTokensStr}. Please make sure to input only valid token denoms.`); + } + return false; + } + + return true; +} + +function isValidTokenNameOverrideMap(tokenNameOverrideMap: TokenNameOverrideMap, denoms: string[], network: CarbonSDK.Network): boolean { + const denomKeysArr = Object.keys(tokenNameOverrideMap); + const invalidDenomsOutcome = checkValidEntries(denomKeysArr, denoms); + if (isErrorOutcome(invalidDenomsOutcome)) { + const invalidTokensStr = joinEntriesIntoStr(invalidDenomsOutcome.entry!); + console.error(`[ERROR] token_name_override_map of ${network}.json has the following invalid token denom keys: ${invalidTokensStr}. Please make sure to input only valid token denoms.`); + return false; + } + return true; +} + function isValidExternalChainChannels(chainChannels: ExternalChannelsObj, bridges: string[], network: CarbonSDK.Network): boolean { const duplicateChainKeys: string[] = []; const invalidChainKeys: string[] = []; @@ -332,7 +402,7 @@ function isValidMarketPromo(marketPromo: {[marketId: string]: MarketPromo}, netw outcomeMap[network] = false; } - for (const promoId in marketPromoIds) { + for (const promoId of marketPromoIds) { const promoInfo = marketPromo[promoId]; const startTimeStr = promoInfo.start; const endTimeStr = promoInfo.end; @@ -471,6 +541,14 @@ async function main() { outcomeMap[network] = false; } + // transfer disabled tokens object check + const isTransferDisabledTokensValid = isValidTransferDisabledTokens(jsonData.transfer_disabled_tokens, tokens, network); + if (!isTransferDisabledTokensValid) outcomeMap[network] = false; + + // token_name_override_map check + const isTokenNameOverrideMapValid = isValidTokenNameOverrideMap(jsonData.token_name_override_map, tokens, network); + if (!isTokenNameOverrideMapValid) outcomeMap[network] = false; + const hasInvalidCrossSellingTokens = checkValidEntries(jsonData.cross_selling_source_tokens, tokens); if (hasInvalidCrossSellingTokens.status && hasInvalidCrossSellingTokens.entry) { let listOfInvalidTokens: string = hasInvalidCrossSellingTokens.entry.join(', '); @@ -674,6 +752,15 @@ async function main() { if(jsonData.market_promo && !isValidMarketPromo(jsonData.market_promo, network, marketIds)) { outcomeMap[network] = false; } + + // check for spot pool config + if (jsonData.spot_pool_config) { + const spotPoolConfig = jsonData.spot_pool_config + if (spotPoolConfig.show_apr_tooltip === undefined) { + console.error(`ERROR: the show_apr_tooltip field is missing in spot_pool_config of ${network}.json. Please enter a boolean value for show_apr_tooltip.`); + outcomeMap[network] = false; + } + } // external chain channels check const isExternalChannelsValid = isValidExternalChainChannels(jsonData.external_chain_channels, ibcBridgeNames, network); From 3cbd4ee0cecd272d71f8d01b4c822f3a0a8ba325 Mon Sep 17 00:00:00 2001 From: huy9x101 <118549188+huy9x101@users.noreply.github.com> Date: Tue, 17 Dec 2024 08:45:51 +0700 Subject: [PATCH 03/28] Update sample json data --- configs/devnet.json | 7 +++++++ configs/mainnet.json | 7 +++++++ configs/testnet.json | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/configs/devnet.json b/configs/devnet.json index 86d3aff..15eb4ee 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -45,5 +45,12 @@ ], "spot_pool_config": { "show_apr_tooltip": false + }, + "announcement_banner": { + "show_from": "2024-09-30T08:00+00:00", + "show_until": "2024-10-30T08:00+00:00", + "content": "Hello World", + "hideable": true, + "show_only_on": [] } } \ No newline at end of file diff --git a/configs/mainnet.json b/configs/mainnet.json index 1fb070d..41f2f73 100644 --- a/configs/mainnet.json +++ b/configs/mainnet.json @@ -481,5 +481,12 @@ }, "spot_pool_config": { "show_apr_tooltip": true + }, + "announcement_banner": { + "show_from": "2024-09-30T08:00+00:00", + "show_until": "2024-10-30T08:00+00:00", + "content": "Hello World", + "hideable": true, + "show_only_on": [] } } diff --git a/configs/testnet.json b/configs/testnet.json index 2d3c393..8b9477c 100644 --- a/configs/testnet.json +++ b/configs/testnet.json @@ -59,5 +59,12 @@ }, "spot_pool_config": { "show_apr_tooltip": false + }, + "announcement_banner": { + "show_from": "2024-11-30T08:00+00:00", + "show_until": "2024-12-20T08:00+00:00", + "content": "Hello World", + "hideable": true, + "show_only_on": [] } } From bacf8edb23e02ed568c2ad0a1b0d0910f048e47e Mon Sep 17 00:00:00 2001 From: huy9x101 <118549188+huy9x101@users.noreply.github.com> Date: Tue, 17 Dec 2024 08:54:21 +0700 Subject: [PATCH 04/28] Remove changes from mainnet/testnet.json --- configs/mainnet.json | 7 ------- configs/testnet.json | 7 ------- 2 files changed, 14 deletions(-) diff --git a/configs/mainnet.json b/configs/mainnet.json index 41f2f73..1fb070d 100644 --- a/configs/mainnet.json +++ b/configs/mainnet.json @@ -481,12 +481,5 @@ }, "spot_pool_config": { "show_apr_tooltip": true - }, - "announcement_banner": { - "show_from": "2024-09-30T08:00+00:00", - "show_until": "2024-10-30T08:00+00:00", - "content": "Hello World", - "hideable": true, - "show_only_on": [] } } diff --git a/configs/testnet.json b/configs/testnet.json index 8b9477c..2d3c393 100644 --- a/configs/testnet.json +++ b/configs/testnet.json @@ -59,12 +59,5 @@ }, "spot_pool_config": { "show_apr_tooltip": false - }, - "announcement_banner": { - "show_from": "2024-11-30T08:00+00:00", - "show_until": "2024-12-20T08:00+00:00", - "content": "Hello World", - "hideable": true, - "show_only_on": [] } } From dee418e7ea50d18d27adccd5f7e8674c4166a1e7 Mon Sep 17 00:00:00 2001 From: huy9x101 <118549188+huy9x101@users.noreply.github.com> Date: Tue, 17 Dec 2024 08:56:54 +0700 Subject: [PATCH 05/28] Add devnet content for testing purpose --- configs/devnet.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/devnet.json b/configs/devnet.json index 15eb4ee..487c979 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -48,8 +48,8 @@ }, "announcement_banner": { "show_from": "2024-09-30T08:00+00:00", - "show_until": "2024-10-30T08:00+00:00", - "content": "Hello World", + "show_until": "2024-12-20T08:00+00:00", + "content": "Demex will be temporarily down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", "hideable": true, "show_only_on": [] } From aaf0d19fd8b41c28fcb0a09cfff1d79ad717aaa5 Mon Sep 17 00:00:00 2001 From: kimie Date: Tue, 17 Dec 2024 10:50:29 +0700 Subject: [PATCH 06/28] Show announcement --- configs/devnet.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/devnet.json b/configs/devnet.json index 487c979..5f0d7f6 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -47,10 +47,10 @@ "show_apr_tooltip": false }, "announcement_banner": { - "show_from": "2024-09-30T08:00+00:00", - "show_until": "2024-12-20T08:00+00:00", + "show_from": "2024-12-17T08:00+00:00", + "show_until": "2024-12-20T08:15+00:00", "content": "Demex will be temporarily down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", - "hideable": true, + "hideable": false, "show_only_on": [] } } \ No newline at end of file From cbf832220836c1152db9fce10db2b6a1ca83ebe4 Mon Sep 17 00:00:00 2001 From: kimie Date: Tue, 17 Dec 2024 11:05:41 +0700 Subject: [PATCH 07/28] update config --- configs/devnet.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/devnet.json b/configs/devnet.json index 5f0d7f6..f25a70a 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -50,7 +50,7 @@ "show_from": "2024-12-17T08:00+00:00", "show_until": "2024-12-20T08:15+00:00", "content": "Demex will be temporarily down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", - "hideable": false, + "hideable": true, "show_only_on": [] } } \ No newline at end of file From daaaff747a2d02fa9310212c272f7d4176d635db Mon Sep 17 00:00:00 2001 From: kimie Date: Tue, 17 Dec 2024 13:23:10 +0700 Subject: [PATCH 08/28] Update show time --- configs/devnet.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/devnet.json b/configs/devnet.json index f25a70a..9765cf7 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -47,8 +47,8 @@ "show_apr_tooltip": false }, "announcement_banner": { - "show_from": "2024-12-17T08:00+00:00", - "show_until": "2024-12-20T08:15+00:00", + "show_from": "2024-12-17T06:30+00:00", + "show_until": "2024-12-20T06:45+00:00", "content": "Demex will be temporarily down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", "hideable": true, "show_only_on": [] From 90e98680aa5f8afe3508636eab9cc6a5077ceee2 Mon Sep 17 00:00:00 2001 From: kimie Date: Tue, 17 Dec 2024 13:33:37 +0700 Subject: [PATCH 09/28] Update content for banner --- configs/devnet.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/devnet.json b/configs/devnet.json index 9765cf7..3058e3e 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -49,7 +49,7 @@ "announcement_banner": { "show_from": "2024-12-17T06:30+00:00", "show_until": "2024-12-20T06:45+00:00", - "content": "Demex will be temporarily down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", + "content": "Demex will be down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", "hideable": true, "show_only_on": [] } From 6dcdb172d676b9cc1317b1b9f6ec5b7fc71ec4a4 Mon Sep 17 00:00:00 2001 From: kimie Date: Tue, 17 Dec 2024 13:34:45 +0700 Subject: [PATCH 10/28] Hide the banner --- configs/devnet.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/devnet.json b/configs/devnet.json index 3058e3e..3cf38c4 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -50,7 +50,7 @@ "show_from": "2024-12-17T06:30+00:00", "show_until": "2024-12-20T06:45+00:00", "content": "Demex will be down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", - "hideable": true, + "hideable": false, "show_only_on": [] } } \ No newline at end of file From c8cda4b81fdd336946c9b9a21f0c04504ce4169b Mon Sep 17 00:00:00 2001 From: kimie Date: Tue, 17 Dec 2024 13:40:14 +0700 Subject: [PATCH 11/28] Show the banner --- configs/devnet.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/devnet.json b/configs/devnet.json index 3cf38c4..3058e3e 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -50,7 +50,7 @@ "show_from": "2024-12-17T06:30+00:00", "show_until": "2024-12-20T06:45+00:00", "content": "Demex will be down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", - "hideable": false, + "hideable": true, "show_only_on": [] } } \ No newline at end of file From fe000658c88f74f61dde61a9aba7293f176f3004 Mon Sep 17 00:00:00 2001 From: kimie Date: Tue, 17 Dec 2024 13:47:18 +0700 Subject: [PATCH 12/28] Update time --- configs/devnet.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/devnet.json b/configs/devnet.json index 3058e3e..9da2ffe 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -48,7 +48,7 @@ }, "announcement_banner": { "show_from": "2024-12-17T06:30+00:00", - "show_until": "2024-12-20T06:45+00:00", + "show_until": "2024-12-17T06:49+00:00", "content": "Demex will be down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", "hideable": true, "show_only_on": [] From 08ab0fcfb4710dd1c8cb1386e540c10fce4325e1 Mon Sep 17 00:00:00 2001 From: huy9x101 <118549188+huy9x101@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:16:16 +0700 Subject: [PATCH 13/28] Remove bnb as network_fees token --- configs/mainnet.json | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/mainnet.json b/configs/mainnet.json index 0cdeeea..5f4175f 100644 --- a/configs/mainnet.json +++ b/configs/mainnet.json @@ -92,7 +92,6 @@ "ibc/75249A18DEFBEFE55F83B1C70CAD234DF164F174C6BC51682EE92C2C81C18C93": 11, "ibc/B7864B03E1B9FD4F049243E92ABD691586F682137037A9F3FCA5222815620B3C": 12, "ibc/4E06CF24FEBFB3F5AF645377DCC0B70AA6183BAF6B918B8B6243FCDEB7D38118": 13, - "bnb.1.6.773edb": 14, "usdc.1.6.53ff75": 15, "busd.1.6.754a80": 16, "eth.1.19.c3b805": 17, From 69fe4eeffd6cb91e626d26c83b03804d171566c5 Mon Sep 17 00:00:00 2001 From: huy9x101 <118549188+huy9x101@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:57:05 +0700 Subject: [PATCH 14/28] Update check-configs and sample json data --- .github/markets/pr_template.md | 12 +++++++++++- config.schema.json | 3 ++- configs/mainnet.json | 7 +++++++ configs/testnet.json | 7 +++++++ scripts/check_configs.ts | 27 +++++++++++++++++++++++++++ 5 files changed, 54 insertions(+), 2 deletions(-) diff --git a/.github/markets/pr_template.md b/.github/markets/pr_template.md index 6ecb128..d177299 100644 --- a/.github/markets/pr_template.md +++ b/.github/markets/pr_template.md @@ -35,6 +35,7 @@ Each json file under the [configs](../../configs) folder correspond to their res |---|---|---|---|---| |`deposit` |`string[]` |true |List of tokens for which deposits are temporarily disabled |The token denoms listed here **MUST** match the token denoms listed under the Carbon [Tokens API](https://api.carbon.network/carbon/coin/v1/tokens?pagination.limit=10000). | |`withdraw` |`string[]` |true |List of tokens for which withdrawals are temporarily disabled |The token denoms listed here **MUST** match the token denoms listed under the Carbon [Tokens API](https://api.carbon.network/carbon/coin/v1/tokens?pagination.limit=10000). | +|`announcement_banner` |`AnnouncementBanner` |false |Custom announcement banner through all or only on specificed paths | ## Maintenance Data Structure |Field |Type |Required |Description |Notes | @@ -119,4 +120,13 @@ Each json file under the [configs](../../configs) folder correspond to their res ## SpotPoolConfig Data Structure |Field |Type |Required |Description |Notes | |---|---|---|---|---| -|`show_apr_tooltip` |`boolean` |true |Indicates whether or not to show the Annual Percentage Returns (APR) tooltip on [Spot Pools](https://app.dem.exchange/pools/spot) page | \ No newline at end of file +|`show_apr_tooltip` |`boolean` |true |Indicates whether or not to show the Annual Percentage Returns (APR) tooltip on [Spot Pools](https://app.dem.exchange/pools/spot) page | + +## AnnouncementBanner +|Field |Type |Required |Description |Notes | +|---|---|---|---|---| +|`show_from` |`string` |false |The date and time when the market banner is scheduled to begin displaying. |If not provided, the banner will be shown immediately.

This field **MUST** follow the valid ISO 8601 format
e.g. *2024-01-23T09:00+00:00* (23 Jan 2024, 9am UTC) | +|`show_until` |`string` |false |The date and time when the market banner is scheduled to stop displaying. |If not provided, the banner will continue to display indefinitely.

This field **MUST** follow the valid ISO 8601 format
e.g. *2024-01-23T09:00+00:00* (23 Jan 2024, 9am UTC) | +|`content` |`string` |true |The content shown on the market banner. | +|`hideable` |`boolean` |false |Indicates if user can hide the banner by clicking on the close button |If set to `false`, the close button will not be rendered on the banner, and user will not be able to dismiss the banner. | +|`show_only_on` |`string[]` |true |Default is empty list, then banner will be shown on all pages |If list has specified path(s), the banner will be shown on these/that path(s) only. | diff --git a/config.schema.json b/config.schema.json index 0242745..9a280ac 100644 --- a/config.schema.json +++ b/config.schema.json @@ -537,7 +537,8 @@ "type": "object", "description": "Custom announcement banner through all or only on specificed paths", "required": [ - "content" + "content", + "show_only_on" ], "patternProperties": { "show_from": { diff --git a/configs/mainnet.json b/configs/mainnet.json index 5f4175f..d13f698 100644 --- a/configs/mainnet.json +++ b/configs/mainnet.json @@ -482,5 +482,12 @@ }, "spot_pool_config": { "show_apr_tooltip": true + }, + "announcement_banner": { + "show_from": "", + "show_until": "", + "content": "", + "hideable": true, + "show_only_on": [] } } diff --git a/configs/testnet.json b/configs/testnet.json index 2d3c393..39caa1f 100644 --- a/configs/testnet.json +++ b/configs/testnet.json @@ -59,5 +59,12 @@ }, "spot_pool_config": { "show_apr_tooltip": false + }, + "announcement_banner": { + "show_from": "", + "show_until": "", + "content": "", + "hideable": true, + "show_only_on": [] } } diff --git a/scripts/check_configs.ts b/scripts/check_configs.ts index c13f7d3..fe3e524 100644 --- a/scripts/check_configs.ts +++ b/scripts/check_configs.ts @@ -34,6 +34,7 @@ interface ConfigJSON { market_banners?: MarketBanner[]; market_promo?: {[marketId: string]: MarketPromo}; spot_pool_config?: SpotPoolConfig; + announcement_banner: AnnouncementBanner; } interface InvalidEntry { @@ -132,6 +133,14 @@ interface SpotPoolConfig { show_apr_tooltip: boolean; } +interface AnnouncementBanner { + show_from?: string; + show_until?: string; + content: string; + hideable?: boolean; + show_only_on: string[]; +} + type OutcomeMap = { [key in CarbonSDK.Network]: boolean }; // true = success, false = failure const outcomeMap: OutcomeMap = { @@ -385,6 +394,20 @@ function isValidMarketBanners(marketBanners: MarketBanner[], network: CarbonSDK. return true; } +function isValidAnnouncementBanner(announcementBanner: AnnouncementBanner, network: CarbonSDK.Network): boolean { + const startTime = announcementBanner.show_from ? new Date(announcementBanner.show_from) : null + const endTime = announcementBanner.show_until ? new Date(announcementBanner.show_until) : null + + if (startTime && endTime) { + const isValidStartEndTime = endTime.getTime() > startTime.getTime() + if (!isValidStartEndTime) { + console.error(`ERROR: ${network}.json has the following invalid show_from ${announcementBanner.show_from} and invalid show_until ${announcementBanner.show_until} `); + return false + } + } + return true +} + function isValidMarketPromo(marketPromo: {[marketId: string]: MarketPromo}, network: CarbonSDK.Network, marketIds: string[]): boolean { const marketPromoIds = Object.keys(marketPromo) const hasInvalidMarketPromoIds = checkValidEntries(marketPromoIds, marketIds) @@ -753,6 +776,10 @@ async function main() { outcomeMap[network] = false; } + if(jsonData.announcement_banner && !isValidAnnouncementBanner(jsonData.announcement_banner, network)) { + outcomeMap[network] = false; + } + // check for spot pool config if (jsonData.spot_pool_config) { const spotPoolConfig = jsonData.spot_pool_config From 889022622ebb8472d33fc96ccc457b17216e27ac Mon Sep 17 00:00:00 2001 From: huy9x101 <118549188+huy9x101@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:58:01 +0700 Subject: [PATCH 15/28] add data test --- configs/devnet.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/devnet.json b/configs/devnet.json index 9da2ffe..de7a2c7 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -47,8 +47,8 @@ "show_apr_tooltip": false }, "announcement_banner": { - "show_from": "2024-12-17T06:30+00:00", - "show_until": "2024-12-17T06:49+00:00", + "show_from": "2024-12-17T11:00+00:00", + "show_until": "2024-12-17T11:10+00:00", "content": "Demex will be down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", "hideable": true, "show_only_on": [] From 453f4497f10ecb2aca6e36adccaa6cdf31722c0d Mon Sep 17 00:00:00 2001 From: huy9x101 <118549188+huy9x101@users.noreply.github.com> Date: Wed, 18 Dec 2024 07:57:40 +0700 Subject: [PATCH 16/28] Add sample show rely on --- .github/markets/pr_template.md | 2 +- configs/devnet.json | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/markets/pr_template.md b/.github/markets/pr_template.md index d177299..51f6c8a 100644 --- a/.github/markets/pr_template.md +++ b/.github/markets/pr_template.md @@ -129,4 +129,4 @@ Each json file under the [configs](../../configs) folder correspond to their res |`show_until` |`string` |false |The date and time when the market banner is scheduled to stop displaying. |If not provided, the banner will continue to display indefinitely.

This field **MUST** follow the valid ISO 8601 format
e.g. *2024-01-23T09:00+00:00* (23 Jan 2024, 9am UTC) | |`content` |`string` |true |The content shown on the market banner. | |`hideable` |`boolean` |false |Indicates if user can hide the banner by clicking on the close button |If set to `false`, the close button will not be rendered on the banner, and user will not be able to dismiss the banner. | -|`show_only_on` |`string[]` |true |Default is empty list, then banner will be shown on all pages |If list has specified path(s), the banner will be shown on these/that path(s) only. | +|`show_only_on` |`string[]` |true |Default is empty list, then banner will be shown on all pages |If list has specified path(s), the banner will be shown on these/that path(s) only, sample: `['/rewards', '/nitron']` | diff --git a/configs/devnet.json b/configs/devnet.json index de7a2c7..f2898c8 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -51,6 +51,9 @@ "show_until": "2024-12-17T11:10+00:00", "content": "Demex will be down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", "hideable": true, - "show_only_on": [] + "show_only_on": [ + "/rewards", + "/nitron" + ] } } \ No newline at end of file From 3bad927be6f35f887c313c531cc194445bea5d54 Mon Sep 17 00:00:00 2001 From: Kimmie Date: Thu, 19 Dec 2024 06:09:20 +0700 Subject: [PATCH 17/28] Update config --- configs/devnet.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/devnet.json b/configs/devnet.json index 52360ec..e33a782 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -47,10 +47,10 @@ "show_apr_tooltip": false }, "announcement_banner": { - "show_from": "2024-12-17T11:00+00:00", - "show_until": "2024-12-17T11:10+00:00", + "show_from": "2024-12-18T23:12+00:00", + "show_until": "2024-12-18T23:20+00:00", "content": "Demex will be down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", - "hideable": true, + "hideable": false, "show_only_on": [ "/rewards", "/nitron" From 16dfded4fedd681c4eb05385870913377b017180 Mon Sep 17 00:00:00 2001 From: Kimmie Date: Thu, 19 Dec 2024 06:57:29 +0700 Subject: [PATCH 18/28] update config --- configs/devnet.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/devnet.json b/configs/devnet.json index e33a782..edef707 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -47,8 +47,8 @@ "show_apr_tooltip": false }, "announcement_banner": { - "show_from": "2024-12-18T23:12+00:00", - "show_until": "2024-12-18T23:20+00:00", + "show_from": "2024-12-19T00:01+00:00", + "show_until": "2024-12-19T00:10+00:00", "content": "Demex will be down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", "hideable": false, "show_only_on": [ From c9ef7573e4881c0e47fed1d500d40c64802fe92f Mon Sep 17 00:00:00 2001 From: huy9x101 <118549188+huy9x101@users.noreply.github.com> Date: Thu, 19 Dec 2024 08:51:55 +0700 Subject: [PATCH 19/28] Update test data devnet --- configs/devnet.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/devnet.json b/configs/devnet.json index edef707..622cd90 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -47,8 +47,8 @@ "show_apr_tooltip": false }, "announcement_banner": { - "show_from": "2024-12-19T00:01+00:00", - "show_until": "2024-12-19T00:10+00:00", + "show_from": "2024-12-19T01:53+00:00", + "show_until": "2024-12-19T02:10+00:00", "content": "Demex will be down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", "hideable": false, "show_only_on": [ From f31c8b6fef718520fb2dbbff69a5fd65403a41c6 Mon Sep 17 00:00:00 2001 From: huy9x101 <118549188+huy9x101@users.noreply.github.com> Date: Thu, 19 Dec 2024 08:54:58 +0700 Subject: [PATCH 20/28] update test devnet --- configs/devnet.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/devnet.json b/configs/devnet.json index 622cd90..899ab9d 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -47,7 +47,7 @@ "show_apr_tooltip": false }, "announcement_banner": { - "show_from": "2024-12-19T01:53+00:00", + "show_from": "2024-12-19T01:56+00:00", "show_until": "2024-12-19T02:10+00:00", "content": "Demex will be down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", "hideable": false, From 181fba4eacd2d7a54ac7f3e03de9c6329678dca3 Mon Sep 17 00:00:00 2001 From: huy9x101 <118549188+huy9x101@users.noreply.github.com> Date: Thu, 19 Dec 2024 09:00:57 +0700 Subject: [PATCH 21/28] Update devnet data --- configs/devnet.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/devnet.json b/configs/devnet.json index 899ab9d..ac91a06 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -47,7 +47,7 @@ "show_apr_tooltip": false }, "announcement_banner": { - "show_from": "2024-12-19T01:56+00:00", + "show_from": "2024-12-19T02:03+00:00", "show_until": "2024-12-19T02:10+00:00", "content": "Demex will be down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", "hideable": false, From 1fc190ca597b9204132a88ea7d18dab59d4170d9 Mon Sep 17 00:00:00 2001 From: huy9x101 <118549188+huy9x101@users.noreply.github.com> Date: Thu, 19 Dec 2024 09:06:59 +0700 Subject: [PATCH 22/28] Update devnet data --- configs/devnet.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/devnet.json b/configs/devnet.json index ac91a06..e4c472e 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -47,8 +47,8 @@ "show_apr_tooltip": false }, "announcement_banner": { - "show_from": "2024-12-19T02:03+00:00", - "show_until": "2024-12-19T02:10+00:00", + "show_from": "2024-12-19T02:10+00:00", + "show_until": "2024-12-19T02:15+00:00", "content": "Demex will be down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", "hideable": false, "show_only_on": [ From 7291618226c64116b5776e31bac83dc200c6dee1 Mon Sep 17 00:00:00 2001 From: huy9x101 <118549188+huy9x101@users.noreply.github.com> Date: Thu, 19 Dec 2024 09:14:53 +0700 Subject: [PATCH 23/28] Update devnet data --- configs/devnet.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/devnet.json b/configs/devnet.json index e4c472e..04c4896 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -47,8 +47,8 @@ "show_apr_tooltip": false }, "announcement_banner": { - "show_from": "2024-12-19T02:10+00:00", - "show_until": "2024-12-19T02:15+00:00", + "show_from": "2024-12-19T02:18+00:00", + "show_until": "2024-12-19T02:21+00:00", "content": "Demex will be down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", "hideable": false, "show_only_on": [ From 9e6d51243bf4402cde655dd5025581a1577ad629 Mon Sep 17 00:00:00 2001 From: kimie Date: Thu, 19 Dec 2024 09:58:20 +0700 Subject: [PATCH 24/28] Update config to test --- configs/devnet.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/configs/devnet.json b/configs/devnet.json index 04c4896..a4c96dc 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -47,13 +47,14 @@ "show_apr_tooltip": false }, "announcement_banner": { - "show_from": "2024-12-19T02:18+00:00", - "show_until": "2024-12-19T02:21+00:00", + "show_from": "2024-12-19T03:10+00:00", + "show_until": "2024-12-19T03:25+00:00", "content": "Demex will be down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", "hideable": false, "show_only_on": [ "/rewards", - "/nitron" + "/nitron", + "/trade" ] }, "quick_select_deposit_options": [ From 01903a3253d648ebc8f28300047b2bf8a553192e Mon Sep 17 00:00:00 2001 From: kimie Date: Thu, 19 Dec 2024 09:58:20 +0700 Subject: [PATCH 25/28] Update config to test --- configs/devnet.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/devnet.json b/configs/devnet.json index a4c96dc..197a3f0 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -50,11 +50,11 @@ "show_from": "2024-12-19T03:10+00:00", "show_until": "2024-12-19T03:25+00:00", "content": "Demex will be down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", - "hideable": false, + "hideable": true, "show_only_on": [ "/rewards", "/nitron", - "/trade" + "/trade/" ] }, "quick_select_deposit_options": [ From 6e6e62c6b37a9c614ce5f9054df6de4814c09159 Mon Sep 17 00:00:00 2001 From: kimie Date: Thu, 19 Dec 2024 10:14:44 +0700 Subject: [PATCH 26/28] update config --- configs/devnet.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configs/devnet.json b/configs/devnet.json index 197a3f0..6c5a1a9 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -54,7 +54,8 @@ "show_only_on": [ "/rewards", "/nitron", - "/trade/" + "/trade/", + "/swap/" ] }, "quick_select_deposit_options": [ From bdf75ddbc8ad8ec9dfe386d58b03b8c4e5893ddb Mon Sep 17 00:00:00 2001 From: kimie Date: Thu, 19 Dec 2024 10:30:44 +0700 Subject: [PATCH 27/28] Update to show all pages --- configs/devnet.json | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/configs/devnet.json b/configs/devnet.json index 6c5a1a9..3efe8a9 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -47,16 +47,11 @@ "show_apr_tooltip": false }, "announcement_banner": { - "show_from": "2024-12-19T03:10+00:00", - "show_until": "2024-12-19T03:25+00:00", + "show_from": "2024-12-19T03:35+00:00", + "show_until": "2024-12-19T04:00+00:00", "content": "Demex will be down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", "hideable": true, - "show_only_on": [ - "/rewards", - "/nitron", - "/trade/", - "/swap/" - ] + "show_only_on": [] }, "quick_select_deposit_options": [ { From 4b62d2cff6d23f504564a111b91506ca2016114e Mon Sep 17 00:00:00 2001 From: huy9x101 <118549188+huy9x101@users.noreply.github.com> Date: Thu, 19 Dec 2024 11:42:53 +0700 Subject: [PATCH 28/28] Update content --- configs/devnet.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configs/devnet.json b/configs/devnet.json index 3efe8a9..8540a65 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -47,10 +47,10 @@ "show_apr_tooltip": false }, "announcement_banner": { - "show_from": "2024-12-19T03:35+00:00", - "show_until": "2024-12-19T04:00+00:00", - "content": "Demex will be down for maintenance from 13:00 - 18:00 UTC, 20 Dec. We recommend closing any open orders during this time to minimize potential risks.", - "hideable": true, + "show_from": "2024-12-19T02:18+00:00", + "show_until": "2024-12-19T02:21+00:00", + "content": "Demex will be down for maintenance from 03:00 - 08:00 UTC, 23 Dec. We recommend closing any open orders during this time to minimize potential risks.", + "hideable": false, "show_only_on": [] }, "quick_select_deposit_options": [