diff options
author | Matthew Tran | 2023-01-18 17:54:19 -0600 |
---|---|---|
committer | Matthew Tran | 2023-01-18 17:54:19 -0600 |
commit | 3c74e4c4d1c5943c490ce625fa9de98b38488d11 (patch) | |
tree | 7fa1b43ced65cc40df0fabc46613d3e9ad288536 | |
parent | 2d1a3a71887f39c5307c2f8d9105baba1ba3072c (diff) | |
download | aur-3c74e4c4d1c5943c490ce625fa9de98b38488d11.tar.gz |
4.2.13
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 15 | ||||
-rw-r--r-- | fix-bitpay-tests.patch | 26 |
3 files changed, 41 insertions, 10 deletions
@@ -1,7 +1,7 @@ pkgbase = electron-cash pkgdesc = Lightweight Bitcoin Cash wallet - pkgver = 4.2.12 - pkgrel = 2 + pkgver = 4.2.13 + pkgrel = 1 url = http://www.electroncash.org/ arch = any license = MIT @@ -45,9 +45,11 @@ pkgbase = electron-cash optdepends = zbar: QR code reading support provides = electron-cash conflicts = electron-cash - source = electron-cash-4.2.12.tar.gz::https://github.com/Electron-Cash/Electron-Cash/archive/4.2.12.tar.gz + source = electron-cash-4.2.13.tar.gz::https://github.com/Electron-Cash/Electron-Cash/archive/4.2.13.tar.gz source = secp256k1-0.20.9.tar.gz::https://github.com/Bitcoin-ABC/secp256k1/archive/v0.20.9.tar.gz - sha256sums = 566ad3ef041240f306cffac75f36f32ff3205b46030ce6110de4c4ceda9b386f + source = fix-bitpay-tests.patch + sha256sums = b284f18d8f287b90b5f9e3f093774a8034b72080bb82f1a10ed4fe09de855e81 sha256sums = 68e84775e57da77e19ccb6b0dde6ca0882377bdd48ecc6da0047a70201ec64c8 + sha256sums = SKIP pkgname = electron-cash @@ -7,9 +7,9 @@ pkgname='electron-cash' pkgdesc='Lightweight Bitcoin Cash wallet' -pkgver=4.2.12 +pkgver=4.2.13 secp256k1ver=0.20.9 -pkgrel=2 +pkgrel=1 url='http://www.electroncash.org/' arch=('any') license=('MIT') @@ -60,15 +60,18 @@ optdepends=( provides=("${pkgname}") conflicts=("${pkgname}") source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Electron-Cash/Electron-Cash/archive/${pkgver}.tar.gz" - "secp256k1-${secp256k1ver}.tar.gz::https://github.com/Bitcoin-ABC/secp256k1/archive/v${secp256k1ver}.tar.gz") -sha256sums=('566ad3ef041240f306cffac75f36f32ff3205b46030ce6110de4c4ceda9b386f' - '68e84775e57da77e19ccb6b0dde6ca0882377bdd48ecc6da0047a70201ec64c8') + "secp256k1-${secp256k1ver}.tar.gz::https://github.com/Bitcoin-ABC/secp256k1/archive/v${secp256k1ver}.tar.gz" + "fix-bitpay-tests.patch") +sha256sums=('b284f18d8f287b90b5f9e3f093774a8034b72080bb82f1a10ed4fe09de855e81' + '68e84775e57da77e19ccb6b0dde6ca0882377bdd48ecc6da0047a70201ec64c8' + 'SKIP') prepare() { rmdir "Electron-Cash-${pkgver}/contrib/secp256k1" ln -s "${PWD}/secp256k1-${secp256k1ver}" "Electron-Cash-${pkgver}/contrib/secp256k1" sed -i 's/py\.test/pytest/' "Electron-Cash-${pkgver}/tox.ini" + patch -Np1 -d "Electron-Cash-${pkgver}" < fix-bitpay-tests.patch } build() { @@ -93,7 +96,7 @@ build() { check() { cd "Electron-Cash-${pkgver}" - tox -e py310 --force-dep pycryptodomex~=3.10 + tox -e py310 -- --ignore-glob='*regtest*' } package() { diff --git a/fix-bitpay-tests.patch b/fix-bitpay-tests.patch new file mode 100644 index 000000000000..0278896c3c7c --- /dev/null +++ b/fix-bitpay-tests.patch @@ -0,0 +1,26 @@ +diff --git a/electroncash/tests/test_paymentrequests.py b/electroncash/tests/test_paymentrequests.py +index 8d26fc16b97..bae843a84ae 100644 +--- a/electroncash/tests/test_paymentrequests.py ++++ b/electroncash/tests/test_paymentrequests.py +@@ -199,8 +199,8 @@ def test_bitpay_verify(self, mock_get): + + def mocked_bitpay_requests_get_incorrect_digest(*args, **kwargs): + response = _signed_response() +- # Trash digest by changing last char +- response.headers['digest'] = response.headers['digest'][:-1] + '0' ++ # Trash digest by flipping last bit ++ response.headers['digest'] = response.headers['digest'][:-1] + chr(ord(response.headers['digest'][-1])^0x1) + return response + + # Verify that a payment request verification fails if the digest is incorrect +@@ -214,8 +214,8 @@ def test_bitpay_verify_incorrect_digest(self, mock_get): + + def mocked_bitpay_requests_get_incorrect_signature(*args, **kwargs): + response = _signed_response() +- # Trash signature by changing last char +- response.headers['signature'] = response.headers['signature'][:-1] + '0' ++ # Trash signature by flipping last bit ++ response.headers['signature'] = response.headers['signature'][:-1] + chr(ord(response.headers['signature'][-1])^0x1) + return response + + # Verify that a payment request verification fails if the signature is incorrect |