Commit Graph

65 Commits

Author SHA1 Message Date
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
Jamie Hewitt a042387804
Ensuring the market doesn't crash when asset has no services (#1768)
* Ensuring the market doesn't crash when asset has no services

* Showing no pricing schema available when there are no services for an asset

* Shoing No file info available when there are no services available

* removing logs

* early return if asset has no services
2022-11-02 15:40:55 +00:00
mihaisc 5c02da8597
ignore assets with state 5 (#1749)
* ignore assets with state 5

* hide in profile for other users

* fix display on own account

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-10-26 09:45:20 +01:00
mihaisc af93b561ad
Disable ordering when state is 4 (#1746)
* fix state 4

* update var name

* fix typo
2022-10-19 13:53:24 +01:00
mihaisc c110f92cf6
fix networks (#1731) 2022-10-07 16:14:05 +03:00
mihaisc b38f30a67a
Add top allocations (#1722)
* add top

* copy, section move

* asset teaser prototyping

* more moving elements around

* copy

* allocated on asset details stats area

* ve networks "hacks"

* fix type

* added hacks to display top allocation

* fixed chainIds

* remove comment

* add ve in asset stats

* remove console

* added formating and totals

* update total allocated

* update allocation

* fixed numbers

* fix build

* added teaser warn when no price

* number formatting

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-10-07 12:11:50 +01:00
Matthias Kretschmann 8029a8b999
add Görli, remove Rinkeby & Ropsten (#1704)
* add Goerli, kick out Ropsten & Rinkeby

* bump @oceanprotocol/lib to v2.1.0

* bump to ocean.js v2.1.1

* bump eslint-config-oceanprotocol to v2.0.4

* put back Rinkeby & Ropsten to supported networks

* hacky hack to make OCEAN balance work all the time

* Revert "hacky hack to make OCEAN balance work all the time"

This reverts commit 4914314288b09b2844bb1baa18212c49f41cb8ff.

* remove rinkeby & ropsten

* fix chainIds data migration
2022-10-03 12:08:37 +01:00
Matthias Kretschmann ccab96b0ef
remove v3 asset check (#1712) 2022-09-28 12:20:09 +01:00
Matthias Kretschmann 92b7063b3d
ENS integration, the right way (#1410)
* prototype getting ENS names the right decentralized way

* get all profile metadata with ENS

* refactor account display in context of top sales list

* support almost all default text records

* refactor text record fetching

* more web3 calls reduction

* package cleanup

* add Publisher component test, mock out ens utils

* remove mock to run @utils/ens directly

* add Avatar stories

* cleanup

* rebase fixes

* profile loading tweaks

* fixes

* merge cleanup

* remove @ensdomains/ensjs

* fetch ENS data from proxy

* update avatar tests

* tweak error catching for all axios fetches

* test tweaks

* api path fix

* fetching fixes

* account switching tweaks

* remove unused methods

* add ENS fetching tests

* jest timeout tweak

* update readme
2022-09-22 19:18:32 +01:00
Matthias Kretschmann 4d119467a4
refactor price context to fetch multiple tokens (#1573)
* refactor price context to fetch multiple tokens

* fixes

* move tokenIds to app config

* make conversion work

* conversion for all user tokens, hide if 0

* different user balance key tactic

* remove NFT gas estimation

* closes #1633

* small simplification in getCoingeckoTokenId logic

* basic Prices provider test

* mock some hooks

* mock MarketMetadata in all tests
2022-08-12 14:11:33 +01: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 4baee6aaff
catch nft state on asset detail (#1601)
* catch nft state

* use warnings for nft state

* update disabled message

* changes to messages

* removed case 4

* change message title

* fix similar block codeclimate

* restore `error` state instead of `warning`

* removed unnecessary warning state

* removed warning completely
2022-07-26 13:48:30 +02:00
mihaisc 8396b705d3
Walletconnect fix for polygon (#1548)
* fix wc

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

* fix mumbai

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2022-06-27 11:19:26 +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
Matthias Kretschmann d884a9529d
remove Portis (#1529)
* remove Portis

* cleanup
2022-06-21 14:18:40 +01:00
mihaisc 82e5f60e65
fix (#1517) 2022-06-14 03:57:06 -07:00
Matthias Kretschmann 89a63f7cb2
NFT display tweaks (#1507)
* NFT display tweaks

* capitalization consistency

* refactor

* fix asset preview
2022-06-13 14:41:18 +01:00
mihaisc 6dfeead4fd
Release (#1492)
* update contracts

* add version selector

* show banner on all pages

* show banner on all pages

* Announcement/warning messages cleanup

* new main announcement message
* contextual compute-to-data warnings in publish form & asset action

* copy update

* change hardcoded URLs

* change localStorage key

* to prevent user preferences clashes when switching between v3 & v4

* footer stats note changes

* move copy into content file
* mention external markets

* footer stats note copy changes

* modified pool widget footer

* take out pool reserve display
* style & spacing updates for fees

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-06-08 11:46:46 +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
mihaisc bf31cdfed5
Various fixes (#1441)
* fixes

* more fixes
2022-05-18 17:25:44 +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
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 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
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
Matthias Kretschmann 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
EnzoVezzaro 3b023054dd
restore fetchAllData for any user (#1318) 2022-04-05 10:09:28 -07:00
EnzoVezzaro 4ded93afed
fix missing chain id on preview (#1305)
* fix missing chain id when user is not connected

* remove log
2022-04-04 17:56:05 +03:00
EnzoVezzaro b574daee30
fix wrong TVL on pool tab (#1281)
* 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)
2022-04-04 14:29:31 +01:00
EnzoVezzaro 47144d80b5
fix remove liquidity issues (#1258)
* reset slider after transaction

* fix issue on remove button hover

* restore transform on Button.module.css

* added check on accountId to avoid failing calls

* disable remove button on amountPercent = 0
2022-04-01 11:22:38 +03: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
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
claudiaHash 8a5bddbf6e
Restore trade tab (#1047)
* get swap fee, max values

* use baseToken instead of ocean

* build fixes

* set form trade tx - WIP

* use pool info

* logs deleted

* merge fixes

* use local ocean.js, get spot price

* handle value changes, logs deleted

* fixes after v4 merge

* valid user liquidity displayed

* get correct token amount

* more fixes

* form trade fixes

* positive input values fix

* use proper swap functions

* use appConfig's marketFeeAddress

* remove redundant setters

* use consumeMarketPoolSwapFee

* use poolInfo, remove log

* code fixes

* some more fixes

* fees fix

* use poolInfo data

* various fixes

* fixes and cleanup

* fix build

* partial decimal fix

* add swap fee

* fix sub updates

* remove console

* fix package

* fix package-lock

* remove ssh

* fix blockies and package

* fix comments

* remove unused var

Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
Co-authored-by: mihaisc <mihai@oceanprotocol.com>
2022-03-03 10:49:04 +00: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
Matthias Kretschmann d2fb4db7c6
revised asset not found message (#1124) 2022-02-17 21:37:59 +00:00
mihaisc 677563d7c2
fix pool tab (#1121)
* query update

* fixes
2022-02-17 16:00:08 +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
Matthias Kretschmann 942ead1b4c
disable exhaustive-deps warning in Pool context (#1094) 2022-02-14 15:23:18 +00:00
EnzoVezzaro b6dc52c0ab
change undefined with 0 as value to fix new Decimal error (#1089)
* change undefined with 0 as value to fix new Decimal error

* correction for fix changed undefined value with 0 as value to fix new Decimal error
2022-02-14 15:22:50 +00: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
Matthias Kretschmann 64255f2b37
Remove asset purgatory workaround (#1056)
* revert asset purgatory workaround

* reverts #1016

* asset loading fix
2022-02-03 15:26:49 +00:00
Matthias Kretschmann 8074a6143c
Refactor Asset context provider (#1055)
* refactor Asset context provider

* use useIsMounted hook

* typings and effect tweaks

* use chainId

* effect tweak
2022-02-03 14:31:43 +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 8293e9ad5f
subgraph update fixes 2022-01-31 12:41:58 +00:00
Matthias Kretschmann 409f0c51fb
faulty purgatory response workaround (#1016) 2022-01-24 10:51:51 +00:00
claudiaHash 42323cb8c4
Use asset's ddo.purgatory (#1006)
* set purgatory state

* merge v4 changes, use ddo.purgatory

* delete commented code, fix verification

* unused files and function deleted, small fix

* comment removed

* use purgatory.state for filtering assets

* remove unnecessary check

Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
2022-01-19 16:30:04 +00:00