Skip to content

Commit

Permalink
Merge pull request #172 from Web3Auth/feat/webpack-5
Browse files Browse the repository at this point in the history
Use torus cli 1.0.0
  • Loading branch information
chaitanyapotti authored May 12, 2022
2 parents 6baa401 + c719442 commit d7df364
Show file tree
Hide file tree
Showing 61 changed files with 20,590 additions and 198,109 deletions.
12 changes: 5 additions & 7 deletions examples/getting-started/eth/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h1 class="title"><a target="_blank" href="http://web3auth.io/">Web3Auth</a> ETH

<script src="https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js@1/dist/web3.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@web3auth/web3auth@0/dist/web3auth.umd.min.js"></script>
<script src="./web3auth.umd.min.js"></script>
<script>
const web3authSdk = window.Web3auth;
let web3AuthInstance = null;
Expand Down Expand Up @@ -165,28 +165,27 @@ <h1 class="title"><a target="_blank" href="http://web3auth.io/">Web3Auth</a> ETH
console.error(error.message);
}
});

$("#sign-tx").click(async function (event) {
try {
const provider = web3AuthInstance.provider;
const web3 = new Web3(provider);
const web3 = new Web3(provider);
const accounts = await web3.eth.getAccounts();
const txRes = await web3.eth.signTransaction({
from: accounts[0],
to: accounts[0],
value: web3.utils.toWei("0.01"),
});
$("#code").text(JSON.stringify(txRes));

} catch (error) {
console.error(error.message);
}
});

$("#send-tx").click(async function (event) {
try {
const provider = web3AuthInstance.provider;
const web3 = new Web3(provider);
const web3 = new Web3(provider);
const accounts = await web3.eth.getAccounts();

const message = "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad";
Expand All @@ -196,7 +195,6 @@ <h1 class="title"><a target="_blank" href="http://web3auth.io/">Web3Auth</a> ETH
value: web3.utils.toWei("0.01"),
});
$("#code").text(JSON.stringify(txRes));

} catch (error) {
console.error(error.message);
}
Expand Down
3 changes: 3 additions & 0 deletions examples/getting-started/eth/web3auth.umd.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit d7df364

Please sign in to comment.