From 0d3feefab406e4aa73e15f953e53126dfa968405 Mon Sep 17 00:00:00 2001 From: robhyrk Date: Tue, 14 Nov 2023 00:50:11 -0500 Subject: [PATCH] chore: add tw prettier and format all applicable files --- .prettierrc.js | 1 + LICENSE.md | 366 +- components/account/Account.tsx | 2 +- components/account/AccountButton.tsx | 46 +- components/account/AccountModalContent.tsx | 18 +- components/account/AccountModalHead.tsx | 2 +- components/account/AccountSelect.tsx | 6 +- components/account/AccountSelectOption.tsx | 10 +- components/account/AccountSelectValue.tsx | 12 +- components/account/OnboardingModal.tsx | 44 +- components/account/WalletSelect.tsx | 8 +- .../AssetActionButtons/PoolShareButtons.tsx | 4 +- .../AssetActionButtons/RedeemButton.tsx | 2 +- .../AssetActionButtons/ReportButton.tsx | 4 +- components/avatar/BadgesList.tsx | 42 +- .../confirmation/ConfirmationProvider.tsx | 10 +- components/court/DelegateJuror.tsx | 18 +- components/court/JoinCourt.tsx | 20 +- components/court/JurorsTable.tsx | 5 +- components/court/PrepareExitCourt.tsx | 8 +- components/create/editor/Editor.tsx | 132 +- .../create/editor/MarketFormSection.tsx | 10 +- components/create/editor/Publishing.tsx | 54 +- components/create/editor/ResetButton.tsx | 12 +- components/create/editor/Summary.tsx | 68 +- .../create/editor/inputs/BlockPeriod.tsx | 20 +- components/create/editor/inputs/Category.tsx | 6 +- components/create/editor/inputs/Currency.tsx | 14 +- components/create/editor/inputs/DateTime.tsx | 10 +- components/create/editor/inputs/FeeSelect.tsx | 6 +- .../create/editor/inputs/LiquidityAMM2.tsx | 2 +- .../create/editor/inputs/Moderation.tsx | 10 +- components/create/editor/inputs/Oracle.tsx | 20 +- .../create/editor/inputs/TimezoneSelect.tsx | 4 +- .../editor/inputs/answers/Categorical.tsx | 20 +- .../create/editor/inputs/answers/Scalar.tsx | 14 +- .../create/editor/inputs/answers/index.tsx | 12 +- components/front-page/BgBallFx.tsx | 2 +- .../front-page/GettingStartedSection.tsx | 4 +- components/front-page/HeroBanner.tsx | 28 +- components/front-page/LatestTrades.tsx | 4 +- components/front-page/NetworkStats.tsx | 6 +- components/front-page/News.tsx | 10 +- components/front-page/PopularCategories.tsx | 16 +- components/front-page/WatchHow.tsx | 14 +- components/grillchat/index.tsx | 6 +- components/hero-slider/HeroControls.tsx | 12 +- components/hero-slider/HeroSlide.tsx | 6 +- components/hero-slider/HeroSlider.module.css | 14 +- components/hero-slider/HeroSlider.tsx | 6 +- components/liquidity/ExitPoolForm.tsx | 10 +- components/liquidity/JoinPoolForm.tsx | 16 +- components/liquidity/LiquidityModal.tsx | 6 +- .../liquidity/MarketLiquiditySection.tsx | 49 +- components/liquidity/PoolFeesSelect.tsx | 10 +- components/liquidity/PoolSettings.tsx | 18 +- components/liquidity/PoolSettingsAMM2.tsx | 14 +- components/markets/BuyFullSetForm.tsx | 10 +- components/markets/BuySellFullSetsButton.tsx | 6 +- components/markets/MarketAddresses.tsx | 30 +- components/markets/MarketChart.tsx | 2 +- .../MarketContextActionOutcomeSelector.tsx | 16 +- components/markets/MarketHeader.tsx | 67 +- components/markets/MarketScroll.tsx | 10 +- components/markets/MarketSearch.tsx | 22 +- components/markets/MarketTimer.tsx | 22 +- components/markets/MarketsList.tsx | 10 +- components/markets/PoolDeployer.tsx | 43 +- components/markets/PromotionCallout.tsx | 22 +- components/markets/ReportResult.tsx | 2 +- components/markets/ScalarPriceRange.tsx | 10 +- components/markets/SellFullSetForm.tsx | 10 +- components/markets/SimilarMarketsSection.tsx | 6 +- components/markets/TradeResult.tsx | 2 +- components/markets/market-card/index.tsx | 32 +- .../markets/market-filter/ClearAllButton.tsx | 2 +- .../markets/market-filter/DropDownSelect.tsx | 10 +- .../market-filter/MarketActiveFilters.tsx | 2 +- .../market-filter/MarketFiltersCheckboxes.tsx | 2 +- .../market-filter/MarketFiltersDropdowns.tsx | 2 +- components/markets/market-filter/index.tsx | 14 +- .../mobile-dialog/FilterDetails.tsx | 10 +- .../mobile-dialog/FiltersList.tsx | 8 +- .../market-filter/mobile-dialog/index.tsx | 10 +- components/outcomes/CategoricalDisputeBox.tsx | 14 +- components/outcomes/CategoricalReportBox.tsx | 2 +- components/outcomes/ScalarDisputeBox.tsx | 10 +- components/outcomes/ScalarReportBox.tsx | 8 +- components/portfolio/Breakdown.tsx | 24 +- components/portfolio/DepositButton.tsx | 20 +- components/portfolio/EmptyPortfolio.tsx | 6 +- components/portfolio/MarketPositionHeader.tsx | 2 +- components/portfolio/PortfolioIdentity.tsx | 24 +- components/portfolio/TradeHistoryTable.tsx | 8 +- components/portfolio/Transfer.tsx | 4 +- components/portfolio/TransferButton.tsx | 6 +- components/portfolio/WithdrawButton.tsx | 24 +- components/settings/AccountSettingsForm.tsx | 14 +- components/settings/FeePayingAssetSelect.tsx | 6 +- components/settings/OtherSettingsForm.tsx | 8 +- components/settings/SettingsModal.tsx | 12 +- components/top-bar/Alerts.tsx | 30 +- components/top-bar/MenuItem.tsx | 12 +- components/top-bar/MenuLogo.tsx | 4 +- components/top-bar/index.tsx | 62 +- components/trade-form/index.tsx | 16 +- components/ui/AddressInput.tsx | 20 +- components/ui/AssetInput.tsx | 6 +- components/ui/AssetSelect.tsx | 12 +- components/ui/Avatar.tsx | 2 +- components/ui/CopyIcon.tsx | 8 +- components/ui/Footer.tsx | 26 +- components/ui/HorizontalScroll.tsx | 12 +- components/ui/InfoPopover.tsx | 12 +- components/ui/Loader.tsx | 8 +- components/ui/Modal.tsx | 2 +- components/ui/NotificationCenter.tsx | 18 +- components/ui/Paginator.tsx | 10 +- components/ui/PercentageChange.tsx | 2 +- components/ui/Pill.tsx | 6 +- components/ui/RangeInput.tsx | 2 +- components/ui/SecondaryButton.tsx | 2 +- components/ui/Skeleton.tsx | 2 +- components/ui/SubTabsList.tsx | 2 +- components/ui/TabGroup.tsx | 6 +- components/ui/Table.tsx | 40 +- components/ui/TimeFilters.tsx | 6 +- components/ui/TimeSeriesChart.tsx | 8 +- components/ui/Toggle.tsx | 6 +- components/ui/TransactionButton.tsx | 6 +- components/ui/actionable/ActionableCard.tsx | 14 +- components/ui/inputs.tsx | 6 +- components/wizard/WizardStepper.tsx | 20 +- docker-compose.yml | 2 +- layouts/DefaultLayout.tsx | 4 +- layouts/PortfolioLayout.tsx | 2 +- lib/constants/market-filter.ts | 26 +- lib/constants/markets.ts | 2 +- lib/constants/supported-currencies.ts | 7 +- lib/gql/trending-markets.ts | 5 +- lib/hooks/animation/useTypedText.ts | 17 +- lib/hooks/queries/usePortfolioPositions.ts | 16 +- lib/hooks/queries/useTransactionHistory.ts | 3 +- lib/hooks/trade.tsx | 4 +- .../constants/deadline-options.ts | 16 +- lib/state/market-creation/types/draft.ts | 71 +- lib/types/deep-readonly.ts | 8 +- lib/types/market-filter.ts | 4 +- lib/types/union.ts | 18 +- lib/util/weight-math.ts | 4 +- package.json | 3 +- pages/404.tsx | 4 +- pages/activity.tsx | 2 +- pages/badges.tsx | 38 +- pages/court/index.tsx | 10 +- pages/create-account.tsx | 14 +- pages/deposit.tsx | 89 +- pages/index.tsx | 4 +- pages/leaderboard/[period].tsx | 14 +- pages/liquidity/[poolid].tsx | 22 +- pages/markets/[marketid].tsx | 68 +- pages/markets/await/[marketid].tsx | 10 +- pages/portfolio/[address].tsx | 2 +- pages/search.tsx | 12 +- public/prices/dot.json | 3444 +++++- public/prices/usdt.json | 9378 ++++++++++++++++- public/prices/ztg.json | 1392 ++- styles/card.css | 2 +- styles/drawer.css | 2 +- styles/index.css | 13 +- styles/quill.css | 6 +- styles/range-component.css | 4 +- yarn.lock | 66 +- 173 files changed, 15675 insertions(+), 1388 deletions(-) diff --git a/.prettierrc.js b/.prettierrc.js index c7bb7a5da..977d55759 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -3,4 +3,5 @@ module.exports = { tabWidth: 2, singleQuote: false, semi: true, + plugins: ["prettier-plugin-tailwindcss"], }; diff --git a/LICENSE.md b/LICENSE.md index 261eeb9e9..c61b66391 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -2,180 +2,180 @@ Version 2.0, January 2004 http://www.apache.org/licenses/ - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" @@ -186,16 +186,16 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] +Copyright [yyyy] [name of copyright owner] - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/components/account/Account.tsx b/components/account/Account.tsx index 35ce3e1f9..f4c17cdaa 100644 --- a/components/account/Account.tsx +++ b/components/account/Account.tsx @@ -16,7 +16,7 @@ export const Account = () => { return ( <> - +
diff --git a/components/account/AccountButton.tsx b/components/account/AccountButton.tsx index 86015a130..5fd23ee89 100644 --- a/components/account/AccountButton.tsx +++ b/components/account/AccountButton.tsx @@ -48,7 +48,7 @@ const BalanceRow = ({
{balance && `${formatNumberLocalized(balance?.div(ZTG).abs().toNumber())} ${ @@ -67,7 +67,7 @@ const HeaderActionButton: FC< > = ({ onClick, disabled, children }) => { return (
-
-
- +
+
+ Network Fee: {fee ? fee.amount.div(ZTG).toFixed(3) : 0}{" "} {fee?.symbol} diff --git a/components/create/editor/Editor.tsx b/components/create/editor/Editor.tsx index eec07c426..1f1ce01b4 100644 --- a/components/create/editor/Editor.tsx +++ b/components/create/editor/Editor.tsx @@ -129,16 +129,16 @@ export const MarketEditor = () => { leaveTo="opacity-0" >

-
+
Create Market

-
+
One Page
Wizard
@@ -161,12 +161,12 @@ export const MarketEditor = () => { onClickNext={next} nextDisabled={!fieldsState.currency.isValid} > -
-

+
+

Market Currency +

Market Base Asset

@@ -181,9 +181,9 @@ export const MarketEditor = () => {

{showLiquidityWarning && ( -
-
- +
+
+ You have already added liquidity to this market. If you change the base currency liquidity settings will be reset to defaults. @@ -201,27 +201,27 @@ export const MarketEditor = () => { !fieldsState.question.isValid || !fieldsState.tags.isValid } > -
-

What is your question?

+
+

What is your question?

-
+
-

+

Which categories does the market relate to? @@ -232,7 +232,7 @@ export const MarketEditor = () => {

-
+
@@ -244,17 +244,17 @@ export const MarketEditor = () => { onClickBack={back} nextDisabled={!fieldsState.answers.isValid} > -
-

+
+

Answers Answer Types

} className="!text-left" > -

+

Outcomes (Categorical)

-

+

Outcomes will create a categorical market from the options you specify.{" "} { Learn more.

-

Scalar

-

+

Scalar

+

A scalar market is a market where the outcome is a number or date in a the range specified by the lower(short) and upper( @@ -279,7 +279,7 @@ export const MarketEditor = () => { Learn more.

-

Yes/No

+

Yes/No

Choosing yes/no will create a categorical market with two preset outcomes, yes and no. @@ -292,10 +292,10 @@ export const MarketEditor = () => { fieldState={fieldsState.answers} /> {showLiquidityWarning && ( -

+
-
- +
+ You have already added liquidity to this market. If you change the number of answers the liquidity settings will be reset to defaults. @@ -303,7 +303,7 @@ export const MarketEditor = () => {
)} -
+
@@ -320,11 +320,11 @@ export const MarketEditor = () => { !fieldsState.disputePeriod.isValid } > -
+

When does the market end?

-
+
{ />
-
+
@@ -341,11 +341,11 @@ export const MarketEditor = () => {
-

+

Set Grace Period +

Grace Period

@@ -368,18 +368,18 @@ export const MarketEditor = () => { {...input("gracePeriod", { mode: "all" })} />

-
+
-

+

Set Report Period +

Report Period

@@ -404,18 +404,18 @@ export const MarketEditor = () => { {...input("reportingPeriod", { mode: "all" })} />

-
+
-

+

Set Dispute Period +

Dispute Period

@@ -438,7 +438,7 @@ export const MarketEditor = () => { {...input("disputePeriod", { mode: "all" })} />

-
+
@@ -452,10 +452,10 @@ export const MarketEditor = () => { onClickBack={back} nextDisabled={!fieldsState.oracle.isValid} > -
-

Set Up Oracle

+
+

Set Up Oracle

-

+

This is the account that will be{" "} responsible for submitting the outcome @@ -478,7 +478,7 @@ export const MarketEditor = () => { {...input("oracle", { mode: "all" })} />

-
+
@@ -492,19 +492,19 @@ export const MarketEditor = () => { onClickBack={back} nextDisabled={!fieldsState.description.isValid} > -
-

Market Description

+
+

Market Description

-
+
-
+
@@ -518,13 +518,13 @@ export const MarketEditor = () => { onClickBack={back} nextDisabled={!fieldsState.moderation.isValid} > -
-

Market Moderation

+
+

Market Moderation

-
+
-
+
@@ -542,8 +542,8 @@ export const MarketEditor = () => { > {form.currency && (
-
-

Creator Fee

+
+

Creator Fee

Creators will be paid a fee based on trading volume. @@ -561,20 +561,20 @@ export const MarketEditor = () => { ]} isValid={fieldsState.creatorFee?.isValid} /> -

+
)} {form.moderation === "Permissionless" && form.currency ? ( <> -
-

Market Liquidity

+
+

Market Liquidity

-
-
Deploy Pool?
+
+
Deploy Pool?
{
{!form?.liquidity?.deploy ? (
-
+
-

+

No liquidity pool will be deployed for the market. You can deploy a pool after you create the market @@ -600,7 +600,7 @@ export const MarketEditor = () => {

) : !fieldsState.answers.isValid ? ( -
+
Answers must be filled out correctly before adding liquidity.
@@ -626,7 +626,7 @@ export const MarketEditor = () => { /> )} -
+
@@ -634,11 +634,11 @@ export const MarketEditor = () => { ) : ( <>
-
+
-
+
You have selected advised moderation. This means that the market could be rejected by the moderators.
@@ -667,7 +667,7 @@ export const MarketEditor = () => { isCurrent={currentStep.label == "Summary"} disabled={!isWizard} > -
+
diff --git a/components/create/editor/MarketFormSection.tsx b/components/create/editor/MarketFormSection.tsx index 58b0af1f6..3656d6dbe 100644 --- a/components/create/editor/MarketFormSection.tsx +++ b/components/create/editor/MarketFormSection.tsx @@ -34,10 +34,10 @@ export const MarketFormSection = ({ ) : ( <>
{children}
-
+
{onClickBack && (
-
+
{form.moderation}
-

+

{form?.oracle ? form?.oracle : "--"}

-

+

{form?.oracle ? shortenAddress(form?.oracle, 6, 6) : "--"}

-
-
+
+
{form.endDate @@ -210,8 +210,8 @@ export const MarketSummary = ({ editor }: MarketSummaryProps) => {
-
-
+
+
{" "}
{form.gracePeriod?.type === "duration" @@ -225,7 +225,7 @@ export const MarketSummary = ({ editor }: MarketSummaryProps) => { )} ${form.timeZone ?? ""}`}
-
+
{" "}
{timeline?.report @@ -235,7 +235,7 @@ export const MarketSummary = ({ editor }: MarketSummaryProps) => { : "--"}
-
+
{" "}
{timeline?.dispute @@ -250,9 +250,9 @@ export const MarketSummary = ({ editor }: MarketSummaryProps) => {
-
+
{form?.description ? ( -
+
) : ( @@ -262,7 +262,7 @@ export const MarketSummary = ({ editor }: MarketSummaryProps) => {
-
{form?.creatorFee?.value} %
+
{form?.creatorFee?.value} %
); @@ -283,7 +283,7 @@ const Answers = ({ }) => { return (
{answerLiquidity?.asset} @@ -306,9 +306,9 @@ const Answers = ({ {liquidity && liquidity.deploy && moderation === "Permissionless" ? ( -
-
-
+
+
+
{" "}
@@ -319,8 +319,8 @@ const Answers = ({
{!liquidity.amount && ( -
-
+
+
{" "}
@@ -333,8 +333,8 @@ const Answers = ({
)} -
-
+
+
{" "}
@@ -356,7 +356,7 @@ const Answers = ({
-
+
{" "}
diff --git a/components/create/editor/inputs/BlockPeriod.tsx b/components/create/editor/inputs/BlockPeriod.tsx index 5791b280c..10eb5008c 100644 --- a/components/create/editor/inputs/BlockPeriod.tsx +++ b/components/create/editor/inputs/BlockPeriod.tsx @@ -118,16 +118,16 @@ export const BlockPeriodPicker: React.FC = ({ return (
-
+
{durationPresets.map((option, index) => (
)}
-
-
Numbers
+
+
Numbers
-
Dates
+
Dates
@@ -109,14 +109,14 @@ export const ScalarAnswersInput = ({ )} -

Short

+

Short

{value?.numberType === "date" ? ( @@ -131,13 +131,13 @@ export const ScalarAnswersInput = ({ )} -

Long

+

Long

diff --git a/components/create/editor/inputs/answers/index.tsx b/components/create/editor/inputs/answers/index.tsx index 1c20c8d35..a374d8eec 100644 --- a/components/create/editor/inputs/answers/index.tsx +++ b/components/create/editor/inputs/answers/index.tsx @@ -24,8 +24,8 @@ export const AnswersInput = ({ type === "yes/no" ? { type: "yes/no", answers: ["Yes", "No"] } : type === "categorical" - ? { type: "categorical", answers: ["", ""] } - : { type: "scalar", numberType: "number", answers: [0, 1] }; + ? { type: "categorical", answers: ["", ""] } + : { type: "scalar", numberType: "number", answers: [0, 1] }; onChange({ target: { name, value: newValue }, type: "change" }); }; @@ -40,10 +40,10 @@ export const AnswersInput = ({ return ( <> -
+