1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-30 22:01:44 +02:00
Commit Graph

156 Commits

Author SHA1 Message Date
Norbi
14f2f2a747 Merge branch 'main' into feature/multinetwork 2021-07-01 14:44:21 +03:00
Norbi
31ee1aab98
Pool statistics graph shows two sets of data when switching tabs (#696)
* removed compose previous data with new data

* removed unused states

* fix refetch multiple times for same block number

Co-authored-by: Norbi <katunanorbert@gmai.com>
2021-06-25 10:34:39 +02:00
f9f3768f5f
fix most remaining typing errors 2021-06-11 11:23:24 +02:00
b516e95879
prettier formatting updates 2021-06-04 11:43:47 +02:00
Norbi
cd8e388806
fixed app crash (#629)
Co-authored-by: Norbi <katunanorbert@gmai.com>
2021-05-27 16:39:02 +02:00
Norbi
9ce9fc84c7
Display fiat value inside pool statistics (#610)
* fixed

* replaced ddo.price with price from useAsset

Co-authored-by: Norbi <katunanorbert@gmai.com>
2021-05-19 14:14:06 +02:00
Dimo Dzhurenov
4a28907fe3
Fix edge case calculation errors in remove liquidity screen (#586)
* switched to toFixed instead of toPrecision

* add round down parameter toFixed

* removed console log

* added toExpPos

* set decimal precision

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

* slice price

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

* slice price

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

* slice ocean and dt amount

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

* add logs

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

* switch to decimal

Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2021-05-18 10:32:19 +02:00
Dimo Dzhurenov
49cd032274
using BigNumber instead of Number (#570)
* using BigNumber instead of Number

* remove wrong calculation of ocean ammount

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

* remove calculateAmountOfOceansRemoved

* using decimal.js for remove

* bump to ocean.js v0.14.8

Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2021-05-04 14:56:47 +02:00
Jamie Hewitt
0a739cbe93
Support for Moonbase Alpha (#552)
* upgrading to ocean.js 0.14.6

* proper ocean.js update

* make all explorer links work

* handle new moonbeamalpha config

* add moonbase alpha to chain user preferences

* more ocean.js v0.14 updates

* switch to grid

* upgrading ocean.js to 0.14.7

* lock to @oceanprotocol/contracts v0.5.16

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2021-04-29 14:48:57 +02:00
mihaisc
e4803fda9e
fix price value (#544)
* fix price value

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

* proper price

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2021-04-21 18:03:13 +03:00
Norbi
1da7eae35a
fix (#534)
Co-authored-by: Norbi <katunanorbert@gmai.com>
2021-04-16 14:26:24 +02:00
Dimo Dzhurenov
b2f6e541a3
remove tooltip animation (#494) 2021-04-13 13:58:32 +02:00
Norbi
96296008c9
Add custom network (#450)
* add custom network

* created announcement banner

* add custom network from banner

* show ADD CUSTOM NETWORK on MetaMask provider

* show add ocean to wallet action

* removed warningPolygon from alert

* removed customNetwork component

* remove Add custom network on asset details page

* Details use function from web3 to add token

* changed available on Polygon link, refactoring

* show Switch to Polygon when no wallet connected

* banner content for no provider and Polygon network

* change message when not provider and eth network

* changed warning and added announcement in site.json

* moved network logic inside Announcement, moved Announcement component

* added switch to ETH button, refactoring

* removed add mOcean action button

* moved location verification to App.tsx

* styling & copy updates

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2021-03-30 15:37:30 +02:00
claudiaHash
59b571e984
WIP on expected price impact (#440)
* wip on expected price impact - simple case

* advance flow implemented

* slippage change fixed

* compute using pool shares

* spendings, receivings, helper message corrected

* output values display fixed

* output messages fixed, slippage input replaced

* used remove ocean liquidity with minimum oceans received function

* maxShares removed, ocean.js version updated

* package-lock.json updated

* output messages resized

* spacing fixed in trading form

* removed redundant css

* removed unnecessary verification

* file removed

Co-authored-by: claudia.holhos <claudia.holhos@hpm.ro>
2021-03-25 13:47:31 +02:00
bdccb0966f
Web3/Ocean splitup + full Polygon/Matic support (#433) 2021-03-17 11:44:26 +01:00
Norby
b043eab047
Get pool shares using The Graph (#360)
* added graph query

* fixed negative liquidity value for input error

* used graph to get poolShares

* replaced total pool liquidity with user liquidity, get ddo on row

* get symbol from graph, calculate userLiquidity

* fixed userLiquidity price and sorted table by userLiquidity

* removed ordering by balance

* displayed pool and client liquidity, disabled table header hover

* order Your Liquidity before Pool Liquidity

* removed line height on asset title in pool shares table

* limit table to 5 rows, refactor liquidity comp, changed balance color

* code climate similar blocks fix

* changed lockedValue to valueLocked in pool shares query

* removed husky file
2021-02-10 17:16:24 +02:00
mihaisc
79715df435
Pool tx history (#307)
* graphql

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

* ignore generated

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

* delete generated

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

* fix travis

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

* fix travis

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

* fix fetch

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

* fix travis

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

* fix fetch

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

* update readme

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

* pool creator liquidit& statistics

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

* graph with the graph

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

* cleanup

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

* fix query

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

* update poll interval

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

* update graph url

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

* ocean bump

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

* run apollo codegen before starting gatsby

* put back graph loading state

* typing fix

* graph tweak, add error state

* readme update

* remove unused functions, move graph provider

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

* fix package-lock

* fix graph when switching tabs

* generate apollo files into one folder

* fix loading

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

* graph query

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

* tx query

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

* fix titles

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

* fix text issues

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

* fix query

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

* local pagination

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

* return refreshInterval to 10 sec

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

* add

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

* fix data set column

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

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2021-01-22 18:05:02 +01:00
mihaisc
273769388c
Pool statistics from the graph (#288)
* graphql

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

* ignore generated

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

* delete generated

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

* fix travis

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

* fix travis

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

* fix fetch

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

* fix travis

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

* fix fetch

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

* update readme

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

* pool creator liquidit& statistics

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

* graph with the graph

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

* cleanup

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

* fix query

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

* update poll interval

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

* update graph url

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

* ocean bump

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

* run apollo codegen before starting gatsby

* put back graph loading state

* typing fix

* graph tweak, add error state

* readme update

* remove unused functions, move graph provider

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

* fix package-lock

* fix graph when switching tabs

* generate apollo files into one folder

* fix loading

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

* fix codegen camelcase

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

* bump apollo packages

* document subgraph usage, add example

* rewrite into Data Sources, add quick examples

* more data sources docs

* docs updates, typos

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2021-01-21 16:02:48 +01:00
b2f1af6e87
package updates and fixes (#296)
* package updates and fixes

* yup update for edit form
2020-12-10 15:28:46 +01:00
960c5b3234
Update metadata, the proper way (#292)
* prototype view switching

* refactor, more UI

* formik form setup & data flow

* debug output, fixes, refactor

* description preview refactor

* publish/update date changes

* output created & updated date at top of asset
* use ddo.created & ddo.updated everywhere
* stop pushing metadata.main.datePublished

* owner check for edit link

* all the feedback states and switching between them: loading, error, success

* refactor feedback, one component for publish & edit

* action & date output fixes

* move all content, iterate form fields from it

* UI updates

* styling tweaks

* ddo dataflow refactor, more useAsset usage

* more useAsset usage

* form actions styling

* prepare edit history component

* metadata output tweaks

* copy

* safeguard against profile urls without protocol defined

* refetch ddo after edit

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

* switch author for dataTokenOptions in metadata preview

* refactor

* copy

* showPricing fix

* validation: minimum characters for title & description

* disable submit button when validation fails

* form validation fixes

* manually trigger onChange validation in publish & edit forms

Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2020-12-10 14:30:40 +01:00
f843641a45
More helpful output for Add Liquidity (#277)
* prototype

* add copy

* value update fixes

* calculation fun

* move copy

* move copy

* cleanup

* use Decimal

* fix

Co-authored-by: alexcos20 <alex.coseru@gmail.com>
2020-12-02 12:44:07 +01:00
fdf518401c
fix cropped graph on mobile (#276) 2020-12-01 11:42:49 +01:00
mihaisc
b5a11d6d0f
Handle price fetching better (#265)
* fix price refresh, add AssetProvider

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

* price comment

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

* fix trade

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

* fix trade

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

* fix pool liquidity

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

* fix AssetProvider

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

* fix

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

* fix import

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

* remove console.log

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

* pool refresh fix

* simplify, logging

* handle errors

* cleanup

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2020-11-20 14:31:28 +01:00
7325e093ad
refactor transaction titles (#266)
* refactor transaction titles

* refactor

* refactor

* bump @oceanprotocol/lib

* shorter getTitle

* remove util duplicate

* table tweaks
2020-11-20 11:29:42 +01:00
000a369fd2
Blink fixes (#267)
* badge fixes

* button fixes
2020-11-20 09:48:49 +01:00
225613745c
hit Aquarius only when config is present (#258)
* hit Aquarius only when config is present

* more checks
2020-11-17 14:21:29 +01:00
7f2a5e7515
refresh interval tweaks (#257) 2020-11-17 13:10:12 +01:00
mihaisc
bb80c4df78
Swap tokens (#204)
* swap

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

* validation and calculation

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

* refactor

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

* remove unused effect

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

* fix interval

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

* increase refresh timer, remove optional params

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

* make inputs show up without wallet

* style fixes

* restyling

* styling

* more styling

* fix refresh price

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

* remove test effect

* fixes, get data as early as possible from DDO and initial state

* refactor

* refactor

* refactor

* label tweaks

* copy

* typo

* prototype output

* remove price header

* ouput swap fee

* fix

* spacing

* copy

* refactor pool transaction titles

* copy

* update math

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

* use messaging tweaks

* tab tweaks, output refactor

* fix dark mode selection style

* prototype output

* method tweaks

* slippage to 1%, added warnig banner

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

* form tweaks

* error fix

* empty inputs by default

* longer intervals

* maxOcean validation fix

* slippage tolerance UI

* modified slippage UI

* refactor, refresh ocean user balance

* move typings/models around

* typing fix

* fixed output values

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

* bump oceanlib

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

* remove console.log

* remove placeholder

* tweak

* non-web3 browser tweak

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2020-11-16 16:21:15 +01:00
461fcaf8ae
Liquidity & price history graph (#248)
* graph prototype

* switch items

* liquidity history graph prototype

* more graph styling

* epoch times conversion

* get data in root component

* redraw fix

* more graph styling

* loading fix

* re-render fixes

* re-render fixes

* new Aquarius responses

* price graph and switch buttons

* spacing tweaks
2020-11-16 15:10:33 +01:00
mihaisc
f8a0ff41c3
purgatory updates (#249)
* purgatory updates

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

* format

* update react hooks

* alert style, copy changes

* remove inverse style

* disable remove for purgatory owner

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

* remove buy button for purgatory assets

* hide remove liquidity for owner

* query change

* query rollback

* query change

* query change

* query change

* change frontpage queries

* typings

* query refactor, make `all data sets` link work again

* footer fix

* test endpoint for stats

* fix pagination

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

* partner query tweaks

* switch back market-stats endpoint

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2020-11-14 15:02:54 +01:00
eabb696f49
Remove slider quick wins (#222)
* make max display into max button

* effect refactor, get amountOcean as early as possible

* fix slider styles in Chrome

* max button fixes

* fix debounce

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

* remove console.log

* lower threshold

Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2020-11-10 09:50:05 +01:00
9f211a14d9
output weights in pool statistics (#218)
* output weights in pool statistics

* switch to more simple output

* output weights only when present
2020-11-09 17:49:09 +01:00
79e76dddb0
fix min validation input bug (#195)
* fix min validation input bug

* tweak pool transactions number output so 0.00001 shows up
2020-11-02 20:24:58 +01:00
be8307f34d
User pool transactions on asset details (#193)
* refactored pool transactions component, output pool transactions on asset details

* styling

* remove sticky around asset actions

* hasAddedLiquidity simplification

* owner from useMetadata

* refactor, styling, number formatting

* refactor

* toggle pattern
2020-11-02 19:18:21 +01:00
a5b7c66331
re-fetch pool numbers every 10 sec. (#191)
* re-fetch pool numbers every 10 sec.

* visual indicator

* refresh values on remove screen

* show indicator only when ocean connected

* put back await
2020-11-02 11:58:05 +01:00
0c2bc9ad4e
lower min amount for adding (#186) 2020-11-02 11:24:08 +01:00
b48f3cc89d
mobile fixes 2020-10-31 00:56:03 +01:00
74dc5b8081
logo fixes 2020-10-30 22:00:57 +01:00
cf3f406547
Dark Mode (#182)
* refactor CSS custom properties for dark mode

* dark mode style

* dark mode switching

* config tweaks
2020-10-30 21:28:20 +01:00
08e2a3f22d
unify TokenList styles 2020-10-30 15:27:14 +01:00
0134610dbe
remove conversion display from pool price 2020-10-30 14:03:40 +01:00
22cb980207
fix remove screen styles 2020-10-30 13:46:52 +01:00
mihaisc
5b3002fd82
add creator liquidity (#178)
* add creator liquidity

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

* remove comments

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

* check price update

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2020-10-30 14:39:00 +02:00
e96d782917
Add warning to Add Liquidity screen (#177)
* refactor add form, warning component

* dismissable alert

* prototype default warning screen

* add copy, finalize styling

* remove dismiss x
2020-10-30 13:31:27 +01:00
mihaisc
290e43199c
change weights (#169)
* change weights

* new defaults

* your liquidity fix

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2020-10-30 11:50:50 +01:00
mihaisc
d8dfe88e2a
refresh price and pool info (#164)
* refresh price and pool info

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

* lib update

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

* remove unused dependencies

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

* remove console.log

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2020-10-29 15:53:27 +01:00
a9550e1331
add a debounce to remove liquidity slider 2020-10-29 12:42:19 +01:00
0695390c41
fix remove liquidity message 2020-10-28 13:02:24 +01:00
f01f885884
multiple remove liquidity fixes
* never go more than 100% in slider
* fix removing OCEAN
2020-10-28 12:57:06 +01:00
fd1a7f263a
cleanup 2020-10-27 21:05:09 +01:00