Allow payment reuse for same app LRN (#961)
Publish / Build and publish (push) Failing after 5s Details
Smoke Test / Run basic test suite (push) Failing after 3s Details
Lint Checks / Run linter (push) Failing after 3s Details
Deploy Test / Run deploy test suite (push) Failing after 3s Details
Webapp Test / Run webapp test suite (push) Failing after 3s Details

Part of [Service provider auctions for web deployments](https://www.notion.so/Service-provider-auctions-for-web-deployments-104a6b22d47280dbad51d28aa3a91d75)

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/961
Reviewed-by: ashwin <ashwin@noreply.git.vdb.to>
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
roysc/deploy-create-pass-cluster v1.1.0-39df468-202410291130
Prathamesh Musale 2024-10-29 11:30:03 +00:00 committed by ashwin
parent 23ca4c4341
commit 39df4683ac
1 changed files with 4 additions and 2 deletions

View File

@ -851,9 +851,11 @@ def confirm_payment(laconic: LaconicRegistryClient, record, payment_address, min
{"deployer": record.attributes.deployer, "payment": tx.hash}, all=True
)
if len(used):
# Fetch the app name from request record
used_request = laconic.get_record(used[0].attributes.request, require=True)
# Check that payment was used for deployment of same application
app_record = laconic.get_record(record.attributes.application, require=True)
if app_record.id != used[0].attributes.application:
if record.attributes.application != used_request.attributes.application:
logger.log(f"{record.id}: payment {tx.hash} already used on a different application deployment {used}")
return False