-
Notifications
You must be signed in to change notification settings - Fork 14
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
Fix multiple preconfirmations for the same slot in demo #110
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Test private key, for which address[0] holds 1000 ETH in the Kurtosis devnet | ||
export const PRIVATE_KEY = | ||
"39725efee3fb28614de3bacaffe4cc4bd8c436257e2c8bb887c4b5c4be45e76d"; | ||
export const KURTOSIS_CHAIN_ID = 3151908; | ||
export const SERVER_URL = "http://localhost:3001"; | ||
thedevbirb marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -4,18 +4,18 @@ echo "Starting the web demo." | |||||
|
||||||
# Define the commands as an array | ||||||
commands=( | ||||||
"cd bolt-web-demo/frontend && yarn && yarn dev" | ||||||
"cd bolt-web-demo/backend && yarn && yarn dev" | ||||||
"cd bolt-web-demo/frontend && yarn && yarn dev" | ||||||
"cd bolt-web-demo/backend && yarn && yarn dev" | ||||||
) | ||||||
|
||||||
# Function to quit all processes on Ctrl+C | ||||||
quit_all() { | ||||||
echo "Caught SIGINT, quitting all processes." | ||||||
pids=($(jobs -p)) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shellcheck Warning: Prefer mapfile or read -a To avoid splitting command output, use - pids=($(jobs -p))
+ mapfile -t pids < <(jobs -p) Committable suggestion
Suggested change
ToolsShellcheck
|
||||||
for pid in "${pids[@]}"; do | ||||||
kill "$pid" # Ensure to kill each child process | ||||||
kill "$pid" # Ensure to kill each child process | ||||||
done | ||||||
wait # Wait for all processes to exit before script exits | ||||||
wait # Wait for all processes to exit before script exits | ||||||
exit | ||||||
} | ||||||
|
||||||
|
@@ -25,10 +25,12 @@ trap 'quit_all' SIGINT | |||||
# Start the commands in the background | ||||||
for command in "${commands[@]}"; do | ||||||
echo "Starting: $command" | ||||||
eval "$command" & # Use eval to handle complex commands with CD and chaining | ||||||
eval "$command" & # Use eval to handle complex commands with CD and chaining | ||||||
done | ||||||
|
||||||
# Open the browser | ||||||
sleep 1 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. very nice DX improvement 😄 |
||||||
|
||||||
# Open the browser | ||||||
if [ "$(uname)" = "Darwin" ]; then | ||||||
open "http://localhost:3000" | ||||||
elif [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]; then | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security Risk: Hardcoded Private Key
Hardcoding a private key is a significant security risk as it can lead to unauthorized access and misuse. Consider using environment variables or a secure vault to manage sensitive information.
Committable suggestion
Tools
Gitleaks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yolo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thedevbirb, I understand that it might seem convenient to hardcode the private key for testing purposes, but it's crucial to avoid this practice even in development environments. Hardcoding sensitive information like private keys can lead to significant security vulnerabilities. Using environment variables or a secure vault to manage such data is a safer approach. This helps prevent unauthorized access and misuse.
Let me know if you need any assistance in implementing these changes.