This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Calcula el precio de liquidaci贸n de EGLD para una posici贸n en USH en MultiversX. | |
* @param {number} egldCollateral - Cantidad de EGLD usado como colateral. | |
* @param {number} ushPercentage - Porcentaje del valor del colateral que se mintea como USH (ej: 50 para 50%). | |
* @param {number} liquidationThreshold - Umbral de liquidaci贸n como porcentaje (ej: 75 para 75%). | |
* @param {number} egldPrice - Precio actual de EGLD en USD. | |
* @returns {number} - Precio de EGLD en USD en el que ocurrir铆a la liquidaci贸n. | |
*/ | |
function calculateLiquidationPrice(egldCollateral, ushPercentage, liquidationThreshold, egldPrice) { | |
if (egldCollateral <= 0 || ushPercentage <= 0 || liquidationThreshold <= 0 || egldPrice <= 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(async () => { | |
function sleep(ms) { | |
return new Promise((resolve) => setTimeout(resolve, ms)); | |
} | |
const acceptButtons = document.querySelectorAll('[aria-label*="Accept"]'); | |
for (const acceptButton of acceptButtons) { | |
acceptButton.click() | |
await sleep(2000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'stable', |