Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Move abis from services into the abi folder (#2104)
* deleted unusued buttons and optimized disconnect button so it can be deleted (#2021) * all the unused components I found (#2022) * refactor: remove compound logic from market buy (#2027) * refactor: start removing compound service from market buy * refactor: remove compound logic from conditional and scalar market buy * fix: update getInitialCollateral tests * fix: update getInitialCollateral comment * refactor: remove compound logic from market sell (#2036) * refactor: start removing compound service from market buy * refactor: remove compound logic from conditional and scalar market buy * fix: update getInitialCollateral tests * refactor: start removing compound logic for market sell * refactor: remove compound logic from scalar sell, fix sellOutcomes unwrapping * Remove compound logic from market funding (#2040) * refactor: start removing compound service from market buy * refactor: remove compound logic from conditional and scalar market buy * fix: update getInitialCollateral tests * refactor: start removing compound logic for market sell * refactor: remove compound logic from scalar sell, fix sellOutcomes unwrapping * refactor: start removing compound logic from market funding * refactor: remove compound logic from scalar funding and update cpk * Remove compound logic from market creation (#2047) * refactor: start removing compound service from market buy * refactor: remove compound logic from conditional and scalar market buy * fix: update getInitialCollateral tests * refactor: start removing compound logic for market sell * refactor: remove compound logic from scalar sell, fix sellOutcomes unwrapping * refactor: start removing compound logic from market funding * refactor: remove compound logic from scalar funding and update cpk * refactor: remove compound logic from market creation * Refactoring Tools Folder (#2038) * refactor Added new files for date and string manipulation as well as edited existing functions to fit * refactor Added index filed which exports everything and started cleaninig up tools file * refactor Further improved folder structure and delted duplicate functions from old tools * refactor Moved functions from base file further * refactor Cleared whole tools file and ordered everything in proper file * fix Made all tests pass because im G * fix Made all tests pass because im G * refactor Added all tests to the appropriate places and cleared duplicate tests * fix Removed unused vars * fix 2 broken tests not working needed to be defined further * fix: Moved all invidiual functions files from trading into index and made new https file * fix: Moved fpmm/trading functions inside one file,renamed utils to math,fixed tests and made new http file * fix: One failing test * fix: Unused get token deleted * refactor: Space between functions and fixed export in tools/index to include all functuons from price and liqudity * Remove remaining compound logic (#2057) * refactor: remove remaining compound logic * fix: infinite loop in useEffect * fix: merge with refactoring * fix: remove compound normalized state * Use pipes in the CPK service (#2074) * refactor: remove remaining compound logic * fix: infinite loop in useEffect * fix: merge with refactoring * fix: remove compound normalized state * refactor: create example pipe for buyOutcomes * refactor: update createMarket with pipes * refactor: rename getInput to service * refactor: create exec pipe, handle scalar market creation * refactor: Move abis from services into the abi folder * Add pipes to CPK funding and redeem (#2081) * refactor: remove remaining compound logic * fix: infinite loop in useEffect * fix: merge with refactoring * fix: remove compound normalized state * refactor: create example pipe for buyOutcomes * refactor: update createMarket with pipes * refactor: rename getInput to service * refactor: create exec pipe, handle scalar market creation * refactor: add pipes to sell, addFunding, removeFunding, redeemPositions, and resolveCondition * refactor: simplify setup fns * fix: add oracle validation, use indexed oracle address for market resolution * fix: use correct oracle contract path * refactor: Added dry marketHomeContainer routes (#2103) * Improve transaction state management (#2111) * refactor: include setTxHash and setTxState in cpk constructor * refactor: integrate txHash and txState into connectedWeb3 context * fix: properly setup connectedWeb3 context with tx stuff * fix: properly retrieve tx stuff from context in useCpk * refactor: useTransactionState hook * fix: delete unused transaction state hook * feat: manage transaction state in connectedWeb3 context * feat: implement updated web3 management everywhere * fix: remove unnecessary buyOutcomes params * Add remaining pipes to CPK (#2106) * refactor: remove remaining compound logic * fix: infinite loop in useEffect * fix: merge with refactoring * fix: remove compound normalized state * refactor: create example pipe for buyOutcomes * refactor: update createMarket with pipes * refactor: rename getInput to service * refactor: create exec pipe, handle scalar market creation * refactor: add pipes to sell, addFunding, removeFunding, redeemPositions, and resolveCondition * refactor: simplify setup fns * fix: add oracle validation, use indexed oracle address for market resolution * fix: use correct oracle contract path * refactor: use pipes for submitAnswer, upgradeProxy, withdraw from xdai * fix: add relay fee for create markets and funding * fix: use token image in withdraw modal (#2125) * Wait for contract deployment after market creation (#2134) * fix: wait for contract deployment after market creation * fix: add mising await * refactor: Started adding all the json files * Use multicall for market data (#2126) * refactor: add market data multicall * refactor: calculate positionIds off-chain, move multicall to utils * fix: set tx net id before submitting transaction (#2129) * refactor: Addded rest of abis missing * Consolidate market_sell and scalar_market_sell component (#2135) * refactor: Initial setup for merging sell logic into sell container * fix: Almost done with refactoring just need to figure out main calcSellAmount memo * fix: Managed to consolidate calcSellAmount function and cleaned up rest of duplicates * fix: Type issue regarding calcSellAmount thats been bugging me whole day * refactor: Corrected incorrect outocome/position index used for scalar/categorical * style: clean up market sell container Co-authored-by: Kaden Zipfel <[email protected]> * refactor: remove authereum, remove unsed files during build (#2137) * Pool liquidity component consolidation (#2138) * fix: Refactored liqudity so that combined logic is inside pages folder * style: clean up market pool liquidity container Co-authored-by: Kaden Zipfel <[email protected]> * refactor: In progress, moved shared logic into market_buy_container (#2110) * refactor: In progress, moved shared logic into market_buy_container * fix: Further replaced all duplicate code and deleted unusued stuff * fix: Refactored rest of duplicate code for market buy * fix: Issue with app crashing and further organized marketBuyContainer * fix: Renamed container and improved folder structure * fix: Updated transaction state and hash with the new implemenatation * style: clean up market buy container Co-authored-by: Kaden Zipfel <[email protected]> * fix: Fixed market not working * Format Big Numbers doesn't need wrapper (#2090) * refactor: Made two new functions which will replace rest of formatBigNumber functions throught the code * refactor: Replaced all instance of wrapping with formatNumber and instances where formatBigNumber is wrapped with number to use bigNumberToNumber * fix: Deleted all unused imports * fix: Mistakes I found with formatting on second run * refactor: Included new bigNumber to strign function and cleaned up logs * refactor: Added rest of cases for new formatting and cleaned up console logs * fix: Added accidentaly removed styled from header * refacotr: Changed shortNumber function to accept number, made volume have type of number and changed use cases where we used bigNumber * test: Fixed format short number tests * fix: Added formatting functions where possible * fix: Deleted usexDaiBridge and added fix for error message showing incorrect message * fix: Updated create scalar market with bigNumberToNumber instead of formatBigNumber * refactor: Replaced old formatting functions with new one in setDisplay place * fix: Removed unusued bigNumber dependecy I was testing with and one white space * style: Descriptions for formatting functions * test: Started working on tests * test: Written tests for bigNumberToString and bigNumberToNumber * fix: Deleted unused function * test: Added test case for formatBigNumber that uses small decimal number * fix: Fixed logical evaluations to use bigNumber directly instead of using bigNumberToNumber * fix: Incorrect formatting function used in market_sell * style: Fixed typo * fix: Added isDust checker for your shares field on sell section * refactor: Added is dust checker to bigNumberToString and removed old isDust check * fix: Compressed json abis * fix: Started deleting unused abis and impelenting new abis * fix: History table crashing because of incorrect bigNumber formatting for dust function * Refactoring Styles (#2019) * new color base implemented along with keeping old ones until we replace them * Replace ButtonStyles with new color variables and remove primaryAlternative styling (#2020) * Replace button primary colors with new variables * remove PrimaryAlternative Button style Co-authored-by: Thomas Pulber <[email protected]> * added figma link and fixed frankos comment * edited the text3 value as per figma * refactor theme import & create new useTheme hook * rolled back the changes and will add them onto another branch * Feature/1997bis - Text Style Handling (#2078) * Refactor: Create new TextWrapper and refactor 5 text types * Fix: Fix changes requested * Fix: Last fix, GTG now * Refactor: Edit the color value to reflect new colour palette as per figma (#2108) * Feature/1996bis - color theme import refactor (#2062) * Feature: create useTheme hook to retrieve theme when not available from props * Refactor: Refactor all the theme import by using mainly props and useTheme in 2 files * Fix: Fix color values for borders * Fix: Deelete useless hover on the IconWrapper * Fix: Fix IconClose Wrapper and thus IconClose component to respect changes * Fix: Rolled back the change for the hover effect * Fix: Rolled back the changes about color values update. Will do the color value update on a separate PR * Fix: Rolled back the changes about color values update. Will do the color value update on a separate PR * Fix: Propose fix IconClose hover effect * Fix: Delete the outcome colors from the theme index * Refactor: Added the border4 as per Geronimo figma addition * Fix: Roleed back hoverEffect change * Fix: Last fix on the Icon, GTG now * Fix typo * Fix: Fix color value to colors.tertiary * Fix: Fix fill path * Fix: Fix outcomes colors proper rendering * Fix: Fixes as per Milan review * Fix: Fix styled svg for fill property * Feature/2000 - context refactoring (2 days) (#2084) * Refactor: Move the WEB3 context from hook to context folder * Refactor: Create index.ts to export all contexts and fixed an import order issue * Fix: Fix connectedWeb3 hook import statement * Fix: Fix useConnectedWeb3 context import statement everywhere * Fix: Fix connectedWeb3 import statement on more files. final for this hook * Refactor: Created Graph subfolder, Inserted 2 graph hooks, Fixed useConnectedWeb3 context imports when importing from index file everywhere * Fix: Minor fix * Fix: Minor fix after file changes review * Refactor: Moved useGraphMarketsFromQuestion inside hooks/Graph folder * Refactor: Moved 2 hooks inside hooks/Graph and edited the export on index.ts only * Refactor: Created cpk folder and moved hooks inside * Refactor: Created MarketData folder and moved hooks inside * Rfactor: Created UserTx (transactions) and moved 2 hooks inside * Fix: Edit folder name to lower_case * Fix: Fix imports after folder renaming * Dont panic, on purpose * Fix: reverted small cap name * Fix: Delete empty line after conflicts resolution * style: Fixed incorrect button secondary styling Co-authored-by: Thomas Pulber <[email protected]> Co-authored-by: Thomas Pulber <[email protected]> Co-authored-by: Francesco <[email protected]> Co-authored-by: Francesco Vauban <[email protected]> * fix: working merge, may be missing a few things * fix: cpk upgrade loading indicator * Fetch liquidity values in data hooks (#2149) * refactor: fetch liquidity for market list in useMarkets * refactor: use totalPoolShares for liquidity value in market details * fix: Incorrect formatting for liqudity value on market view Co-authored-by: My Violet <[email protected]> * fix: Removed unused abis,changed folder structure and consolidated wrapped assets and changed the case statment * Feature/2035-V2 - Folder structure refactoring (#2147) * Ref: Created app/src/components/market/sections/common_sections and /allowance folder and moved files inside * Ref: Created /arbitrators folder and moved files inside it * Ref: Created card_bottom_details and moved file inside * Ref: Created /card_top_details and moved file inside * Ref: Created /create_card and moved file inside * Ref: Created /history folder and moved files inside * Ref: Created /list and moved files inside * Ref: Created /message_text and moved files inside * Ref: Created /search_filter_categories and moved files inside * Ref: Created /tables and moved files inside * Ref: Created /user_transactions_tokens and moved files inside * Ref: Created Directory tree diagram * Fix: Directory tree * Fix: Major reordering * Fix: Update Repo Tree * refactor: move market containers to market_sections dir * chore: delete directory tree * Remove commented out imports Co-authored-by: Kaden Zipfel <[email protected]> * fix: Added checker that returns zero value if transaction is processing for calcBuyAmout * fix: Added previous state checker for calcBuyAmount * reverted changes * Replace error with warning (#2153) * Prevent fetching of userEarnings when the pool has no shares (#2154) * fix: only fetch userEarnings when the user has pool shares * fix: change userPoolShares to totalPoolShares * fix: don't charge relay fee for xdai withdrawals (#2155) * Fix: mkt_buy fee tooltip shows dynamic LP trading fee (#2158) * fix: Removed all abis from services except xdai and replaced them with new abis * fix: Replaced abi-s in xdai service * bug: Master copy is not a function error * bug: Solved issue when creating new market * fix: Deleted file used for testing abi * fix: Added new airdrop to the abis and fixed services folder structure a bit * fix: Added back index file in services folder * fix: Added wrapped asset as default abi used for withdraw function * fix: Updated delete multiple relayTokens functions from abis and updated proxy factory function Co-authored-by: hexyls <[email protected]> Co-authored-by: Kaden Zipfel <[email protected]> Co-authored-by: Thomas Pulber <[email protected]> Co-authored-by: Thomas Pulber <[email protected]> Co-authored-by: Francesco <[email protected]> Co-authored-by: Francesco Vauban <[email protected]>
- Loading branch information