Skip to content

Commit

Permalink
btc qr consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
plowsof committed Oct 18, 2024
1 parent 345e980 commit a78b770
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 13 deletions.
30 changes: 23 additions & 7 deletions .github/workflows/hashes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,40 @@ jobs:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get install -y --no-install-recommends curl gpg jq python3-pip
sudo apt-get install -y --no-install-recommends curl gpg jq python3-pip zbar-tools
sudo pip3 install yq
- name: Verify hashes.txt + contributing.yml signature
run: |
curl -sL https://raw.githubusercontent.com/monero-project/monero/master/utils/gpg_keys/binaryfate.asc |
gpg --import
gpg --verify downloads/hashes.txt
# signed by myself for testing purposes only
# Signed by myself for testing purposes only
curl -sL https://raw.githubusercontent.com/plowsof/pgp/refs/heads/main/plowsofsmol.asc | gpg --import
gpg --verify _data/contributing.yml.asc
- name: Verify General Fund donation QR's
run: |
yaml="_data/contributing.yml"
for type in xmr btc; do
checksum=$(awk "/qr_${type}_checksum:/ {print \$2}" "$yaml")
file=$(awk "/qr_${type}_filename:/ {print \$2}" "$yaml")
echo "DEBUG: $checksum $file"
echo "$checksum $file" | sha256sum -c
get_yaml_value() {
awk -v key="$1:" '$1 == key {print $2}' "$yaml"
}
for coin in xmr btc; do
qr_checksum=$(get_yaml_value "qr_${coin}_checksum")
qr_filename=$(get_yaml_value "qr_${coin}_filename")
qr_content=$(get_yaml_value "qr_${coin}_content")
echo "DEBUG: $qr_checksum $qr_filename"
echo "DEBUG: $qr_content"
# Confirm hashes match
echo "$qr_checksum $qr_filename" | sha256sum -c
# Scan QR content
qr_scanned=$(zbarimg -q --raw "$qr_filename")
# Compare scanned content with expected content
if [ "$qr_scanned" = "$qr_content" ]; then
echo "${coin^^} QR code content matches exactly"
else
echo "${coin^^} QR code content does not match"
echo "Scanned: $qr_scanned"
echo "Expected: $qr_content"
fi
done
- name: Verify filenames
run: |
Expand Down
6 changes: 4 additions & 2 deletions _data/contributing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ address_openalias: donate.getmonero.org
view_address: 44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A
view_key: f359631075708155cc3d92a32b75a7d02a5dcf27756707b47a2b31b21c389501
qr_xmr_filename: img/donate-monero.png
qr_xmr_checksum: cf6cb49cf98726a40b860a6bb19df77df724a3e8e1ccb039adf8432de1509911
qr_xmr_content: monero:888tNkZrPN6JsEgekjMnABU4TBzc2Dt29EPAvkRxbANsAnjyPbb3iQ1YBRk1UXcdRsiKc9dhwMVgN5S9cQUiyoogDavup3H
qr_xmr_checksum: 634324cb9d5feaf31cadafa1a62fb78c0c97aac084624ee466354086b2e62f3a
qr_btc_filename: img/donate-bitcoin.png
qr_btc_checksum: ef2b0e59e401caad2393cb11f50dfc29b364e0af0fd5683012fe0abded608655
qr_btc_content: bitcoin:1KTexdemPdxSBcG55heUuTjDRYqbC5ZL8H
qr_btc_checksum: 6f091048b4492d70d7524f78be1af865530ff80b237a5f9b27b1b67dc3ba6c56
8 changes: 4 additions & 4 deletions _data/contributing.yml.asc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-----BEGIN PGP SIGNATURE-----

iI0EABMIADUWIQTci88MUIPyAweCgD5OipEtQO0FLAUCZw/b9xcccGxvd3NvZkBw
cm90b25tYWlsLmNvbQAKCRBOipEtQO0FLLGXAPoC2QGUbBPozZYqbzoJ/dsx+Kr+
4JKe1roJvhgeUJdzMgD/VFJYuetujmhfWvfxjJMBHPMMBdOAmI/iTtMjsITVb5s=
=ptoN
iI0EABMIADUWIQTci88MUIPyAweCgD5OipEtQO0FLAUCZxEYyRcccGxvd3NvZkBw
cm90b25tYWlsLmNvbQAKCRBOipEtQO0FLNUwAP0Wpi8RMJRgSpT/QE1+ZY15gONh
FpuqV6CxTdya/RTOFQD/SP9SUkeQQJXV+nGi7Pj0sEioA3zP7IMN2sZaHu0cBKo=
=lOqi
-----END PGP SIGNATURE-----
8 changes: 8 additions & 0 deletions css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -4705,3 +4705,11 @@ input.accordion[type=radio]:checked + label::after {
.donation-field {
user-select: all; /* Select donation addresses with one click */
}

#qr-link {
all: unset;
}

#qr-link:hover {
cursor: pointer;
}
Binary file modified img/donate-bitcoin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/donate-monero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a78b770

Please sign in to comment.