Skip to content

Commit

Permalink
Added new firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterjm committed May 6, 2024
1 parent d696239 commit 8c9a5cf
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
Binary file modified static/firmware/ESP32_3248S035C/firmware.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion static/firmware/ESP32_3248S035C/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "BitcoinTaps PartyTap",
"version": "839351",
"version": "842209",
"new_install_prompt_erase": true,
"builds": [
{
Expand Down
12 changes: 9 additions & 3 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,17 @@ async def task_create_offline_payment(request: Request, device_id: str, encrypte
break
if not switch:
raise HTTPException(
status_code=HTTPStatus.NOT_FOUND, detail="swwitch does not exist"
status_code=HTTPStatus.NOT_FOUND, detail="switch does not exist"
)

# extract PIN
secret_pin = decrypted_message[9:15].decode()
decrypted_pin_part = decrypted_message[9:16].decode()
result = decrypted_pin_part.find(':')
if result == -1:
raise HTTPException(
status_code=HTTPStatus.NOT_FOUND, detail="Incorrect payload"
)
secret_pin = decrypted_pin_part[:result]

# determine price
price_msat = int((
Expand Down Expand Up @@ -209,7 +215,7 @@ async def task_send_switches(device_id: str):
"event":"switches",
"switches": [],
"key": device.key,
"version": "839351"
"version": "842209"
}

for _switch in device.switches:
Expand Down
2 changes: 1 addition & 1 deletion templates/partytap/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ <h6 class="text-subtitle1 q-my-none">
data: function () {
return {
tab: 'mails',
version: '839351',
version: '842209',
hostname: window.location.host,
protocol: window.location.protocol,
location: window.location.hostname,
Expand Down
3 changes: 3 additions & 0 deletions templates/partytap/paid.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ <h3 class="q-my-none">{{ pin }}</h3>
<br />
</center>
</q-card-section>
<q-card-section class="q-pa-none">
https://www.bitcointaps.com/
</q-card-section>
</q-card>
</div>

Expand Down
3 changes: 1 addition & 2 deletions views_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
delete_device,
get_device,
get_devices,
update_device,
get_payment
update_device
)
from .tasks import (
task_create_invoice,
Expand Down

0 comments on commit 8c9a5cf

Please sign in to comment.