Skip to content

Commit

Permalink
Minor UI fix
Browse files Browse the repository at this point in the history
  • Loading branch information
luloxi committed Oct 20, 2024
1 parent 3f2211e commit 42fd499
Show file tree
Hide file tree
Showing 6 changed files with 352 additions and 8 deletions.
8 changes: 8 additions & 0 deletions packages/backend/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const { Web3 } = require("web3");

const getFaucet = async () => {
const web3 = new Web3("rpc");

const accounts = await web3.eth.getAccounts();
return accounts[0];
};
14 changes: 14 additions & 0 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "backend",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"web3": "^4.13.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const AddressQRCodeModal = ({ address, modalId }: AddressQRCodeModalProps
</CopyToClipboard>
<label
htmlFor={`${modalId}`}
className="btn text-xl rounded-full bg-red-600 hover:bg-red-500 btn-ghost btn-sm btn-circle absolute right-3 top-3"
className="btn text-xl rounded-full text-white bg-red-600 hover:bg-red-500 btn-ghost btn-sm btn-circle absolute right-3 top-3"
>
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ export const AddressQRCodeModal = ({ address, modalId }: AddressQRCodeModalProps
</div>
<div className="break-words whitespace-pre-wrap text-center w-full">{address}</div>
<CopyToClipboard text={address} onCopy={handleCopy}>
<button className="btn btn-primary bg-green-600 hover:bg-green-500 active:bg-green-500 mt-4">
<button className="btn btn-primary text-white border-0 bg-green-600 hover:bg-green-500 active:bg-green-500 mt-4">
{copied ? "Copied!" : "Copy Address"}
</button>
</CopyToClipboard>
<label
htmlFor={`${modalId}`}
className="btn text-xl rounded-full bg-red-600 hover:bg-red-500 btn-ghost btn-sm btn-circle absolute right-3 top-3"
className="btn text-xl rounded-full text-white bg-red-600 border-0 hover:bg-red-500 btn-ghost btn-sm btn-circle absolute right-3 top-3"
>
</label>
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/components/scaffold-eth/FaucetButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const FaucetButton = () => {
}
};

// Render only on local chain
// // Render only on local chain
if (ConnectedChain?.id !== hardhat.id) {
return null;
}
Expand Down
Loading

0 comments on commit 42fd499

Please sign in to comment.