* install and config Storybook
* create basic component for initial setup
* added testing-library / jest for testing
* restore coverage for testing
* downgrade codeclimate-actions to fix viable formatter issue
* clean up - remove unnecessary components in stories
* update readme with storybook and testing
* remove unnecessary file extensions on stories config
* remove babel and moved jest-dom to devDependencies
* delete introduction stories
* change test to .tsx
* change testing description on docs
* added interface to button story
* added build phase and update test phase
* restore build in ci
* added storyshots (automate testing) to Storybook
* simplify and update codeclimate-action
* restore workable version of codeclimate-action
* test unified test action for CI
* Revert "test unified test action for CI"
This reverts commit 039cbf3485.
* test documented solutions for CI
* fix error on coverage CI
* added codeCoverage on jest setup
* upload coverage report from jest
* added download artifact to coverage CI
* added upload artifact to coverage CI
* remove collectCoverageFrom
* moved test step on CI
* remove coverageLocations to allow default
* load Ocean typography into storybook
* skip all PRs coming from dependabot
* improve docs (Storybook)
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
* Showing loader on the edit formm until everything has loaded
* Changing logic so that loader is the fallback
* Making sure account Ids are in lowercase when comparing them
* Fix crash when no account is connected
* display generic message
* add helper message
* bold text in json, remove unused css file
* fixes
* different help message displayed as tooltip
* tooltip help not displayed for files/links fields on publish
* conditionally hide/show tooltip
* use same mechanism for edit form
* add prominentHelp file into content pages
* type fix
* remove unused code
* error message position fix
* error doesn't overlap help message
* show validation error message fix
Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
* restore button if there's not pool data
* restore order for fixed pricing and download button after purchase
* minor fixes
- avoid errors when providerFee is null
- fix disabled download/buy button when user is on different network as asset's
* added improvements
* added step route to publish
* moved hooks to navigation
* handle back history and load on refresh
* clean up
* changed to nested routes in publish
* fix warning code climate (similar blocks)
* fix header publish link
* moved scrollIntoView() after routing change
* fix `Type 'string[]' is not assignable to type 'string'.` error
* Revert "fix header publish link"
This reverts commit 82e00398c0.
* serverside redirect from `/publish`
* client side redirect from `/publish`
* fix issue with redirect on publish
- remove index publish (redirect taken care server side)
- change link in menu to step 1
- refactor router push on navigation
* simplify handleStepClick function
* Moving isSupportedOceanNetwork to Web3 context
* Removing page title and replacing it with a warning message
* Creating Error state in title for the wrong network
* Creating UnsupportedNetwrok component
* Adding different networks into tooltip
* Adding button + styling
* Adding change netwrok function
* Adding Change Network tooltip to submit page
* Reducing code duplication
* Removing unnecessary changes
* Fixing logic for checking which chainIds are supported
* Simplifying isSupportedOceanNetwork check logic
* Default to not showing unsupported network message when no wallet is connected
* Always showing available networks in tooltip
* Adding info icon to action button
* adding padding to AvailableNetworks component
* Changing label to list components
* Changing brand-white to currentColor
* Revert "Changing brand-white to currentColor"
This reverts commit 278f0d4ab9.
* CHanging --brand-white to currentColor
* Info Icon in currentColor
* Changing NetworkOptions component name to Network
* Simplifying tooltip logic in title
* Removing unused classname
* Fixing repeating <ul> issue
* Removing unused class
* Refactoring AvailableNetworks component into src/components/Publish
* Moving tooltip message into content/publish/index.json
* Reducing duplication in css
* Removing duplication of infoIcon css styles
* Tidying up logic in setIsSupportedOceanNetwork useEffect
* Updating setIsSupportedOceanNetwork effect dependancies
* merge fixes for new MarketMetadata context
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
* update ocean amount on price change
* add min ocean amount requirement
* add min ocean value when price is not grater than 0
* review fixes
* use min ocean and dataToken amounts from initialValues
* removed weightOnDataToken from useEffect and updated comments
* fix amountOcean bug
* remove min attribute from Coin, move logic to yup validation
* remove unused imports and change min amountOcean test name
* default amountDataToken from 50 → 100
* ref #1340
* change min datatoken and ocean amount to 100
* update ocean amount min validation and validation message
* replace data tokens with datatokens in min ocean amount message
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
* exit when user rejects the transaction
* if the message is too long, return generic label
* in the case (should not happen) the message is longer than one row, then show ellipsis
* reorder UI
* refactor with new PoolSection component
* move all the things
* layout tweaks
* fix pool data without wallet
* fix undefined user pool share
* fix max remove calculation
* make conversion use our decimals definition
- send along `transferable` param when creating NFT
- new optional `transferable` param in our `generateNftCreateData()` helper, default to `true`. So we don't need to bother adding this to the publish tx fee component
- capture new key in form data, `metadata.transferable`, set to `true` by default. This prepares this to be added as a UI option later on
* remove multiplier from totalLiquidityInOcean
* Revert "remove multiplier from totalLiquidityInOcean"
This reverts commit e6b5cc15d6.
* restore totalLiquidityInOcean calculation
* getting user / owner liquidity from calcSingleOutGivenPoolIn + some clean up
* removed web3 hook in favor of dummyWeb3 connection
* remove calc on user liquidity (YVL)
* get format price
* added price format fix, removed logs
* remove all commas from the price string
* space fixes
* fix
* fix locale in graph, undo price fix
Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
Co-authored-by: mihaisc <mihai@oceanprotocol.com>
* check file url
* logic fix
* display error message
* use x mark sign
* change border and background color for wrong input
* invalid input red border
* make error visible only for touched field
Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
* fix loading
* fix cancel acction and some cleanups
* style typo
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
* fix title and replace router with link
* add proper loading to edit components
* add page title
* add more top spacing to form description
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
* moved Error (field) component in shared components
- moved Error.tsx from Pricing
- change paths to Error.tsx in publish
* added Error component with field validation
* change setTimeout with lodash.debounce
* feat: add decodeTokenUri helper
* refactor: restructure of MetaMain component
* feat: add nft tooltip
* feat: add opensea link for nfts
* style: adjust nft image size in tooltip
* feat: add nft data to publish preview
* fix: readd owner to nft metadata
* refactor: conditional display of nft tooltip
* style: fix link styles in nft tooltip
* feat: add placeholder graphic as fallback if nft data does not contain one
* fix: display openSea link only on supported networks
* fix: rename ddo props to asset in metamain related components
* feat: add original publisher to asset details
* chore: remove unused imports
* fix: remove unused prop
* feat: convert publisher address to checksum address
* chore: remove console.error when decoding tokenURI
* Revert "chore: remove console.error when decoding tokenURI"
This reverts commit f387175970.
* feat: shorten nft address in tooltip preview
* fix: use Web3.utils instead of the actual web3 instance to convert wei in ether
Co-authored-by: Luca Milanese <luca.milanese90@gmail.com>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
* feat: set NFT metadata and tokenURI in a single transaction
* feat: move token uri encoding in second publish transaction
* feat: add final asset did in tokenURI
* fix: edit metadata and computeDataset submit functions
* feat: extract decodeTokenURI function
* fix: revert to previous metadata edit flow
* fix: revert to generateNftCreateData
* feat: add final asset link in tokenURI description
* fix set access inside publish form
* added initial value for service access to fix continue button disabled
* removed compute environment options field
* removed compute options from form.json
* update access and algorithmPrivacy fields based on asset type
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
* get tokens balance wip
* use ButtonBuy component
* collect and sum base tokens
* delete logs, get tx
* center button
* feedback and loader added
* query by exchangeId
* fixes
* correct token symbol, set balance to 0 after collect
Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
* use fixed and pool swap fees from app config inside publish form price
* get opc fees from subgraph
* fixed undefined opcFees
* fixed get opc fees query
* removed logs, unused imports and added types
* remove unused import
* fetch opc fees from wallet network
* use fallback chainId and add chainId to dependencies array
* get app config from site metadata
* fixed getOpcFees typo
* changed community fee field value
* show results
* sales number displayed correctly
* get downloads
* use totalSales parameter
* fixes
* sum sales fix
Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
* start with a good refactor
* split up into multiple files
* split up data fetching and manipulation into multiple effects
* adapt for new subgraph
* bookmarks error fixes
* make numbers show up when a subgraph is down
* use testnets, make numbers show up
* style fixes
* making sense of existing numbers
* more stats
* use original total OCEAN
* output datatokenCount
* state data structure change for all sum values
* copy
* output networks at all times
* switch to mainnets numbers
* added confirm checkbox and connect logic to wizard
* add 'accessDetails' to displayed asset
* restore initial state
* adding 'freeAgreement' option to constants
* moved checkbox for free item aggreament
* improvement on amountDataToken validation
* change Field component with Input and improve UI
* change `onChange` property with `useField` hook
* switch back to Formik Field
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
* aligned inputs for mobile
* correction for mobile first approch
* change nft layout on publish mobile (metadata section)
* align datatokens view on publish widzard for mobile
* remove unnecessary margin around nft, datatoken UI
* reduce min-width for xs viewports
* fix mobile layout for pricing tab / submit tab on publish