start stitching

This commit is contained in:
counterweight 2025-02-25 14:01:25 +01:00
parent fad4e7a174
commit 5f91461799
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
3 changed files with 23 additions and 6 deletions

View file

@ -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,
}, },

View file

@ -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();

View file

@ -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>