diff --git a/app/js/components/ship.js b/app/js/components/ship.js index d091665..6675b2c 100644 --- a/app/js/components/ship.js +++ b/app/js/components/ship.js @@ -40,14 +40,16 @@ class Ship extends Component { } sellShip = () => { - // TODO: vender una nave para que otro usuario la pueda comprar - // En props esta el atributo 'id', que podemos usar para determinar el id del token - // El precio esta en el estado this.state.sellPrice - + // ============== BEGIN: Function implementation here ================ // + + // TODO: Sell a ship, using this.props.id and this.state.sellPrice + this.setState({isSubmitting: true}); - // Llamar la siguiente funcion para refrescar las listas - this.props.onAction(); + this.props.onAction(); // Refresh token lists this.setState({isSubmitting: false}); + + // ============== END: Function implementation here ================ // + } buyFromStore = () => { @@ -61,13 +63,14 @@ class Ship extends Component { } buyFromMarket = () => { - // TODO: comprar tokens puestos a la venta por otra persona - // En props esta el 'saleId' y 'price' para poder comprarlo + // ============== BEGIN: Function implementation here ================ // + + // TODO: Buy a token from the marketplace using this.props.saleId, and this.props.price this.setState({isSubmitting: true}); - // Llamar la siguiente funcion para refrescar las listas this.props.onAction(); this.setState({isSubmitting: false}); + // ============== END: Function implementation here ================ // } render(){ diff --git a/app/js/components/shipList.js b/app/js/components/shipList.js index 90348b3..6ef6227 100644 --- a/app/js/components/shipList.js +++ b/app/js/components/shipList.js @@ -24,13 +24,13 @@ class ShipList extends Component { } enableMarketplace = () => { - // TODO: esta funcion la llama el toggle de mas abajo cuando se clickea - // Debe setear siempre el valor de 'salesEnabled' - // Las siguientes lineas solo muestran el funcionamiento en el UI - // pero debe implementarse creando una transaccion + // ============== BEGIN: Function implementation here ================ // + // TODO: this function is called when we click on the toggle. + // Must set the state this.state.salesEnabled this.setState({isSubmitting: true}); this.setState({salesEnabled: !this.state.salesEnabled}); this.setState({isSubmitting: false}); + // ============== END: Function implementation here ================ // } render = () => { diff --git a/config/storage.js b/config/storage.js index cd7d066..3feb5cb 100644 --- a/config/storage.js +++ b/config/storage.js @@ -40,8 +40,8 @@ module.exports = { provider: "ipfs", host: "ipfs.infura.io", port: 5001, - protocol: "http", - getUrl: "http://ipfs.infura.io/ipfs/" + protocol: "https", + getUrl: "https://ipfs.infura.io/ipfs/" } ] }