Commit Graph

27 Commits

Author SHA1 Message Date
EnzoVezzaro eb29c4ce3b
Remove AMM Pools (#1614) 2022-08-02 10:53:22 +01:00
EnzoVezzaro 42956a3441
restored "Publishers with most sales" section (#1540)
* updated subgraph query

* rework AccountList

* fix missing 'a' elem in dom (<Link> is not rendering correct markup)

* restore PublishersWithMostSales section

* removed unnecessary params in AssetList

* use Blockies for all profile.image

* changed logic on getTopAssetsPublishers

* added aggregations op to getTopAssetsPublishers method

* fix build issues

* improve logic & added correct total sales on profile

* removed complex logic to unify query

* typography & markup cleanup

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-07-05 13:49:35 +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 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
Matthias Kretschmann 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
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
Matthias Kretschmann 6e2e46d8ea
Disable pool fetching interval (#1265)
* disable pool fetching interval

* change requestPolicy

* trigger refetch on back button click for add/remove

* fix memory leak error

* refetch on refocus

* add manual refresh button
2022-03-29 14:32:45 +01:00
claudiaHash 4331c24c0d
Restore Pool Shares section (#1139)
* get poolShares dt addresses

* style fixes

* class names fix

* remove useless changes

* fix

* try/catch blocks, loading fix

* show pool shares fix

* delete logs, fix build

* more try/catch blocks

* check subgraph url, add try/catch block

* fixes

* pool fields fix

* minor code fixes

* fix subgraph fetch

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

* remove unused function, fixes

* use LoggerInstance, remove useless setter

* error messages fix, get rid of dt column

* small tweaks and tests

* fixes

* fixes

* modified flow for pool shares

* loading UX fixes

* unified calculations for pool liquidity

* stop the refetch madness

* profile provider already sets interval fetching for pool shares
* pool shares will change when chainIds, accountId is changed so no need to listen for changes again

* calculation tweaks

* pool stats tweak

* fix pool transactions

* fix data display in pool shares section

* minor fix, delete comment

* subgraph typings generation fix

* pool stats display tweaks

* price sizing fix

* rabbit hole fixes

* more price UI fixes

* cleanup

* wording consistency

* render all frontpage sections by default, load in assets after

Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
Co-authored-by: mihaisc <mihai@oceanprotocol.com>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-03-09 12:58:54 +00:00
Norbi ed9b1ce2d2
Update fee display inside publish form (#1128)
* 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
2022-02-24 07:21:45 -08:00
claudiaHash db7ae82f4a
Restore profile header and downloads tab (#1129)
* show results

* sales number displayed correctly

* get downloads

* use totalSales parameter

* fixes

* sum sales fix

Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
2022-02-21 17:15:33 +02:00
claudiaHash aec34dc712
Restore highest liquidity tab (#1077)
* get highest liquidity pools WIP

* logs deleted

* order fix

* query fix

Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
2022-02-10 16:41:07 +02:00
Matthias Kretschmann b8c2b01b54
Pool stats updates and pool context provider (#1057)
* remove datatokens from liquidity stats, multiply base token

* naming: Pool Creator Statistics → Owner Liquidity

* remove all the noise

* more pool stats data

* simplify user liquidity data structure, remove datatoken calculations

* chart tweaks, new calculation for liquidity

* tweaks

* todo

* frontpage error fixes

* account switch fixes

* comment out fees

* pool context provider

* double pool share

* move subgraph-related methods into context provider

* typing fix
2022-02-07 14:58:47 +00: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
Matthias Kretschmann 9ebb57d2af
subgraph pool address type workaround 2022-01-31 12:42:23 +00:00
Matthias Kretschmann 1e54a9d573
merge all the pool data subgraph queries into one 2022-01-31 12:42:23 +00:00
Matthias Kretschmann 8293e9ad5f
subgraph update fixes 2022-01-31 12:41:58 +00:00
Matthias Kretschmann f55d8d9a91
Pool tab refactor (#1009)
* refactor and simplify

* fix user pool transaction section

* split up fetching and data manipulation

* restore refetch after add/remove, rename all the things

* more naming and logging

* new state structure unifying multiple data structures

* another response failsafe

* naming
2022-01-21 14:09:15 +00:00
Matthias Kretschmann 1726fe1d0d
isolate apollo stuff into npm script, more generic folder name output 2022-01-13 23:50:47 +00:00
Matthias Kretschmann d78676fa3b
migrate data in subgraph.ts 2022-01-13 21:41:19 +00:00
Matthias Kretschmann 829333e1e1
migrate all subgraph.ts queries, making typings generation work 2022-01-13 21:24:06 +00:00
Matthias Kretschmann 64a25f3f3e
use Asset from ocean.js, adapt to new structure 2022-01-11 19:45:14 +00:00
mihaisc 4caf72d0c9
Fix/old lib dep (#959)
* fixes

* change aqua url

* update future v4 url
2021-12-10 03:33:47 -08:00
mihaisc b0adbf8071
add account teaser, various refactors (#957)
Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2021-12-10 01:50:00 -08:00
Matthias Kretschmann c484a5b40c
new publish preview (#947)
* refactor preview

* make preview render

* more preview elements, proper debug output

* make more elements work

* cleanup and fixes

* make asset actions preview work, kinda

* more fixes

* reorg

* make preview price display work

* fix timeout

* layout tweaks

* fixes

* another fix

* make file info preview work

* empty render fix
2021-11-23 12:53:09 +00:00
Matthias Kretschmann 3d4b30c00f
new DDO (#941)
* type out new DDO

* remove all DDO ocean.js imports

* move over as much as possible to new DDO structure

* DDO/Asset split-up

* use Asset typing instead of DDO almost everywhere

* more typings

* more DDO refactor

* ddo typings updates

* more DDO updates

* updates

* ddo updates
2021-11-11 07:51:13 +00:00
Matthias Kretschmann b6cfe6de34
more refactor 2021-10-27 11:30:28 +01:00
Matthias Kretschmann 51785d54dd
more reorganization 2021-10-27 11:29:03 +01:00