Skip to content

Commit

Permalink
fix: ui test blocked by wallet connect modal (#1902)
Browse files Browse the repository at this point in the history
  • Loading branch information
nya-elimu authored Sep 29, 2024
2 parents 9adee18 + c55e2a3 commit a16ec9b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 24 deletions.
5 changes: 0 additions & 5 deletions src/main/webapp/WEB-INF/jsp/admin/layout.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script>
<script src="<spring:url value='/static/js/init.js' />"></script>
<script src="<spring:url value='/static/js/difflib-0.2.4.min.js' />"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/web3.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/index.js"></script>
<script type="text/javascript" src="https://unpkg.com/@walletconnect/[email protected]/dist/umd/index.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/fortmatic.js"></script>
<script src="<spring:url value='/static/js/web3provider.js' />"></script>
<%@ include file="/WEB-INF/jsp/error/javascript-error.jsp" %>
</head>

Expand Down
5 changes: 0 additions & 5 deletions src/main/webapp/WEB-INF/jsp/analytics/layout.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script>
<script src="<spring:url value='/static/js/init.js' />"></script>
<script src="<spring:url value='/static/js/difflib-0.2.4.min.js' />"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/web3.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/index.js"></script>
<script type="text/javascript" src="https://unpkg.com/@walletconnect/[email protected]/dist/umd/index.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/fortmatic.js"></script>
<script src="<spring:url value='/static/js/web3provider.js' />"></script>
<%@ include file="/WEB-INF/jsp/error/javascript-error.jsp" %>
</head>

Expand Down
6 changes: 0 additions & 6 deletions src/main/webapp/WEB-INF/jsp/content/layout.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script>
<script src="<spring:url value='/static/js/init.js' />"></script>
<script src="<spring:url value='/static/js/difflib-0.2.4.min.js' />"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/web3.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/index.js"></script>
<script type="text/javascript" src="https://unpkg.com/@walletconnect/[email protected]/dist/umd/index.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/fortmatic.js"></script>
<script src="<spring:url value='/static/js/web3provider.js' />"></script>
<%@ include file="/WEB-INF/jsp/error/javascript-error.jsp" %>
</head>

Expand Down
5 changes: 0 additions & 5 deletions src/main/webapp/WEB-INF/jsp/layout.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script>
<script src="<spring:url value='/static/js/init.js' />"></script>
<script src="<spring:url value='/static/js/difflib-0.2.4.min.js' />"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/web3.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/index.js"></script>
<script type="text/javascript" src="https://unpkg.com/@walletconnect/[email protected]/dist/umd/index.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/fortmatic.js"></script>
<script src="<spring:url value='/static/js/web3provider.js' />"></script>
<%@ include file="/WEB-INF/jsp/error/javascript-error.jsp" %>
</head>

Expand Down
10 changes: 7 additions & 3 deletions src/main/webapp/WEB-INF/jsp/sign-on-web3.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,20 @@
</svg>
Connect wallet
</a>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/web3.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.min.js"></script>
<script src="https://unpkg.com/@walletconnect/[email protected]/dist/umd/index.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/fortmatic.js"></script>
<script src="<spring:url value='/static/js/web3provider.js' />"></script>
<script>
$(function() {
// When the connect button is pressed, request to view providers
$('#connectWeb3Wallet').click(async function() {
console.info('#connectWeb3Wallet click');
try {
// Request permission to connect to Web3 provider
const provider = await connect()
const provider = await connect();
window.web3 = new Web3(provider);
// Request the currently selected address
Expand All @@ -47,7 +51,7 @@
// Request signature to verify ownership of the address
window.web3.eth.personal.sign('I verify ownership of this account 👍', address)
.then(signature => {
console.info('Signature provided. Logging in...');
console.info('Signature provided. Signing on...');
// Add ETH address and signature to the form to be submitted
$('#web3SignOnForm [name="address"]').val(address);
Expand Down

0 comments on commit a16ec9b

Please sign in to comment.