Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added radio button toggle to use Web3 provider to send transaction #146

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
"url": "https://github.com/MetaMask/test-dapp/issues"
},
"homepage": "https://metamask.github.io/test-dapp",
"dependencies": {},
"dependencies": {
"web3": "^1.6.1"
},
"devDependencies": {
"@lavamoat/allow-scripts": "^1.0.6",
"@metamask/auto-changelog": "^2.5.0",
Expand Down Expand Up @@ -62,7 +64,12 @@
"sha3": true,
"secp256k1": true,
"keccak": true,
"fsevents": true
"fsevents": true,
"web3": false,
"web3-bzz": false,
"bufferutil": false,
"utf-8-validate": false,
"web3-shh": false
}
}
}
11 changes: 11 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ header {
width: 100%;
}

/* Radio buttons switch */

input[type='radio'] {
transform: scale(1.5);
margin: 0 5px 0 5px;
}

.libraryLabel {
font-size: large;
}

/* Encrypt/Decrypt */

#encryptMessageInput {
Expand Down
10 changes: 10 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ <h1 id="logo-text" class="text-center">
</div>
</header>
<section>
<form name="librarySwitchForm" class="form">
<div class="row justify-content-center">
<div class="justify-content-center">
<input type="radio" id="radio-ethers" name="libraryUsed" value="ethers" />
<label class="libraryLabel">Ethers</label>
<input type="radio" id="radio-web3" name="libraryUsed" value="web3" />
<label class="libraryLabel">Web3</label>
</div>
</div>
</form>
<h3 class="card-title">
Status
</h3>
Expand Down
Loading