diff --git a/src/html/erc20-form.html b/src/html/erc20-form.html index 9e26e258..48710a77 100644 --- a/src/html/erc20-form.html +++ b/src/html/erc20-form.html @@ -194,6 +194,7 @@ disableForm(); + window.dom.show("ethTxModal") try { await window.nep141Xerc20.naturalErc20.sendToNear({ amount: amount.value, @@ -205,6 +206,7 @@ alert("Something went wrong!\n" + e.message); throw e; } finally { + window.dom.hide("ethTxModal") // re-enable the form, whether the call succeeded or failed enableForm(); } diff --git a/src/html/erc20n-form.html b/src/html/erc20n-form.html index d0b5c307..8ebcdd0d 100644 --- a/src/html/erc20n-form.html +++ b/src/html/erc20n-form.html @@ -179,6 +179,10 @@ disableForm(); + window.dom.show("nearTxModal") + // give the user some time to read the redirect information + await new Promise(r => setTimeout(r, 3000)); + try { await window.nep141Xerc20.bridgedNep141.sendToEthereum({ amount: amount.value, @@ -187,6 +191,8 @@ recipient: window.ethUserAddress, }); } catch (e) { + // only hide if error, show until redirect happens + window.dom.hide("nearTxModal") alert( "Something went wrong! " + "Maybe you need to sign out and back in? " + diff --git a/src/html/eth-tx-modal.html b/src/html/eth-tx-modal.html new file mode 100644 index 00000000..65f6b66d --- /dev/null +++ b/src/html/eth-tx-modal.html @@ -0,0 +1,11 @@ + diff --git a/src/html/near-tx-modal.html b/src/html/near-tx-modal.html new file mode 100644 index 00000000..b062a143 --- /dev/null +++ b/src/html/near-tx-modal.html @@ -0,0 +1,14 @@ + diff --git a/src/html/transfers.html b/src/html/transfers.html index a8127cb8..b9b6cbbd 100644 --- a/src/html/transfers.html +++ b/src/html/transfers.html @@ -42,6 +42,7 @@

Remove transfer from list?

+