Allow payment reuse for same app LRN
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 36s
Webapp Test / Run webapp test suite (pull_request) Successful in 5m0s
Smoke Test / Run basic test suite (pull_request) Successful in 4m42s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m38s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Successful in 7m9s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 7m56s
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 36s
Webapp Test / Run webapp test suite (pull_request) Successful in 5m0s
Smoke Test / Run basic test suite (pull_request) Successful in 4m42s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m38s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Successful in 7m9s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 7m56s
This commit is contained in:
parent
23ca4c4341
commit
9aaf14203a
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user