1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-09-28 03:58:59 +02:00
Commit Graph

205 Commits

Author SHA1 Message Date
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
7f5a8e11cc
dataset → file
* closes #567
2021-04-28 20:20:56 +02:00
Bogdan Fazakas
369b075aa9
fixed compute algorithm pool price value (#553) 2021-04-23 15:44:31 +02:00
Bogdan Fazakas
1d02f53a06 fixed no price set usecase 2021-04-23 12:07:59 +03:00
Bogdan Fazakas
0cef2cccd5 update price value for pool assets using consumePrice and added isConsumable logic 2021-04-22 14:03:58 +03:00
Bogdan Fazakas
7b653c46ba fetch asset price withoud relying on ddo.price 2021-04-20 09:44:18 +03:00
4a83732255
Merge branch 'main' into feature/compute 2021-04-15 13:50:07 +02:00
a8aebf2fac
set isConsumable to true by default (#523)
* set isConsumable to true by default

* kick out dtUtils, cleanup

* cleanup

* tweak AssetTeaser price check
2021-04-15 13:47:32 +02:00
79497adbab
package fix 2021-04-15 11:24:00 +02:00
Bogdan Fazakas
1beb33d3e1 check ddo provider for algo list in start compute 2021-04-14 20:11:29 +03:00
fff5699c67
Merge branch 'main' into feature/compute 2021-04-14 15:31:36 +02:00
Bogdan Fazakas
1696fb2c44 use priceList interface instead of any for return type 2021-04-14 14:41:17 +03:00
Jamie Hewitt
7c09ceca06
Issue 366/dataset publish ux (#461)
* changing the info text for dataset input

* Updating error message for invalid dataset input

* chaning button styling to make it look more like a button

* fixing package-lock.json issue

* removing changes from package-lock.json

* adding onBlur event to validate the data input

* Removing autoclose on error message

* adding success message when the dataset is valid
2021-04-14 13:24:07 +03:00
Bogdan Fazakas
56554028b8 merged compute into subgraph-util-methods 2021-04-13 19:21:05 +03:00
Bogdan Fazakas
1c2d81049d refactor getAssetPrices method, not using ddo.price.type anymore 2021-04-13 19:15:09 +03:00
faa6a8329a
Merge branch 'main' into feature/compute 2021-04-13 15:14:59 +02:00
Jamie Hewitt
7672d78aee
Refactoring Market for new Ocean.js build (#481)
* removing imports from utils folder

* lib bump

* update status args

Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2021-04-13 15:13:55 +02:00
Norbi
b8247c7ef4
The Graph sync status (#466)
* WIP

* query update

* quick fix

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

* get blocks number when no provider, added threshold

* format code

* naming fix

* show graph out of sync message inside announcement banner

* added loader

* moved sync component

* refactor all the things

* new atoms/AnnouncementBanner : banner component reduced to presentation only, where its content is always passed as props

* revised molecules/NetworkBanner: the former AnnouncementBanner now holds all the specific network detection logic, in the end also returns the atoms/AnnouncementBanner

* new hook hooks/useGraphSyncStatus: move all the graph fetching logic in there so we can use its status in multiple places in the app without all this props passing. This also decouples the SyncStatus component in footer from its logic

* in App.tsx, add the graph sync warning banner in another atoms/AnnouncementBanner, getting its values from the hook

* data flow refactor

* .env.example tweak

* race condition fighting

* subgraph loading

* polygon fallback fix

* no interval fetching

* turn around logic for adding infura ID

* removed graphNotSynched

Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
Co-authored-by: Norbi <katunanorbert@gmai.com>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2021-04-13 10:57:59 +02:00
Bogdan Fazakas
a27bc6718a update get prev order method & small typo 2021-04-12 17:09:41 +03:00
Bogdan Fazakas
0740917731 typo fixes 2021-04-12 13:52:09 +03:00
Bogdan Fazakas
c533d1ee0c get compute previous orders from subgraph util 2021-04-11 02:13:43 +03:00
Bogdan Fazakas
2cce93d502 fetch asset list prices from the graph 2021-04-09 12:55:18 +03:00
claudiaHash
36084fbc1f
output datatoken symbol for each asset in asset selection (#477)
Co-authored-by: claudia.holhos <claudia.holhos@hpm.ro>
2021-04-06 09:49:16 +02:00
432961b278
Merge branch 'main' into feature/compute 2021-04-01 17:29:29 +02:00
Bogdan Fazakas
18f2c99e78
Start compute job (#439)
* Wip start compute job

* Wip select algorithm design

* Asset selection form component, for start compute job (#442)

* prototype AssetSelection

* assetselection styling

* typing "fix"

* put back file info icon

* AssetSelection styling in context

* update start job method, fixed algo select, and fixed option typing

* compute logic update

* add has previous orders for algo asset

* fixed search algorithm assets in start compute form

* fixed lint errors

* updated previous order for algo logic and compute flow

* update use price hook and added buy DT for algo

* display only alg of type exchange and sort by value

* display only trusted algo for asset if field is set

* added logic for allow all published algorithms or no algorithms allowed

* asset selection style & spacing tweaks

* refactor get algorithms for compute and edit compute

* fixed form options and more refactoring

* new ButtonBuy component

* shared component between consume/compute
* dealing with various states: loading, previous orders, help text output

* effect dependencies

* move error output into toast

* formik data flow refactor

* ditch custom field change handler
* fix initialValues
* typed form data & validation
* fixes multiple form validation issues along the way

* isInitialValid → validateOnMount

* metadata display tweaks

* error feedback tweaks

* oler assets checks, confeti on succes job, market fee on order, removed algo compute logic

* more startJob logging

* feedback & messaging changes

* metadata display

* return all algos, fixed & dynamic priced ones

* fix DOM nesting

* messaging updates

* copy tweaks

* check algorithm previous history for both acces and compute sercive types

* handle start compute error

* extra checks on start compute response

* styling tweaks, fix toast UI errors

* AssetSelection: empty screen, tweak min/max height

* fix FRE issues on start compute

* check is ordarable before start compute job

* logging tweaks

* disable eslint no-unused-vars rule for some Apollo code blocks

* fix metadata editing for compute assets

* consider dataset timeout for compute too

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2021-04-01 17:21:08 +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
6d14181d17
Merge branch 'main' into feature/compute 2021-03-26 12:24:09 +01:00
Norbi
977a38e118
Edit compute dataset (#417)
* WIP

* created form for editing compute privacy

* used editComputePrivacy method

* select and update trusted algorithm

* display and select multiple trusted algorithms

* fixed update when trusted algorithm list not changed

* code refactoring

* moved separator inside condition

* moved functions and interface from EditComputeDataset component

* moved algorithmOptions to parent component

* used AssetSelection to display algorithms

* use AssetSelection to select trusted algorithms

* getAlgorithmsOptions function review

* review fixes

* removed unused imports

* merge fixes

* AssetSelection style & usability tweaks

* use custom radio & checkbox styles
* add simple search for name & DID
* spacing adjustments

* copy updates, remove raw algo input, hardcode allowRawAlgorithm

* copy

* AssetSelection usability tweaks

* make rows clickable
* tweak layout, style and markup

* use formik set function to update values

* sorted algorithm list, added checked field

* sort assetSelection list on user select

* fix getAlgorithmsForAssetSelection breaking on empty responses

* form debug output

* another empty publisherTrustedAlgorithms fix

* created separate algorithms state for the form, sort list on edit

* refactor

* use Formik functionality wherever possible
* unify transforming form data to final data

* fix form debug transformation

* fix form submit, fix defaultChecked

* refactor

* use Formik functionality wherever possible
* unify transforming form data to final data

* fix form debug transformation

* fix form submit, fix defaultChecked

* disable assetSelection when allowAllAlgorithms is true

* added loader to AssetSelection

* changed allowAllAlgorithms to allowAllPublishedAlgorithms

* fixed lint error

* updated transformComputeFormToServiceComputePrivacy

* lint fix

* modify publish defaults

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2021-03-25 08:34:07 +01:00
Norbi
ed9eb61c1c
Add custom token from the wallet (#437)
* WIP

* added button that allows to push custom token to metamask

* added image url

* use provider from ocean, add mOCEAN symbol to Matic

* use token symbol based on networkId

* removed customToken.json, used Logger to display message

* log error

* fixed log

* review fixes

* used oceanTokenSymbol from config

* getOceanConfig fix
2021-03-22 12:48:28 +01:00
df587bb5b5
Merge branch 'main' into feature/compute 2021-03-17 12:58:13 +01:00
bdccb0966f
Web3/Ocean splitup + full Polygon/Matic support (#433) 2021-03-17 11:44:26 +01:00
Bogdan Fazakas
d1c4cdb29f
Merge branch 'main' into feature/compute 2021-03-05 13:51:26 +02:00
8737264816
refactor network name output (#421)
* refactor network output

* fetch chain & network metadata from @ethereum-lists/chains

* typed responses

* switch warning icon for testnet badge

* add supportedNetworks list, output warning based on it

* markup & spacing tweaks

* check networkId against ocean.js ConfigHelper

* remove supportedNetworks app config

* fetch EVM networks metadata on build time

* fixes
2021-03-04 18:16:20 +01:00
Bogdan Fazakas
32ff7af3ce
Merge branch 'feature/compute' into publish-algo 2021-03-03 16:13:03 +02:00
Bogdan Fazakas
188f60e7de replaced local isUrl with is-super-url 2021-03-03 09:56:29 +02:00
Norbi
0b942de217 added function to get only the name of the asset 2021-03-01 11:51:24 +02:00
Bogdan Fazakas
f4f7ecefc8 run validation only when custom image is selected 2021-02-26 16:15:41 +02:00
Bogdan Fazakas
cdd5c5cf16 WIP validate for dockerhub images and 3rd party images 2021-02-25 23:05:30 +02:00
433af0147a
switch IPFS gateway (#404)
* switch to dweb.link for loading 3Box profile images
* ipfs.oceanprotocol.com has been deprecated
2021-02-25 16:00:42 +02:00
Bogdan Fazakas
e92f759898 set default pre-defined docker image and renamed version field to docker image tag 2021-02-24 11:25:52 +02:00
Bogdan Fazakas
2f1bd399f8 refactor metadata types for publish forms 2021-02-19 17:51:40 +02:00
Bogdan Fazakas
707045071a added support for custom docker images 2021-02-18 14:53:32 +02:00
Bogdan Fazakas
18cd6b6f01 WIP publish algorithm 2021-02-16 11:27:02 +02:00
Bogdan Fazakas
3e2ad9674c
set default value for contentLenght if not received from provider (#372) 2021-02-10 14:24:16 +01:00
Bogdan Fazakas
c72dfb6ced
Fileinfo replacement (#352)
* replaces market fileinfo with provider file info

* removed test for replaced getFileInfo method

* updated toast messages
- if uploaded file when no web3 wallet is connected
- if file is not valid

* used provider api to check file'

* moved get fileinfo logic to provider.ts

* cancel fileinfo req on unmount

* reduced fileinfo method complexity

* canceltoken passed to fileinfo issue
2021-02-04 15:45:21 +01:00
mihaisc
ab609b93c0
refetch balance (#357) 2021-01-29 16:21:34 +02:00
a760935564
Add Portis wallet connection (#291)
* add portis

* library loading tinkering

* bump packages

* typings fix

* pip as addon

* remove setuptools

* revert typings fix

* modal styling

* show portis button

* provider name workaround

* for faulty getInjectedProviderName()
* fixes https://github.com/oceanprotocol/market/issues/332

* more usage of provider info object

* output respective wallet logos

* add network switcher for Portis

* add functionality

* prototype for portis network switching

* improve user experience when reconnecting to cached provider

* support mainnet only, leave networking switching code commented out
2021-01-29 13:40:54 +01:00
Norby
a2fe2fdee0
Set, edit, and display timeout (#324)
* added timeout to publish asset

* add timeout to edit asses(wip)

* added timout to edit metadata form

* fixed wrong constant name

* fix options autosorting

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

* Fixed autosorting in edit form

* Added "1 day" to timeout options

* Changed ternary operators to switch

* Feature/asset timeout (#325)

* Compute asset timeout

* Code styled

* Deleted unused import

* Display timeout for buy/download

* Switch case for timeout values

* Moved mapping function to /utils/metadata

* display timeout option not matching defined ones, map seconds to string

* handle update with no predefined timeout value, add weeks to map method

* Display timeout on button

* consume button text logic change

* whoops, revert wrong change

* small millisecondsToStr refactor

* copy tweaks

* template literal logic restore

* keep tweaking help text logic

* abstract into method
* change whole condition logic
* tweak hasDatatoken/hasPreviousOrder combination condition

* Unified seconds to string conversion methods

* getHelpText tweaks, small refactor

* copy editing, limit hardcoded timeout list

* fix mixup of map & filter

* use Timeout as label and be done with it

Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
Co-authored-by: claudiaHash <49017601+claudiaHash@users.noreply.github.com>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
Co-authored-by: Claudia Holhos <clawww1996@gmail.com>
2021-01-22 17:12:48 +01:00
de1bc11efe
add ropsten to network detection utilities (#294)
* add ropsten to network detection utilities

* mention ropsten in publish warning

* bump @oceanprotocol/lib
2020-12-11 18:30:51 +01:00
mihaisc
072a4475eb
update 3box url (#298) 2020-12-10 16:04:35 +02: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
c57731cd0b
restore WalletConnect (#290)
* restore WalletConnect

* bump @oceanprotocol/react

* visual fixes for walletconnect modal
2020-12-03 14:54:14 +01:00
mihaisc
dac47bf524
3Box publisher profiles (#264)
* install 3box

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

* tinkering

* check tweak

* load library on init only

* add profile

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

* get 3box profile

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

* fix return type

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

* remove console.log

* fix travis

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

* fix eslit

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

* fix travis

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

* 3box data structure tweaks, prepare output in byline

* refactor

* new Publisher component

* tweaks

* remove data partners

* link/profile splitup

* profile tweaks

* component splitup

* lots of styling, add image

* affordance for publisher, refactor, server response tinkering

* use 3Box proxy

* open all 3box links in new tab/window

* mobile fixes

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2020-11-27 12:04:35 +01:00
a7a29a6c63
fix AssetListTitle (#270)
* fix AssetListTitle

* asset provider fix
2020-11-23 15:46: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
2437b72ea3
directly hit Aquarius API for front-page queries (#262)
* directly hit Aquarius for front-page queries

* refactor, use custom queryMetadata util

* parallelize front-page queries
2020-11-18 17:51:42 +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
2063f594f6
disable walletconnect, metamask download fallback (#183) 2020-10-30 20:55:09 +01:00
99334f4d74
refactor pool data flow 2020-10-26 18:13:12 +01:00
mihaisc
ebc1e22d88
fix
Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2020-10-23 18:56:04 +03:00
mihaisc
ec28ef546c
fix compute previous order
Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2020-10-23 18:33:39 +03:00
mihaisc
7b0af5e062
Merge branch 'main' into feature/previousOrders 2020-10-23 16:40:01 +03:00
6e589949b4
refactor network messaging 2020-10-23 13:38:12 +02:00
mihaisc
95c65b7461
update hooks, refactor
Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
2020-10-23 14:10:24 +03:00
fe28e7d182
disable Torus provider
* prevents SSR build, so disable until further investigation
2020-10-16 11:56:17 +02:00
3ea627df8d
remove lazy loading of wallet provider packages
* closes #111
2020-10-16 10:19:04 +02:00
68ed8fd348
chainId → networkId 2020-10-02 13:41:00 +02:00
3a72d670fd
remove unused methods/hooks/components 2020-09-24 12:26:23 +02:00
b09c1dbc27
typing fixes 2020-09-23 14:54:56 +02:00
b09e3acb12
lint fixes 2020-09-08 13:55:04 +02:00
49ac2ba909
fileinfo API tweaks 2020-09-02 13:18:48 +02:00
mihaisc
3c1c6418d9 Merge branch 'main' into feature/config 2020-08-11 15:34:39 +03:00
5ce00c9ddc
use decimal.js for price comparison 2020-08-11 09:30:17 +02:00
062530f523
refactor 2020-08-11 09:14:44 +02:00
148f11fc4f
fixes 2020-08-11 08:44:31 +02:00
8d8336d169
lift price up, handle balance check 2020-08-11 07:34:32 +02:00
5c61725a1e
any solves everything 2020-07-31 13:04:52 +02:00
2bf5c1a8cd
dynamic loading of provider packages 2020-07-31 12:53:08 +02:00
90b4f4bb47
disable torus for now 2020-07-31 12:02:00 +02:00
8183f2edde
refactor web3modal options 2020-07-30 23:37:27 +02:00
f327ec0e43
network config refactor 2020-07-22 13:56:42 +02:00
bf0375f58f
more config refactor 2020-07-22 13:43:20 +02:00
e9f39be9c3
add Torus wallet 2020-07-22 12:31:49 +02:00
fd3a436a31
more config refactor 2020-07-22 12:20:55 +02:00
cb4850835d
remove api directory, remove redeploy action 2020-07-20 22:16:59 +02:00
cea8c7883a
output new balance object from react hooks 2020-07-20 13:22:36 +02:00
c5a3715982
code splitting and cleanup 2020-07-18 01:52:08 +02:00
8f9f3303de
kick out file API 2020-07-17 12:33:44 +02:00
c19cdcd9da
fix most metadata typings 2020-07-16 13:39:02 +02:00
1afcd45882
adapt network message based on configured networks 2020-07-15 22:21:57 +02:00
6e996a1767
web3modal styling and interaction tweaks 2020-07-15 19:10:25 +02:00
c533194392
fix all the things by removing Rating altogether 2020-07-15 13:54:37 +02:00
7a9e658d03
add infura project id 2020-07-15 13:54:36 +02:00
4f61154996
adapt network detection 2020-07-15 13:54:36 +02:00
9991c5452f
comment out compute component for now 2020-07-15 13:54:36 +02:00
27779d538b
pass providers to web3modal 2020-07-15 13:54:36 +02:00
7b6cb91410
kick out squid-js, replace with lib 2020-07-15 13:54:35 +02:00
e06e743320
put back price conversion component 2020-07-13 23:45:20 +02:00
aa3244eedf
file api & toast fixes 2020-07-10 17:37:45 +02:00
cd88cb41e5
remove json-schema-form, replace with Formik 2020-07-09 15:31:47 +02:00
1de31e4eff
consolidate actual app config 2020-07-08 15:15:02 +02:00
6f9bf0176f
refactor Next.js pages into Gatsby pages 2020-06-30 12:56:50 +02:00
mihaisc
5f14e431da transactions, job details 2020-06-02 12:15:21 +03:00
mihaisc
87ac5ea76b tests and partial compute 2020-05-13 20:34:47 +03:00
alexcos20
ebd5ba9495 first commit 2020-05-07 09:03:30 +03:00