Minor improvements

This commit is contained in:
Tornado Contrib 2024-10-08 14:42:36 +00:00
parent a329f71450
commit da329ad5dc
Signed by: tornadocontrib
GPG Key ID: 60B4DF1A076C64B1

@ -74,12 +74,11 @@
<script>
/*global $, bootstrap, ethers, Tornado, TornadoContracts, moment*/
const VERSION = '1.0.0';
const STATIC_VERSION = '1.0.1';
const DONATION_ADDRESS = '0x40c3d1656a26C9266f4A10fed0D87EFf79F54E64';
const DEFAULT_GAS_LIMIT = 600_000;
const JSDELIVR = `https://cdn.jsdelivr.net/npm/tornado-cdn@${STATIC_VERSION}`;
const JSDELIVR = `https://cdn.jsdelivr.net/npm/tornado-cdn@1.0.1`;
const hashes = {
'static/bootstrap.css': 'sha384-fFdbKP4R+XqHQe6s9a3iwvJNSdnss6J7lrJrXGOUQiVdgax4hQruz6q/ay6OVpte',
@ -862,6 +861,11 @@
method: 'GET',
});
if (!resp.ok) {
const errMsg = `Failed to fetch worker from ${remote_url}: ${await resp.text()}`
throw new Error(errMsg);
}
const hash = 'sha384-' + Tornado.bytesToBase64(await Tornado.digest(await resp.arrayBuffer()));
if (hash !== hashes[`static/${fileName}`]) {
@ -1626,7 +1630,7 @@
await loadSettings();
await getAllRelayers();
const parseInput = async () => {
const parseInput = () => {
const { note, netId, currency, amount } = getNote() || {};
if (!note) {