1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

48 Commits

Author SHA1 Message Date
65045ba7b9
put back Remove Liquidity components (#1551)
* put back Remove Liquidity components

* remove Pool Share Lock action
2022-06-28 14:44:32 +01:00
fc2aa5bf0e
V3 Sunset, the Start (#1456)
* Remove publish (#1451)

* gitignore Next.js stuff

* remove publish

* remove pricing creation components

* Remove Trade (#1453)

* Add market version dropdown (#1185)

* Add market version dropdown and disable publish

Signed-off-by: Pablo Maldonado <pablo@oceanprotocol.com>

* Remove old tests and forms

Signed-off-by: Pablo Maldonado <pablo@oceanprotocol.com>

* Update dropdown design

* roll back Pool button change

* new iteration

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

* put up announcement banner (#1455)

* Migration v3-v4 interface  (#1146)

* Adding start migration component

* Adding styles and updating text

* Conditional rendering - only showing start migration to the owner of the asset

* Removing unused imports

* creating Migration context provider

* Importing types from local v4-migration-lib package

* Adding migration contract addesses

* Setting migration contract address and creating fetchMigrationStatus function

* Updating MigrationStatusProvider interface & exports

* Updating the statMigration function

* Passing token name and symbol to smart contract

* creating lockPoolShares component

* Adding getUserPoolShareBalance

* Showing lockPoolShares component on asset detail page

* Adding migration context component

* Setting encrypted files

* Passing through dtAddress and poolAddress when starting migration

* Fixing build issues

* fixing type issues

* Updating the DT and NFT names / symbols

* Removing add / remove liquidity option when the pool migration is in progress

* Using useMigrationStatus in pool tab

* Lock pool shares not shown for pool owner

* Adding i-progress message

* Checking if threshold has been met

* Fixing approvals on lock pool shares

* Adding CreateV4Pool component

* Checking if deadline has passed

* Creating Cancel Migration component

* Updating Migration provider to fetch poolShares for user

* First draft migration

Signed-off-by: Pablo Maldonado <pablo@oceanprotocol.com>

* Install test v4-migration-lib

Signed-off-by: Pablo Maldonado <pablo@oceanprotocol.com>

* Fix linting and apollo errors

Signed-off-by: Pablo Maldonado <pablo@oceanprotocol.com>

* Remove test component

Signed-off-by: Pablo Maldonado <pablo@oceanprotocol.com>

* Update v4-migration-lib version

Signed-off-by: Pablo Maldonado <pablo@oceanprotocol.com>

* Cover more emigration cases

Signed-off-by: Pablo Maldonado <pablo@oceanprotocol.com>

* Fix migration message

* Update market migration with new workflow

Signed-off-by: Pablo Maldonado <pablo@oceanprotocol.com>

* Update migration contract address

* Clean up console.logs

* add more networks

* Removing migration not started message + updating gitignore

* Refactoring to remove the migration not started yet message

* Fixing - hide lock poolshares button when shares are already locked

* Removing console log

* Adjusting message logic to create default message

* Removing block counter

* Removing threshold met contract call

* Updating message content for the migration

* Simplifying MigrationAction enum

* Removing console.log

* fix package-lock

* don't use old npm versions as it adds git+ssh all over the place, making Node.js v14 CI runs fail

* Simplifying logic for showing message and action

* Fixing getMessageAndAction()

* Removing unused state variable

* Removing unused state variables from Migration context provider

* more cleanup, leave only Rinkeby as test network

Co-authored-by: Jamie Hewitt <jamie.hewitt15@gmail.com>
Co-authored-by: alexcos20 <alex.coseru@gmail.com>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>

* Updating locked shares message + ensuring the message changes when the shares are locked (#1457)

* Adding start migration component

* Adding styles and updating text

* Conditional rendering - only showing start migration to the owner of the asset

* Removing unused imports

* creating Migration context provider

* Importing types from local v4-migration-lib package

* Adding migration contract addesses

* Setting migration contract address and creating fetchMigrationStatus function

* Updating MigrationStatusProvider interface & exports

* Updating the statMigration function

* Passing token name and symbol to smart contract

* creating lockPoolShares component

* Adding getUserPoolShareBalance

* Showing lockPoolShares component on asset detail page

* Adding migration context component

* Setting encrypted files

* Passing through dtAddress and poolAddress when starting migration

* Fixing build issues

* fixing type issues

* Updating the DT and NFT names / symbols

* Removing add / remove liquidity option when the pool migration is in progress

* Using useMigrationStatus in pool tab

* Lock pool shares not shown for pool owner

* Adding i-progress message

* Checking if threshold has been met

* Fixing approvals on lock pool shares

* Adding CreateV4Pool component

* Checking if deadline has passed

* Creating Cancel Migration component

* Updating Migration provider to fetch poolShares for user

* First draft migration

Signed-off-by: Pablo Maldonado <pablo@oceanprotocol.com>

* Install test v4-migration-lib

Signed-off-by: Pablo Maldonado <pablo@oceanprotocol.com>

* Fix linting and apollo errors

Signed-off-by: Pablo Maldonado <pablo@oceanprotocol.com>

* Remove test component

Signed-off-by: Pablo Maldonado <pablo@oceanprotocol.com>

* Update v4-migration-lib version

Signed-off-by: Pablo Maldonado <pablo@oceanprotocol.com>

* Cover more emigration cases

Signed-off-by: Pablo Maldonado <pablo@oceanprotocol.com>

* Fix migration message

* Update market migration with new workflow

Signed-off-by: Pablo Maldonado <pablo@oceanprotocol.com>

* Update migration contract address

* Clean up console.logs

* add more networks

* Removing migration not started message + updating gitignore

* Refactoring to remove the migration not started yet message

* Fixing - hide lock poolshares button when shares are already locked

* Removing console log

* Adjusting message logic to create default message

* Removing block counter

* Removing threshold met contract call

* Updating message content for the migration

* Simplifying MigrationAction enum

* Removing console.log

* fix package-lock

* don't use old npm versions as it adds git+ssh all over the place, making Node.js v14 CI runs fail

* Simplifying logic for showing message and action

* Fixing getMessageAndAction()

* Removing unused state variable

* Removing unused state variables from Migration context provider

* Adding startMigration function in for testing + updating refreshMigration function

* Updating locked shares message

Co-authored-by: Pablo Maldonado <pablo@oceanprotocol.com>
Co-authored-by: alexcos20 <alex.coseru@gmail.com>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>

* Checking if adding shares is allowed for Asset (#1458)

* fix dark mode banner text color (#1459)

* Update V4 Migration smartcontract address (#1460)

Update V4 Migration smartcontract address on Rinkeby

* Removing all code that was in V3 branch for testing (#1461)

* Removing all code that was in place for testing

* Removing complete migration function

* remove unused CSS files (#1462)

* remove Add/Remove for good (#1463)

* alert color tweaks, effect dependencies (#1464)

* V3 fix pool shares rounding (#1466)

* Changing UI to show pool shares rounded to 3 decimal places

* Fixing NaN shown in the UI when changing account

* Displaying locked pool shares to 3 decimals (#1467)

* Displaying locked pool shares to 3 decimals

* Removing else condition

* Updating text - removing mentions of migration (#1468)

* V3 fixes (#1469)

* Fixing - making sure migration status is not shown after changing accounts

* Updating text to remove V4 migration status+ fix typo + renaming data pool to datatoken pool

* Fixing typo - Please note

* Making title shorter

* Update title (#1470)

* Update MIGRATION_CONTRACT_ADDRESS for production (#1472)

* update banner: (#1474)

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

Co-authored-by: md0x <pablomaldonadoturci@gmail.com>
Co-authored-by: Jamie Hewitt <jamie.hewitt15@gmail.com>
Co-authored-by: alexcos20 <alex.coseru@gmail.com>
Co-authored-by: Pablo Maldonado <pablo@oceanprotocol.com>
Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2022-05-25 15:28:01 +03:00
Norbi
b881fdd88f
Add liquidity input changes&fixes (#893)
* disable add liquidity input when not asset network

* clear amount on coin selection change

* fix switch token error

* disable trade tab inputs when not connected to asset network

* disable inputs and buttons inside remove when not connected

* remove ocean function calls when not connected to asset network

* fix send undefined as string inside Trade component to TokenApproval

* return from calculatePoolShares function if no wallet connected

* set amount on use max button click, use 3 digits after decimal
2021-10-14 13:48:20 +01: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
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
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
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
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
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
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
mihaisc
829047cb71
reset values when switching from simple to advanced
Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2020-10-22 15:37:26 +03:00
3a83bea511
remove liquidity: slider fixes, output user pool shares 2020-10-16 11:46:05 +02:00
21f0e1fdc8
generic range input styling 2020-10-14 19:56:13 +02:00
287eea3c94
move all pool copy into content data file 2020-10-14 19:08:46 +02:00
959158d82a
refactor 2020-10-14 16:09:20 +02:00
2646e181cf
reset range slider on view switch 2020-10-14 16:02:26 +02:00
056b6e6c2c
max checks 2020-10-14 15:57:30 +02:00
5b7843d3d4
prepare max checks 2020-10-14 15:11:03 +02:00
0a248b36a1
refactor token checks
* requires https://github.com/oceanprotocol/ocean.js/pull/361
2020-10-14 15:03:44 +02:00
207b61933a
combine both flows 2020-10-14 15:03:44 +02:00
96ce7b518b
add help copy 2020-10-14 15:03:44 +02:00
1a71f0f66f
remove liquidity in OCEAN only 2020-10-14 15:03:44 +02:00
36d1289a8e
percentage is hard 2020-10-14 15:03:44 +02:00
89f4bf5aea
method changes 2020-10-14 15:03:44 +02:00
d7fed2deb5
make slider/output work 2020-10-14 15:03:44 +02:00
c068958513
use slider prototype 2020-10-14 15:03:44 +02:00
37b0f4f047
prototype 2020-10-14 15:03:43 +02:00
4b0f7c0042
typing fixes 2020-10-08 14:45:55 +02:00
f7f3a259f7
allow to add OCEAN or Datatoken 2020-10-06 21:53:06 +02:00
fb479a167f
remove liquidity screen styling 2020-10-06 19:07:33 +02:00
56dc96a6c1
refactor 2020-08-31 11:34:56 +02:00
09edb9d42b
use totalPoolTokens as maximumPoolShares, removal UI 2020-08-31 10:55:12 +02:00
1d52702a87
remove todos 2020-08-28 18:57:46 +02:00
405a400a83
add todos 2020-08-28 17:39:41 +02:00
f54c461edf
adding todos 2020-08-26 20:59:11 +02:00
bd88f40d4d
input fixes 2020-08-26 20:46:34 +02:00
f8fd5bb76f
cleanup 2020-08-26 20:36:18 +02:00
5e61123669
add/remove inputs 2020-08-26 09:01:43 +02:00
49bb90865b
add conversion 2020-08-20 10:55:17 +02:00
cd1c514ac0
basic error handling during add/remove 2020-08-19 17:38:14 +02:00
7da13f314b
add interaction 2020-08-19 17:09:30 +02:00
db5783c356
add remove screen functionality 2020-08-19 15:59:50 +02:00
71e56e4344
prepare add/remove screens 2020-08-18 23:26:59 +02:00