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

16 Commits

Author SHA1 Message Date
Norbi
e500772d21
Add price impact indicator to the trade component (#765)
* WIP

* calculate price impact by subtracting tokens fiat values

* get and use spotPrice for price impact calculation, use Decimal

* set impact to 0 if input and output values are undefined

* move price impact to a new component

* turn price impact value color to red if grater than 5

* add tooltip to price impact and slippage

* removed fiat price

* change formula

* remove console.log

* don't block add liquidity button

* typos

* proper text alignment

Co-authored-by: mihaisc <mihai@oceanprotocol.com>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2021-08-18 12:46:27 +03:00
Norbi
565c0324f9
Create wallet network switcher (#676)
* created component for wallet network switching

* component styling

* display network names

* created networks config

* fix get network config function

* wip

* moved switcher component inside consume

* use isAssetNetwork to show Switcher component, added to publish

* get network properties using networkList and oceanConfig

* error fix

* hide wallet network switcher if no provider

* use chainId from useAsset ddo

* added switcher component to Compute

* added component to edit metadata and compute settings

* added component to advance settings form

* fixed lint errors

* included component inside Web3Feedback

* updated text and icon design

* button design update, and Web3Feedback position on edit asset

* fixed lint error

* message update

* tag error fixes

* disabled pool and trade buttons if not asset network

* mainnet aquarius fallback url

* filename typo fix

* replace NetworkName component with getNetworkDisplayName function

* added method to switch to EthereumChain networks, removed logs

* fixed lint error

* style tweaks

* markup and styles simplification

* restrict add datatoken

Co-authored-by: Norbi <katunanorbert@gmai.com>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2021-07-15 17:03:03 +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
Dimo Dzhurenov
29b644f402
updated parameter (#635) 2021-05-31 12:52:14 +02:00
mihaisc
c09bc3342a
fix warning (#475)
Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2021-04-01 19:27:02 +03: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
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
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
000a369fd2
Blink fixes (#267)
* badge fixes

* button fixes
2020-11-20 09:48:49 +01:00
7f2a5e7515
refresh interval tweaks (#257) 2020-11-17 13:10:12 +01:00
mihaisc
fa7de2eeb4
Fix trade (#253)
* oceanlib verbose

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

* fix

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

* round 20

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

* round 10

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

* round 5

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

* round 5

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

* round 5

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

* round 5

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

* debug

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

* bump lib

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

* decimal 15

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

* fix

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

* remove verbose

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2020-11-16 21:45:35 +02: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