1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-28 08:37:50 +02:00
Commit Graph

1767 Commits

Author SHA1 Message Date
mihaisc
857409d5ad
remove display of dt in setup (#1488)
Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2022-06-07 11:54:10 +03:00
Luca Milanese
e412dc10d6
add v3 assets redirect (#1446)
* feat: add v3 assets redirect

* feat: add fallback return value to checkV3Asset

* fix: rename env variables for v3 related uris
2022-06-06 12:25:09 +02:00
claudiaHash
e9a3513cac
add error message title (#1473)
Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
2022-06-02 16:44:09 +03:00
Jamie Hewitt
ea897c8e7a
Fix edit form validation (#1371)
* Fixing logic for showing error messages

* Removing unused code

* Refactoring

* fixing sample file validation

* Removing console logs

* Minor formatting
2022-05-31 11:18:10 +01:00
claudiaHash
d53ea3f187
remove unnecessary text replacement (#1448)
Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
2022-05-23 17:47:43 +03:00
EnzoVezzaro
cb051f726b
Merge pull request #1449 from oceanprotocol/v4-codeclimate-badge
fix test coverage badge
2022-05-23 08:36:11 -04:00
f0967de973
fix test coverage badge 2022-05-23 13:06:49 +01:00
claudiaHash
6d2dea8c9d
Atomic components stories (#1422) 2022-05-23 12:29:37 +01:00
9027fc1307
More codeclimate excludes (#1433)
* more codeclimate excludes

* increase similar-code & identical-code thresholds
2022-05-23 14:25:03 +03:00
Bogdan Fazakas
f0b22ee8e4
fix forever timeout for assets (#1445) 2022-05-19 17:48:13 +01:00
mihaisc
bf31cdfed5
Various fixes (#1441)
* fixes

* more fixes
2022-05-18 17:25:44 +01:00
mihaisc
4b6baa9cd5
Update contracts and math (#1436)
* update contracts and math

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* change fee name

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* bump to ocean.js v1.0.0-next.44

* rename consumeFee to orderFee

* prevent variable naming clash

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
Co-authored-by: Bogdan Fazakas <bogdan.fazakas@gmail.com>
2022-05-18 14:38:08 +01:00
EnzoVezzaro
593039f894
Fix svgr in storybook & jest (#1428)
* fix svg loader

* added Logo component to be able to test storybook

* added svg mock for svgr as suggested (still not working)

* package cleanup

* make svg moduleNameMapper match first

* cleanup

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-05-16 17:11:43 +01:00
a5819bac58
subgraph typings generation during coverage run (#1421)
* subgraph typings generation during coverage run

* cache node_modules

* ignore src/@types/ for coverage
2022-05-16 14:38:48 +01:00
065f5bc711
add custom codeclimate config (#1292)
* add custom codeclimate config

* add exclude_patterns

* tweaks

* tweaks

* remove checks without overwrite

* tweak similar-code & identical-code mass threshold

* threshold tinkering
2022-05-16 14:37:25 +01:00
EnzoVezzaro
29e6636d71
handle poolData shares when empty (#1424)
* handle poolData shares when it's empty

* rm log
2022-05-13 12:48:24 +01:00
5f3ee32ca2
Test setup tweaks (#1415)
* unused package cleanup

* make storybook use webpack 5

* see https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#webpack-5

* bump react, cleanup

* button story tweaks

* add Alert stories

* bump Jest to v28.1.0

* try original storyshots initialization

* split up build & test CI jobs

* stop testing Node.js v14

* set jest coverage flag

* downgrade paambaati/codeclimate-action again

* move  jest config files, remove coverageReporter override

* collect coverage from `src/` only

* another paambaati/codeclimate-action bump test

* create additional button markup test

* downgrade paambaati/codeclimate-action again

* more downgrade

* render default button without optional style prop

* ignore some folders for Jest

* full coverage for Alert

* more package updates

* add eslint-plugin-testing-library & eslint-plugin-jest-dom

* bump ESLint packages, follow new rules

* start storybook in quiet mode

* update docs

* test storybook build as part of CI

* more testing docs clarification

* add jest:watch command

* add body background colors switch in toolbar

* TypeScript voodoo

* test codeclimate-action@v2.7.3 for default coverageCommand

* downgrade codeclimate-action and running in debug mode

* make coverage artifacts OS agnostic

* subgraph typings as artifact for coverage job

* disable coverage sending job for now

Co-authored-by: Enzo Vezzaro <enzo-vezzaro@live.it>
2022-05-12 11:35:07 +01:00
claudiaHash
a2bf3b2a1c
fix community fee displayed value (#1417)
* fix community fee displayed value

* get value fix

* Revert "fix community fee displayed value"

This reverts commit 06258f8904.

* import fix

* naming fix

Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
2022-05-11 18:44:02 +01:00
Jamie Hewitt
8819a66e67
Remove risks warning (#1420)
* Removing risks warning from add liquidity tab

* Removing risks warning from add trade tab

* Removing isWarningAccepted state variable
2022-05-11 13:29:07 +01:00
claudiaHash
e30786c97b
Error placement in publish pricing form (#1419)
* quick fix

* log removed

Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
2022-05-11 13:05:13 +03:00
mihaisc
88b40e5985
fix pool context (#1416)
Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2022-05-10 20:10:16 +01:00
mihaisc
aa54795c2b
add decimals to pool calls (#1393)
* add decimals to pool calls

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix lock

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix ssh

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* update ocean

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* update ocean

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* remove screen fixes

* update lib, contracts

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix package-lock

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-05-10 14:19:41 +03:00
EnzoVezzaro
1fcc3b1356
sanitize urls as code scanning suggestions (#1412)
* sanitize url on DebugEditMetadata as code scanning suggestion

* sanitize urls
2022-05-10 10:11:53 +01:00
EnzoVezzaro
89f2521025
Storybook and unit testing setup (#1354)
* 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>
2022-05-09 14:33:44 +01:00
claudiaHash
6324e85b0f
Incorrect wallet balance on trade tab fix (#1310)
* display the actual base token wallet amount

* delete logs

* balance dt fix

* width changes

* remove last commit changes

* sell values

* balance fix for dt item

* logs and comments removed

* fix max calculations

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* disable inputs on trade actions

* clear inputs after submit and catch tx errors

* fix dep

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fetch reserver from contracts

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix null and tag key

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* label change and cleanup

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
Co-authored-by: Enzo Vezzaro <enzo-vezzaro@live.it>
2022-05-05 15:14:37 +03:00
EnzoVezzaro
1ed3fd8a04
added enableReinitialize to update price value on edit view (#1385) 2022-05-05 12:48:52 +01:00
EnzoVezzaro
23f256b36c
added optional chaining to oceanConfig (#1380) 2022-05-03 11:15:39 +01:00
Jamie Hewitt
4fd310cf6e
Converting accountId and owner to lowercase for the comparison to avoid problems caused by inconsistent cases (#1377)
* 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
2022-05-03 11:42:41 +03:00
mihaisc
2107eab979
Fix order and price (#1375)
* fix loading

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* add order fee

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix opc

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* remove cache from urql

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* update urlq dep

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* update urlq dep

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix lock

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix states

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2022-04-29 21:14:14 +02:00
claudiaHash
97744820ac
Display generic info message for file inputs (#1334)
* 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>
2022-04-28 15:39:46 +02:00
EnzoVezzaro
6ef2082724
restore order for assets with fixed pricing (#1360)
* 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
2022-04-28 13:35:00 +02:00
claudiaHash
b6ad55dda4
price validation fix (#1366)
Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
2022-04-27 21:42:25 +02:00
Jamie Hewitt
8271963292
Making error message more generic (#1368) 2022-04-27 16:28:02 +02:00
Corrie Sloot
88d5179a29
SEO fix (#1359) 2022-04-27 08:55:51 +02:00
ce07740ef8
remove loading feedback during price fetching (#1361) 2022-04-27 08:50:17 +02:00
EnzoVezzaro
6a6f1acd84
add steps back history to publish (#1342)
* 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
2022-04-26 12:09:51 +02:00
d6bc5a2b87
package updates (#1355)
* package updates, ocean.js v1.0.0-next.37

* activate portis components again

* console error fix
2022-04-25 14:50:20 +02:00
e77dcaf60a
fix opcFees before data is present (#1353) 2022-04-22 11:29:37 +02:00
Jamie Hewitt
97e0921e1e
Unsupported Network Tooltip (#1331)
* 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>
2022-04-22 02:54:04 +02:00
mihaisc
d1e21b7f03
Various fixes in the pool component (#1327)
* remove legacy check to prevent rug pull

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* various fixes

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* remove old prop

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* remove old prop

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* add expected output to remove

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* remove console.logs

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix max calculations

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* refactors

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* temp fixes for build

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fixes

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* local calc for pice and liquidity

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* remove var

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix profile liquidity

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* global context, opc fee

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* comment

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* various fixes

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* refactor global context

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* remove nesting from market context

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix build

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix undefined appConfig

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* direct import of appConfig & siteContent

* this never changes on run time, so we should never have to wait for it and have it in js bundle at all times
* in utility methods, import directly
* for components, import directly in MarketMetadata context  and pass through

* remove screen CSS fixes

* put back auto-fetching indicator, move manual refresh action behind debug

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-04-22 02:38:35 +02:00
claudiaHash
986fd37d3e
Sample file validation in edit form fix (#1351)
* fix missing asset provider

* comment removed

Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
2022-04-18 14:39:23 +03:00
967b869b02
Move auto-changing providerUrl (#1256)
* move auto-changing providerUrl

* remove comments

* new custom provider → change network interaction

* more interaction tweaks for custom provider → change network case

* fix adding custom provider

* add provider chainId check

* initialValues from form context

* user chainId fallback
2022-04-15 14:28:45 +01:00
claudiaHash
cc0da26740
max param for description length (#1349)
Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
2022-04-15 15:33:51 +03:00
mihaisc
e4a8c0df64
update ocean (#1348)
Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2022-04-14 18:49:12 +03:00
mihaisc
2985e1a45a
update ocean.js (#1346)
Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2022-04-14 15:31:37 +01:00
Norbi
36a75e6736
Dynamic price publish input fields fixes (#1302)
* 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>
2022-04-14 13:48:56 +01:00
claudiaHash
1256c20904
Trade input accepts decimals with leading 0 (#1294)
* input accepts number with leading 0 decimals

* input fields changes

* value type fix

Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
2022-04-13 18:24:19 +03:00
Jamie Hewitt
9ebddd814d
Improve footer links (#1338)
* Opening external links in a new tab

* Main site links opens in a new tab + adding external link arrow
2022-04-11 16:13:52 +03:00
Jamie Hewitt
274d0d3809
Showing connect wallet button on submit page when no wallet is connected (#1329)
* Showing connect wallet button on submit page when no wallet is connected

* Fixing connect button when form hasn't been filled out
2022-04-08 13:05:06 +01:00
EnzoVezzaro
4bd9dddf3b
show proper errors on submit publish (#1105)
* 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
2022-04-07 11:10:36 +01:00