start stitching
This commit is contained in:
parent
fad4e7a174
commit
5f91461799
3 changed files with 23 additions and 6 deletions
|
|
@ -22,11 +22,7 @@ const OfferDetailsSet = sequelize.define(
|
||||||
type: DataTypes.NUMBER,
|
type: DataTypes.NUMBER,
|
||||||
allowNull: false,
|
allowNull: false,
|
||||||
},
|
},
|
||||||
min_trade_amount_eur: {
|
trade_amount_eur: {
|
||||||
type: DataTypes.NUMBER,
|
|
||||||
allowNull: false,
|
|
||||||
},
|
|
||||||
max_trade_amount_eur: {
|
|
||||||
type: DataTypes.NUMBER,
|
type: DataTypes.NUMBER,
|
||||||
allowNull: false,
|
allowNull: false,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,23 @@ function validateBitcoinMethodCheckboxes(clickedCheckbox) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function publishOffer() {
|
||||||
|
// read info from all elements
|
||||||
|
// compose a json
|
||||||
|
// hit the endpoint
|
||||||
|
|
||||||
|
const offerDetails = {
|
||||||
|
wants: 'BTC',
|
||||||
|
premium: '0',
|
||||||
|
trade_amount_eur: '100',
|
||||||
|
location_details: 'this and there',
|
||||||
|
time_availability_details: 'then and then',
|
||||||
|
is_onchain_accepted: true,
|
||||||
|
is_lightning_accepted: true,
|
||||||
|
are_big_notes_accepted:
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
buttonStartCreateOffer.addEventListener('click', () => {
|
buttonStartCreateOffer.addEventListener('click', () => {
|
||||||
toggleCreateOfferControls();
|
toggleCreateOfferControls();
|
||||||
});
|
});
|
||||||
|
|
@ -139,4 +156,8 @@ for (const btcMethodCheckbox of btcMethodCheckboxes) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishOfferButton.addEventListener('click', () => {
|
||||||
|
publishOffer();
|
||||||
|
});
|
||||||
|
|
||||||
updateBtcInput();
|
updateBtcInput();
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
Tu precio: <span id="offer-price">90 000</span>€/BTC
|
Tu precio: <span id="offer-price">90 000</span>€/BTC
|
||||||
<span>
|
<span>
|
||||||
</p>
|
</p>
|
||||||
<p id="offer-price-paragraph">(Precio mercado: <span>83 000</span>€/BTC)</span></p>
|
<p id="market-price-paragraph">(Precio mercado: <span>83 000</span>€/BTC)</span></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue