1
0
mirror of https://github.com/oceanprotocol/react-tutorial synced 2024-11-22 01:36:58 +01:00
This commit is contained in:
alexcos20 2020-03-25 22:05:04 +02:00
parent 23db8160b9
commit 8822bf7f4f
2 changed files with 18 additions and 18 deletions

View File

@ -10,9 +10,9 @@ export default function Compute({ ocean, web3 }) {
const [agreementId, setAgreementId] = useState('')
const [ddoAlgorithmId, setDdoAlgorithmId] = useState('')
const [divAlgoStyle, setdivAlgoStyle] = useState('')
const [textRawAlgo, settextRawAlgo] = useState('')
const [PublishLogState, setPublishLogState] = useState('')
const [PublishOutputState, setPublishOutputState] = useState('')
const [textRawAlgo, setTextRawAlgo] = useState('')
const [publishLogState, setPublishLogState] = useState('')
const [publishOutputState, setPublishOutputState] = useState('')
// publish a dataset and an algorithm
async function publish() {
try {
@ -60,9 +60,9 @@ export default function Compute({ ocean, web3 }) {
const accounts = await ocean.accounts.list()
const ComputeOutput = {
publishAlgorithmLog:
PublishLogState === '' || PublishLogState === false ? false : true,
publishLogState === '' || publishLogState === false ? false : true,
publishOutput:
PublishOutputState === '' || PublishOutputState === false
publishOutputState === '' || publishOutputState === false
? false
: true,
brizoAddress: ocean.config.brizoAddress,
@ -122,7 +122,7 @@ export default function Compute({ ocean, web3 }) {
}
async function updateRawAlgoCode(event) {
settextRawAlgo(event.target.value)
setTextRawAlgo(event.target.value)
}
async function updateDdoAssetId(event) {
@ -155,13 +155,13 @@ export default function Compute({ ocean, web3 }) {
<ComputeSection>
<input
type="checkbox"
checked={PublishOutputState}
checked={publishOutputState}
onChange={handlePublishOutputState}
/>
Publish Output into the Marketplace
<input
type="checkbox"
checked={PublishLogState}
checked={publishLogState}
onChange={handlePublishLogState}
/>
Publish Algorithm Logs into the Marketplace

View File

@ -22,17 +22,17 @@ class App extends Component {
async componentDidMount() {
const ocean = await new Ocean.getInstance({
web3Provider: web3,
//nodeUri: 'https://nile.dev-ocean.com',
//aquariusUri: 'https://aquarius.marketplace.dev-ocean.com',
//brizoUri: 'https://brizo.marketplace.dev-ocean.com',
//brizoAddress: '0x4aaab179035dc57b35e2ce066919048686f82972',
//secretStoreUri: 'https://secret-store.nile.dev-ocean.com',
nodeUri: 'https://nile.dev-ocean.com',
aquariusUri: 'https://aquarius.marketplace.dev-ocean.com',
brizoUri: 'https://brizo.marketplace.dev-ocean.com',
brizoAddress: '0x4aaab179035dc57b35e2ce066919048686f82972',
secretStoreUri: 'https://secret-store.nile.dev-ocean.com',
// local Spree connection
nodeUri: 'http://localhost:8545',
aquariusUri: 'http://aquarius:5000',
brizoUri: 'http://localhost:8030',
brizoAddress: '0x068Ed00cF0441e4829D9784fCBe7b9e26D4BD8d0',
secretStoreUri: 'http://localhost:12001',
//nodeUri: 'http://localhost:8545',
//aquariusUri: 'http://aquarius:5000',
//brizoUri: 'http://localhost:8030',
//brizoAddress: '0x068Ed00cF0441e4829D9784fCBe7b9e26D4BD8d0',
//secretStoreUri: 'http://localhost:12001',
verbose: true
})
this.setState({ ocean })