1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-17 18:03:26 +02:00
Commit Graph

65 Commits

Author SHA1 Message Date
Moritz Kirstein
fefb42aa07
Feat: Consumer Parameters (#1921)
* feat: add consumer parameters to publish

* fix: publish form validation

* feat: update consumer parameters form

* feat: add consumer parameter types

* feat: update consumer parameter validation

* feat: add consumer parameters structure

* feat: add InputOptions error handling

* feat: update consumer parameters validation

* feat: update transformPublishFromToDdo

* feat: add default options to parameter options

* fix: value handling for select and mutliselect

* feat: update "add new parameter" button label

* feat: remove unused publish form sections

* chore: remove console.log

* chore: remove comments

* feat: remove multiselect

* feat: add consumer parameters section label

* feat: update types

* feat: update edit form fields

* feat: parse consumer parameters in edit form

* feat: add consumer parameters field to edit

* feat: transform consumer parameters values before edit

* feat: update "required" type to select

* feat: update "required" type to select on edit form

* fix: error object access

* fix: edit flow crash

* fix: validation when consumer parameters are not selected

* feat: update validation for default consumer parameters value

* fix: types

* feat: add service consumer parameters to publish form

* chore: remove console.log

* feat: add service consumer parameters edit

* chore: remove comments

* fix: form edit metadata types

* feat: add consume algo parameter structure

* feat: consumer parameter required default value condition

* feat: add consumer parameter groups to assetActions

* fix: consumer parameters grouping

* feat: update consumer parameters alignment

* feat: update types

* feat: allow service consumer parameters on dataset asset type

* feat: add consumer parameters to ddo updated values in edit form

* feat: add "data service" consumer parameters to consumption form

* feat: allow service parameters on all asset types

* feat: update parameter consume form design

* feat: update asset actions consume parameters location

* feat: add service parameters to download assets

* refactor: consumer parameters actions

* refactor: form action name

* refactor: consumer parameters default input

* refactor: consumer parameters select input

* refactor: consumer parameter input

* fix: props name

* refactor: variable naming

* refactor: consumer parameters form validation

* refactor: rename consumer parameters types

* refactor: extract consumer parameters form data to separate file

* refactor: rename type

* feat: controlled tabs for consumer params

* feat: restore default value as required

* refactor: parse values before edit

* feat: add form to handle consumer parameters consumption

* feat: send consumer params with download request

* feat: send consumer params with compute request

* feat: handle compute form initialization

* chore: remove unused dependency

* feat: handle download form data initialization

* chore: remove console.log

* feat: update types

* fix: consumer parameter value types

* feat: update ConsumerParameter type

* feat: update ConsumerParameter type

* chore: add comments

* refactor: consumer parameters inputs

* refactor: rename data and algo service params

* refactor: consumer parameters form

* refactor: consumer parameter form styling

* refactor: make headers input reusable as KeyValueInput

* refactor: refactorings, reduce duplication (WIP)

* refactor: usercustomparameters consumption form creation/validation

* refactor: return undefined consistently if property path not found on object

* refactor: reuse fieldType and fieldOptions in DefaultInput

* fix: parse ddo consumer parameters for edit form

* fix: asset view crash for assets w/o consumer params

* fix: publish preview for assets with no consumer params

* fix: revert accidential rename of algoService

* fix: revert publish navigation padding change

* feat: update consumer parameters' labels and helpers

* fix: consumer parameters validation

* feat: update consumer parameter helper wording

* chore: merge conflicts

* feat: update types

* fix: validate form on consumer parameter deletion

* feat: add key value input placeholder props

* fix: handle boolean type consumer parameters in consume form (#38)

* Update src/components/Publish/_validation.ts

Co-authored-by: Jamie Hewitt <jamie.hewitt15@gmail.com>

* Update src/components/Asset/AssetActions/ConsumerParameters/FormConsumerParameters.module.css

Co-authored-by: Jamie Hewitt <jamie.hewitt15@gmail.com>

* Update src/components/Asset/Edit/_validation.ts

Co-authored-by: Jamie Hewitt <jamie.hewitt15@gmail.com>

* Update src/components/Asset/AssetActions/ConsumerParameters/index.tsx

Co-authored-by: Jamie Hewitt <jamie.hewitt15@gmail.com>

* Update src/components/Asset/AssetActions/ConsumerParameters/FormConsumerParameters.tsx

Co-authored-by: Jamie Hewitt <jamie.hewitt15@gmail.com>

* Update src/components/@shared/FormInput/index.tsx

Co-authored-by: Jamie Hewitt <jamie.hewitt15@gmail.com>

* Update src/components/@shared/FormInput/InputElement/ConsumerParameters/index.tsx

Co-authored-by: Jamie Hewitt <jamie.hewitt15@gmail.com>

* Update src/components/@shared/FormInput/InputElement/ConsumerParameters/index.tsx

Co-authored-by: Jamie Hewitt <jamie.hewitt15@gmail.com>

* Update src/components/@shared/FormInput/InputElement/ConsumerParameters/OptionsInput.tsx

Co-authored-by: Jamie Hewitt <jamie.hewitt15@gmail.com>

* Update src/components/@shared/FormInput/InputElement/ConsumerParameters/FormActions.tsx

Co-authored-by: Jamie Hewitt <jamie.hewitt15@gmail.com>

* Update src/@utils/provider.ts

Co-authored-by: Jamie Hewitt <jamie.hewitt15@gmail.com>

* fix: import paths

* refactor: add consumer parameters validation types

* feat: add string length min/max to consumer parameters validation

* feat: add cp description to consume form

* feat: reduce character limit in CP tab title

* feat: update CP fields' placeholders and helpers

* fix: show only relevant CPs in asset actions

---------

Co-authored-by: Luca Milanese <luca.milanese90@gmail.com>
Co-authored-by: Jamie Hewitt <jamie.hewitt15@gmail.com>
2023-09-07 17:14:27 +03:00
EnzoVezzaro
99090ee058
fix barge connection (#1729)
* adding network 8896 (barge)

* Update ocean.ts

* development network with env variable

* temp patch for provider  url check

* removed logs

* fix typing error

* set local provider url to asset metadata

* clean development config

* wip make use of barge addresses

* update env vars from script

* more fixes

* cleanup

* update readme

* more readme updates

* cleanup fixes

* more fixes

* script readme updates

* update readme

* update readme

* bump oceanjs

* fix tests after oceanjs upgrade

* adding custom provider for mac barge

* fix test app.config path

* remove log

* added NEXT_PUBLIC_PROVIDER_URL to load dev env

* added env variable for mac on load dev env

* fre fixes

* review suggestions

* Update README.md

Co-authored-by: Jamie Hewitt <jamie@oceanprotocol.com>

* add private key example

* bump oceanlib

* fix build

* fix provider uri for mac

* add custom rpc env var example

* fix build

* update barge env vars script

* remove brage from supported and default chainIds by default

* remove log

---------

Co-authored-by: Bogdan Fazakas <bogdan.fazakas@gmail.com>
Co-authored-by: Jamie Hewitt <jamie@oceanprotocol.com>
2023-07-17 23:42:32 +03:00
Bogdan Fazakas
165a9b0fb3
Feature/wagmi (#1912)
* wagmi + ethers + web3modal setup

* refactor wallet components

* fallback providers, more config

* kick out useWeb3

* remove all useWeb3 imports

* more web3.js usage removal

* isAddress utils replacement

* restore add token / add network

* less accountId changes

* web3 legacy tinkering, utils/web3 → utils/wallet

* legacy web3 object for ocean.js

* graph sync fix, remove custom network switching code

* package updates, merge fixes

* downgrade to ethers v5

* fix project id

* switch to ConnectKit

* connectkit theming

* add existing chains to wagmi

* rewrite getPaymentCollector()

* kick out getPaymentCollector completely, use wagmi hooks instead

* Revert "kick out getPaymentCollector completely, use wagmi hooks instead"

This reverts commit 54c7d1ef1a.

* switch getPaymentCollector

* calcBaseInGivenDatatokensOut reorg

* wip integrate ocean lib 3.0.0

* update orbis components to use wagmi instead of web hooks

* more oceanjs integration updates

* more refactors

* fix build

* update ocean lib

* fix publish

* fix order fixed rate

* remove logs

* debug and stop infinite cycle orbis connect

* fix orbis dm connection

* mock use network and fix some more tests

* mock wagmi switch network

* mock wagmi  useProvider createClient and connectKit getDefaultClient

* fix jest tests

* try storybook fix

* cleanups and bump ocean lib

* fix order

* bump lib to next.5 and add more modal style

* bump ocean.js lib to 3.0.0

---------

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2023-05-29 13:28:41 +03:00
Bogdan Fazakas
5b4a640476
Provider multichain (#1879)
* prepare for provider multi chain

* use oceanjs pre-release version 2.7.0-next.0

* use oceanjs pre-release version 2.7.0-next.1

* fix isValid provider and isCompatible checks and use oceanjs pre-release version 2.7.0-next.2

* fix build

* fix compute to data environments setting

* fix build

* bump oceanjs lib to 2.7.0
2023-04-03 12:55:42 +03:00
EnzoVezzaro
b6f3bcbe68
graphql and onchain storage support (#1794)
* support storage type publish

* adding storageType to edit form

* add IPFS type

* fix testst and rollback ipfs typing

* update oceanjs lib

* fix Ipfs type

* Update package-lock.json

* added graphql and smartcontract options UI (WIP)

* update package.json

* removed graphql and smartcontracts

* make various fixes for edit and publish with IPFS (missing Arweave)

* removed no-case-declarations lines

* moved ipfs utils

* renamed getFileUrlInfo to getFileInfo

* added is-ipfs to jest mock

* Update package-lock.json

* fix things

* npm is fun

* rename url to file in getFileInfo

* refactor publish form (storage type field)

* fix tab value when changing tabs

* refactoring edit form

* more refactor edit form

* fix edit validation

* fix validation when input is empty on edit form

* fix validation when loading asset in edit form

* change URL to file confirmed

* change messages based on service type

* Update form.json

* fix FileInput tests and added ipfs / arweave tests

* removed unnecessary comment

* Update index.tsx

* adding graphql / onchain to fieldInput

* merged main and fix storages (WIP)

* restore graphql / smart contract

* added headers to graphql and connect fields

* fix tests temp

* fix publish preview file object

* added codemirror component and change layout

* added codemirror to edit and normalizing ddo debug preview

* added codemirror to edit form

* fix typing issues

* style and logic changes to codemirror component

* fix test (temp fix)

* Avoiding getInitialPaymentCollector failure (#1816)

* early return is no web3 or ddo

* Creating test for MetaFull

* adding test: src/components/Asset/AssetContent/MetaSecondary.test.tsx

* Adding test for bookmarks

* Adding test for displaying payment collector

* Removing comments

* Renaming assetAquarius

* Renaming assetWithAccessDetails

* Ensuring that the payment collector is shown even without a wallet connected

* Removing broken test

* Using getDummyWeb3 for fetching the payment collector address

* WIP

* update ocean lib

* parse abi obj on publish

* fix previewDebugPatch function

* Update package-lock.json

* remove logs

* fix build error

* fix stupid typo

* upgrade codemirror

* simplify checkJson function

* fix preview json display

* validate json on sm storage

* cleanup

* fix edit validation

* fix initial state tabs storage type

* remove logs

* fix text headers

* google validation (#1835)

* Updating validation to exclude any google link

* Updating Yup validation

* Checking if domain includes google.com

* Updating isGoogleUrl function

* Moving isGoogleUrl into @utils/url/index file

* isGoogleUrl function

* Updating tests

* Adding additional tests for other google domains

* Updating tests

* Updating isGoogleUrl file path

* upgrade ocean lib

* cleanup

* edit mode fixes

* added tests for graphql and sm

* Updating pricing message (#1842)

* Bump @storybook/addon-essentials from 6.5.13 to 6.5.15 (#1841)

Bumps [@storybook/addon-essentials](https://github.com/storybookjs/storybook/tree/HEAD/addons/essentials) from 6.5.13 to 6.5.15.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v6.5.15/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.5.15/addons/essentials)

---
updated-dependencies:
- dependency-name: "@storybook/addon-essentials"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/jest from 29.2.3 to 29.2.5 (#1840)

Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 29.2.3 to 29.2.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump prettier from 2.8.0 to 2.8.1 (#1837)

Bumps [prettier](https://github.com/prettier/prettier) from 2.8.0 to 2.8.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.0...2.8.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump react-select from 5.6.1 to 5.7.0 (#1839)

Bumps [react-select](https://github.com/JedWatson/react-select) from 5.6.1 to 5.7.0.
- [Release notes](https://github.com/JedWatson/react-select/releases)
- [Changelog](https://github.com/JedWatson/react-select/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/JedWatson/react-select/compare/react-select@5.6.1...react-select@5.7.0)

---
updated-dependencies:
- dependency-name: react-select
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump react-tabs from 5.1.0 to 6.0.0 (#1838)

Bumps [react-tabs](https://github.com/reactjs/react-tabs) from 5.1.0 to 6.0.0.
- [Release notes](https://github.com/reactjs/react-tabs/releases)
- [Commits](https://github.com/reactjs/react-tabs/compare/v5.1.0...v6.0.0)

---
updated-dependencies:
- dependency-name: react-tabs
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix asset route (#1836)

* updating the buy button message for free assets

* Updating pricing text for compute and algorithms

* Updating tests

* Adding a seperate sentence about paying gas fees for network charges with free assets

* Fixing tests

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* Showing hosting type in File Info (#1846)

* Bump @storybook/addon-essentials from 6.5.13 to 6.5.15 (#1841)

Bumps [@storybook/addon-essentials](https://github.com/storybookjs/storybook/tree/HEAD/addons/essentials) from 6.5.13 to 6.5.15.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v6.5.15/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v6.5.15/addons/essentials)

---
updated-dependencies:
- dependency-name: "@storybook/addon-essentials"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/jest from 29.2.3 to 29.2.5 (#1840)

Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 29.2.3 to 29.2.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump prettier from 2.8.0 to 2.8.1 (#1837)

Bumps [prettier](https://github.com/prettier/prettier) from 2.8.0 to 2.8.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.0...2.8.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump react-select from 5.6.1 to 5.7.0 (#1839)

Bumps [react-select](https://github.com/JedWatson/react-select) from 5.6.1 to 5.7.0.
- [Release notes](https://github.com/JedWatson/react-select/releases)
- [Changelog](https://github.com/JedWatson/react-select/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/JedWatson/react-select/compare/react-select@5.6.1...react-select@5.7.0)

---
updated-dependencies:
- dependency-name: react-select
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump react-tabs from 5.1.0 to 6.0.0 (#1838)

Bumps [react-tabs](https://github.com/reactjs/react-tabs) from 5.1.0 to 6.0.0.
- [Release notes](https://github.com/reactjs/react-tabs/releases)
- [Commits](https://github.com/reactjs/react-tabs/compare/v5.1.0...v6.0.0)

---
updated-dependencies:
- dependency-name: react-tabs
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix asset route (#1836)

* Adding hosting type to the file info component

* Writting smart contract hosting type across two lines

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* add initial price value for not supported price assets (#1851)

* Fix compute basetoken issue (#1829)

* fix lint

* add dynamic provider fees

* fixes

* cleanup and more fixes

* bump oceanlib to 2.6.0

* fix 404 styling (#1850)

* cleanup and remove logs

* fix smart contract check

* restore headers

* removed unnecessary message

* fix error SM with headers

* added headers as object to normalize file

* fix input error in url file

* adding methods to url storage type

* test pipeline (now it's stuck)

* cleanup

* fix MethodInput test

* fix arweave fileObj

* Update index.tsx

* fix provider url in form test

* fixing test errors

* fix test

* fix help labels

* cleanup leftovers

* cleanup dependencies codemirror

* remove any from normalizeFile

* edit comment

* remove any from oceanTheme

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
Co-authored-by: Jamie Hewitt <jamie@oceanprotocol.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
Co-authored-by: Jamie Hewitt <jamie.hewitt15@gmail.com>
Co-authored-by: Bogdan Fazakas <bogdan.fazakas@gmail.com>
2023-03-06 12:32:32 +02:00
EnzoVezzaro
f6d11e5e6f
adding ipfs / arweave support (#1765)
* support storage type publish

* adding storageType to edit form

* add IPFS type

* fix testst and rollback ipfs typing

* update oceanjs lib

* fix Ipfs type

* Update package-lock.json

* added graphql and smartcontract options UI (WIP)

* update package.json

* removed graphql and smartcontracts

* make various fixes for edit and publish with IPFS (missing Arweave)

* removed no-case-declarations lines

* moved ipfs utils

* renamed getFileUrlInfo to getFileInfo

* added is-ipfs to jest mock

* Update package-lock.json

* fix things

* npm is fun

* rename url to file in getFileInfo

* refactor publish form (storage type field)

* fix tab value when changing tabs

* refactoring edit form

* more refactor edit form

* fix edit validation

* fix validation when input is empty on edit form

* fix validation when loading asset in edit form

* change URL to file confirmed

* change messages based on service type

* Update form.json

* fix FileInput tests and added ipfs / arweave tests

* removed unnecessary comment

* Update index.tsx

* cleanup logic

* update @oceanprotocol/lib

* Update package-lock.json

* fix test error

* fix test assetsWithAccessDetails

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-11-25 15:07:55 +01:00
mihaisc
131f1f15e3
Change datatoken template and ensure compatibility with both (#1728)
* change template

* fix build

* add template config

* test fixes

* Update app.config.js

Co-authored-by: Alex Coseru <alex.coseru@gmail.com>

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
Co-authored-by: Alex Coseru <alex.coseru@gmail.com>
2022-11-15 16:35:26 +02:00
mihaisc
b505bddb4b Merge branch 'main' into feature/enforce-docker-containers 2022-10-07 12:17:41 +03:00
Luca Milanese
52eaee0ad5
Feat: autocomplete tags functionality (#1471)
* feat: add autocomplete tag component

* feat: pass tags aggregated list to autocomplete component

* feat: add initial styling to autocomplete tag component

* fix: autocomplete style types

* feat: move styling elements to module.css file

* feat: update placeholder text for tag input field

* feat: add default value to tags if present

* feat: add edit tags functionality

* fix: default tag value

* fix: style for automplete menu's keyboard navigation

* fix: tags aggregation query size

* feat: return sorted tags aggregated list suggestion in publish

* fix: set tags value touched state in edit mode

* add package back

* enhancement: autocomplete tag component config (#1679)

* fix publishing when connecting wallet on publish form

* fix reset pricing on tx execution

* removed changing steps

* cleanup

* Fix headers (#1663)

* test

* test

* test

* test

* test

* test

* test

* remove link

* enhancement: tag autocomplete settings

* feat: add cursor type text

* feat: tweak filter and sort for matched tags

* fix: tags input font color

* fix: tag autocomplete component input color

Co-authored-by: EnzoVezzaro <enzo-vezzaro@live.it>
Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
Co-authored-by: Ana <84312885+AnaLoznianu@users.noreply.github.com>

* fix lock

* test

* fix

* fix

* minor fixes

* fix cursor on remove item (x)

* style updates

* UX tweaks

* start suggestions upon first key stroke
* remove redundant help tooltip
* change placeholder copy
* remove input clear action

* edit updates

Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
Co-authored-by: EnzoVezzaro <enzo-vezzaro@live.it>
Co-authored-by: Ana <84312885+AnaLoznianu@users.noreply.github.com>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-10-05 15:40:00 +01:00
Bogdan Fazakas
cc47e48b4d add more error handlers 2022-09-28 15:47:43 +03:00
Bogdan Fazakas
afbc42068c fix repetitive requests 2022-09-28 15:10:01 +03:00
Bogdan Fazakas
2ac422f175 more ui touches 2022-09-20 17:32:55 +03:00
Bogdan Fazakas
fe4aa79ffb fix default images 2022-09-20 11:30:11 +03:00
EnzoVezzaro
4dca7d3442
update market to ocean.js@2.0.2 (#1661)
* update ocean js

* refactoring ocean.js 2.0.0

* removed deleted method

* added type in publish utils

* fix FixedRateExchange parameters

* use 2.0.0 lib version

* remove cast on approveWei and fix algo asset selection list issue

* bump oceanlib to 2.0.1

* bump oceanlib to 2.0.2

Co-authored-by: Bogdan Fazakas <bogdan.fazakas@gmail.com>
2022-09-13 12:19:56 +03:00
Luca Milanese
52ad877b13
Dynamic token list support for publishing (#1516)
* feat: add approved tokens list query to subgraph

* feat: add base token selector

* feat: add placeholder tooltip message for base token

* feat: use user selected base token for publish

* fix: publish constants

* feat: update base token query to include digits and symbol

* feat: display correct token name and symbol in publish pricing tab

* fix: publish preview token name

* fix: query type

* feat: add balance fetch for all approved tokens

* fix: balance check for dynamic price with alternative base tokens

* feat: update balance to show baseToken instead of ocean

* fix: default baseToken in publish form

* feat: update text content for pricing publish step

* chore: update ocean.js

* add decimals to token

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

* fix dt decimals

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

* update ocean.js

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

* fix: show correct basetoken symbol under button buy

* refactor: move baseToken selector to input label [WIP]

* refactor: preserve baseToken value value when switching tabs

* remove basetoken tooltip from content json

* fix: price props

* refactor: remove BaseToken component

* fix: baseToken name on first load

* fix: baseToken display name in dynamic price

* fix: conversion tooltip text

* fix: error box overlapping in Coin component

* feat: add token logo component

* feat: add basetoken logo to asset actions pool

* fix: token images size

* fix: add default appproved token list when disconnected or chainId not supported

* fix: datatoken logo on asset details meta

* refactor: balance fetch + move approved base tokens list in web3 provider

* feat: update all datatokens to display ocean logo in violet

* fix: show correct logos on polygon

* fix wallet, remove dynamic

* fix build

* fix: reset baseToken on chainId change during publish

* fix: price tabs selection indicator

* feat: set the ocean token as default in pricing

* add baseToken

* fix price

* remove firstPrice

* cleanup, more affordance for token dropdown

Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-08-03 13:48:57 +01:00
EnzoVezzaro
eb29c4ce3b
Remove AMM Pools (#1614) 2022-08-02 10:53:22 +01:00
EnzoVezzaro
7788086bcc
removed dynamic price on publish, liquidity button and trade tab (#1593)
* removed dynamic price on publish, liquidity button and trade tab

* change label remove button

* removed dynamic pricing model references

* revert useEffects on pricing publish

* removed more references to dynamic pricing
2022-07-12 19:52:45 +03:00
02beb0f8c3
Edit screen fixes (#1546)
* edit refactors

* fix logic around `publisherTrustedAlgorithms`

* typing fix

* copy & typos

* conditionally add compute tab to edit screen

* more logic fixes

* fix various app crashes because of Debug component
* semi-deal with publisherTrustedAlgorithmPublishers

* more fixes, bound submit button to touched state
2022-06-27 10:15:45 +01:00
Bogdan Fazakas
5387b9a3dd
Restore compute functionality (#1069)
* add balance check and check is consumable

* add isOrderable and other helpers

* finish start compute job

* removed unused methods

* add more comments

* add pool logic for order

* move asset selection to compute helper

* small fix

* fixed get algo list

* refactor start compute job and more fixes

* update order params

* use compute env and compute consumer address

* fix prices

* fix algorithms selection list on allowAllPublisher case

* fix edit compute settings

* update compute resources valid until logic

* fixes and cleanups

* wip compute jobs

* fix compute timeout value

* fixed compute jobs logic

* fix algo selection list name

* fixed compute jobs from profile loading

* update start compute flow messages

* update set algo access details

* update compute message logic

* added logs

* update package lock

* remove logs

* fix edit compute checksums for files and container

* Fix compute dataset algorithm list (#1194)

* fix query

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

* remove comment

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

* Fix previous order tx (#1197)

* rename nft update query

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

* fix previous order

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

* fix build

* handle order price, NaN and default 0

* optional value for all fee, prevent breaking when no value

* fix aquarius call and added logs

* update provider compute status call

* remove percentage fee from price sum, depends smart contract calculation (#1249)

Co-authored-by: Soon Huat <soon_huat.phan@daimler.com>

* fix display of compute datasets with free price

* removed to lowerCase on eth address

* fix compute jobs section and your jobs

* bumo ocean lib to 1.0.0-next.32

* c2d show price with fee, exclude provider fee

* wip get results

* include loading when calculating data + algo price, tooltip show order price

* update get compute url and use oceanjs helper for download

* update computeStatus signature to fix build and CI

* added logs

* refactor setting price and fees for assets

* update compute details and compute results UI and style

* update flex value

* update download buttons style

* update download buttons text

* bump ocean lib version and lint fixes

* get provier uri for compute results based on job input did

* use zero adress for price and fees order

* some fixes

* Add reuse order in start compute flow  (#1352)

* wip add reuse order logic

* add reuse order in start job

* added missing check if no jobs found

* update lib

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

* fix lint

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

Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix fixed rate

* fix build

* fix your compute jobs section when asset network not selected

* disable edit compute settings for algorithms

* fix compute jobs infinite loading when no jobs found

* fix compute form

* show token symbol for free assets also on compute price output

* removed swp file

* some decimal fixes

* partial fix for asset with pool fees, algo not working yet

* more decimal fixes

* fix algo with pool price and fees fetching

* fix selecting algorithms when on different network

* fix compute jobs table auto refresh and details  modal closing

* wip compute initialize

* order fixes

* fix lint

* fix conditions and cleanups

* fix compute status text display

* init prices and fees after starting a compute job

* start/order button tweaks

* kick in loader earlier

* update compute status feedback messages

* fixed initial price

* compute jobs refetch and reuse order

* remove logs

* removed logs and added some explanations

* use compute env max duration value in seconds

* error handling on intializeCompute and order

* removed console logs and added one new check

* use optional on initialized provider check

* remove toast from provider helper

* fix compute env issue on start order

* disable job selection during actions execution

* temporary fix publish algo with custom docker image

* fix provider fee display

* remove unnecessary condition

* fix alignment based button on action type (#1491)

* fix alignment based on action type

* moving to CSS modules

* send providerFeeAmount as string

* remove cast on providerFeeAmount

* removed some logs and added few comments

* update price output tooltip and total price logic

* set providerFee amount only when avaialable

* bump oceanlib to 1.1.2

* replace FIleMetadata to fix build

* used approveWei for approving provider fees

* fix free algo price selection and display

* fix provider fee load at first algo selection

* update compute help text

* fix provider fee approve for free assets

* cleanup

* remove commented out code
* remove unused state
* removed unused imports
* typos in comments, variables, props

* more typos

* shorten getAccessDetailsFromTokenPrice() a bit

* state & hooks access reordering

* Update src/@utils/ddo.ts

remove metadata from service type

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>

* effect dependency fixes

* state renaming

* effect dependency fixes

* compute jobs profile visual fixes

* effect dependency fixes

* more comments removal

* add accountId as a dependency in effect

* move isOwner to asset provider

* refactor handleComputeOrder for less complexity and more useful error reporting

* more proper error throwing

* provider fee statement tweak

* more obvious edit action

* empty array for `publisherTrustedAlgorithms` & `publisherTrustedAlgorithmPublishers` by default

* ref #1538
* ref #1539

* don t use initial tx values as valid order use subgraph value

* fix algo list fetching

* closes #1537
* addresses #1538

* fix disable compute button if algo is consumable

* move isOwner check to single effect

* Correctly display trusted algorithms in compute asset (#1541)

* fix allowed algo

* fix trusted algo filter

Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
Co-authored-by: Soon Huat <soon_huat.phan@daimler.com>
Co-authored-by: Soon Huat <soonhuat.phan@hotmail.com>
Co-authored-by: Enzo Vezzaro <enzo-vezzaro@live.it>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
Co-authored-by: mihaisc <mihai@oceanprotocol.com>
2022-06-23 16:53:05 +01:00
mihaisc
a47fb09b91
update publish form with DDO v4.1.0 structure (#1519)
* update publish form

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

* typing quick fix

* fix build

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

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-06-15 17:35: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
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
fc2681231b
fix transferable NFTs (#1309)
- 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
2022-04-04 20:13:39 +01:00
mihaisc
3dd21bd20d
update publish params for new contracts (#1308)
* fix params

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

* fix params

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2022-04-04 18:16:04 +03:00
Bogdan Fazakas
8f93d9bc2f
bump oceanlib to 1.0.0-next.32 (#1282) 2022-03-30 14:06:40 +01:00
Moritz Kirstein
9d1b7794a3
Feat: Display NFT in asset details (#1125)
* 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>
2022-03-16 19:01:51 +00:00
3ea832d270
update compute service options (#1180)
* bump ocean.js to v1.0.0-next.26

* update compute service options
2022-03-11 11:26:04 +00:00
EnzoVezzaro
1eacf9d93e
stop execution on publish if user rejects approval tokens (#1173) 2022-03-09 16:06:55 +00:00
mihaisc
af60018500
fix max add/remove liquidity (#1141)
* fix max add/remove liquidity

* fix graph liquidity

* small comment

* change liquidity graph to tvl, fix swap

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

* change label

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

* remove todo

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

* fix max remove liquidity
2022-03-03 12:23:23 +00:00
mihaisc
8d1782a800
Restore order (#1068)
* minor refactors

* minor refactors

* fixes

* buy dt

* consumePrice + estimation

* various fixes

* cleanup

* fix build

* fix ssh issue

* feedback

* build fix

* ssh fix

* remove console.log

* suggested fixes

* other fixes

* switch to decimal

* more fixes

* more fixes

* fix

* some fee refactors

* more fee refactoring

* lib update, fre rename

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

* minor refactors

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

* build fixes

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

* update + more refactoring

* calc price

* fix build

* restore accountId in effect

* fix order

* fix build and update lib

* fix order index

* fix comments

* pool fix

* remove console.log

* fix order fixed rate exchange

* fixed free order and messaging

* add comment

* minor type fix

* more type fixes
2022-02-14 08:27:36 -08:00
mihaisc
fc1f396c96
updates (#1084)
Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2022-02-11 13:26:58 +02:00
mihaisc
463c850fc4
update (#1065) 2022-02-07 08:31:22 -08:00
mihaisc
57be62a6b1
Refactor pricing and various components that are involved (#1046)
* update

* merge pr #1012

* fix header

* fix

* abort controller

* up next.8

* build fix

* update lock

* fix

* another fix

* ssh fix

* another ssh fix

* remove optional

* order mock

* small cleanup

* fix package

* price updates

* finish getPrice

* fix consume

* fix consume

* getConsumeDetails  comments

* restore functionality after consumeDetails

* fix some compute typings

* more price fetching updates

* 'minor' refactors and fixed build

* package-lock fix

* minor comments

* minor naming changes

* fix

* fix pool badge

* remove console.log
2022-02-03 03:29:39 -08:00
e113ba5300
V4-publish-fixes (#1030)
* tweak file URL input

* remove logging
2022-01-28 11:46:09 +00:00
mihaisc
487bcad8b4
Update ocean.js (#1013)
* update

* merge pr #1012

* fix header

* fix

* abort controller

* up next.8

* build fix

* update lock

* fix

* another fix

* ssh fix

* another ssh fix

* remove optional
2022-01-26 10:17:41 +00:00
25920b7763
more logging within createTokensAndPricing 2022-01-12 19:05:15 +00:00
b139346b35 output transaction links 2022-01-12 18:02:56 +00:00
e5ee3e10c7 working feedback state switching 2022-01-12 18:02:56 +00:00
453458814e
move token & price creation into method 2022-01-11 22:18:33 +00:00
a1c75c94fe
fix preview crash 2022-01-11 20:09:14 +00:00
a084c038c5
merge fixes 2022-01-11 19:58:39 +00:00
38ce25225f
Merge branch 'v4' into feature/publish 2022-01-11 19:49:11 +00:00
64a25f3f3e
use Asset from ocean.js, adapt to new structure 2022-01-11 19:45:14 +00:00
mihaisc
f576aadbfe fix service id 2022-01-11 13:03:54 +02:00
mihaisc
7cac17d906 fix publish with pool 2022-01-11 12:57:22 +02:00
mihaisc
c7d6616874 fixes & hacks 2021-12-21 22:26:08 +02:00
mihaisc
b86ac219f3 interm 2021-12-20 16:38:54 +02:00
318bc44f43
compute options dataflow tweak 2021-11-29 16:55:15 +00:00
8a60aaf3f5
add default compute environment options 2021-11-29 15:57:12 +00:00
3aa739fce0
add Docker image presets, populate algo Docker field from them 2021-11-29 13:25:30 +00:00