forked from peter-evans/erc20-token-wallet
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.htm
More file actions
44 lines (44 loc) · 1.6 KB
/
Copy pathindex.htm
File metadata and controls
44 lines (44 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html>
<head>
<title>Avocado Wallet</title>
<link rel="shortcut icon"
type="image/png"
href="avocado-icon.png">
<link rel="stylesheet" type="text/css" href="index.css">
</head>
<body>
<div class="circle" id="main">
<header>
<h1>Avocado Wallet</h1>
</header>
<div class="panel">
<div class="field">Wallet Address: <div class="field-value" id="address"></div></div>
<div class="field">ETH balance: <div class="field-value" id="ethBalance"></div></div>
<div class="field">Token balance: <div class="field-value" id="tokenBalance"></div></div>
</div>
<div class="panel">
<div class="field">Send <input type="text" id="transferValue" size="10" /> <div class="field-value" id="tokenSymbol"></div></div>
<div class="field">To address: <input type="text" id="recipientAddress" size="50" /></div>
<div class="button"><a class="btn" href="#" onclick="transferTokens()">Send</a></div>
</div>
<div class="panel">
<div id="transferResult"></div>
</div>
</div>
<script src="web3/dist/web3.min.js"></script>
<script src="index.js"></script>
<script>
window.addEventListener('load', function() {
// Check if Web3 has been injected by the browser (Mist/MetaMask)
if (typeof web3 !== 'undefined') {
// Use Mist/MetaMask's provider
web3 = new Web3(web3.currentProvider);
startApp();
} else {
displayProviderInfo();
}
});
</script>
</body>
</html>