Skip to content

Commit

Permalink
address reviewer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhpn committed Oct 28, 2024
1 parent babd24e commit 1ba22c4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/markets/pr_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Each json file under the [configs](../../configs) folder correspond to their res
|`demex_trading_league_config` |`DemexTradingLeagueConfig` |false |Object that contains the parameters for the current trading league. |
|`perp_pools` |`PerpPoolConfig` |false |Object that contains the configs for Perp Pools |
|`wswth_contract` |`string` |false |wSWTH ERC-20 contract. |
|`market_banners` |`object[]` |true |market banner configs. |
|`market_banners` |`MarketBanner[]` |true |market banner configs. |

## Maintenance Data Structure
|Field |Type |Required |Description |Notes |
Expand Down Expand Up @@ -95,4 +95,4 @@ Each json file under the [configs](../../configs) folder correspond to their res
|`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.<br /><br /> This field **MUST** follow the valid ISO 8601 format <br /> 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.<br /><br /> This field **MUST** follow the valid ISO 8601 format <br /> 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 |This flag to show or hide close button on 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. |
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Additionally, the JSON file for mainnet contains the following data to support o
- config for the Demex Trading League competition
- perp pool promotion parameters
- typeform survey parameters
- market banner parameters
- market banner parameters for information banners to be displayed on the TradingView charts on Trade UI

More metadata will be added in the future if required by the Demex frontend. Please see below the structure of the JSON file:

Expand Down
2 changes: 1 addition & 1 deletion config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
},
"content": {
"type": "string",
"description": "The content shown on the banner"
"description": "The content shown on the banner, we can render hyperlink in the content eg: You can visit [here](url)"
},
"additional_ibc_token_info": {
"type": "object",
Expand Down
6 changes: 2 additions & 4 deletions scripts/check_configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -622,10 +622,8 @@ async function main() {
}
}

if(jsonData.market_banners) {
if(!isValidMarketBanners(jsonData.market_banners, network, marketIds)) {
outcomeMap[network] = false;
}
if(jsonData.market_banners && !isValidMarketBanners(jsonData.market_banners, network, marketIds)) {
outcomeMap[network] = false;
}

// external chain channels check
Expand Down

0 comments on commit 1ba22c4

Please sign in to comment.