From 92bdd39b76210f57e0b88960209c98e3102af85e Mon Sep 17 00:00:00 2001
From: nahuhh <50635951+nahuhh@users.noreply.github.com>
Date: Thu, 17 Oct 2024 22:50:03 +0000
Subject: [PATCH] update: add fix for updates from v0.12.7

---
 bsx/update.sh | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/bsx/update.sh b/bsx/update.sh
index eba8153..3e60f64 100755
--- a/bsx/update.sh
+++ b/bsx/update.sh
@@ -1,5 +1,4 @@
 #!/bin/bash
-COINCURVE=0.2
 
 echo "Updating BasicSwapDEX" && sleep 1
 # Delete dangling build folder. Same as --no-cache for docker
@@ -9,10 +8,14 @@ rm -rf $SWAP_DATADIR/basicswap/build
 # Switch to new repo: basicswap/basicswap
 cd $SWAP_DATADIR/basicswap
 git remote set-url origin https://github.com/basicswap/basicswap
-# git checkout master
-git pull
 
-# Update BasicSwap
+# Conflicting messages_pb2.py from v0.12.7
+if [[ -f basicswap/messages_pb2.py ]]; then
+    git restore basicswap/messages_pb2.py
+fi
+
+#git checkout master
+git pull
 $SWAP_DATADIR/venv/bin/pip install -r requirements.txt --require-hashes
 $SWAP_DATADIR/venv/bin/pip install .