Use deployer LRN from request record
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 35s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m30s
Webapp Test / Run webapp test suite (pull_request) Successful in 5m18s
Smoke Test / Run basic test suite (pull_request) Successful in 4m1s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 12m12s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Successful in 5m54s

This commit is contained in:
Prathamesh Musale 2024-10-29 11:20:01 +05:30
parent 1c3dfceb30
commit d661f478f7
2 changed files with 3 additions and 4 deletions

View File

@ -616,7 +616,6 @@ def command( # noqa: C901
if confirm_payment(
laconic,
r,
lrn,
payment_address,
min_required_payment,
main_logger,

View File

@ -798,7 +798,7 @@ def skip_by_tag(r, include_tags, exclude_tags):
return False
def confirm_payment(laconic: LaconicRegistryClient, record, deployer_lrn, payment_address, min_amount, logger):
def confirm_payment(laconic: LaconicRegistryClient, record, payment_address, min_amount, logger):
req_owner = laconic.get_owner(record)
if req_owner == payment_address:
# No need to confirm payment if the sender and recipient are the same account.
@ -848,7 +848,7 @@ def confirm_payment(laconic: LaconicRegistryClient, record, deployer_lrn, paymen
# Check if the payment was already used on a deployment
used = laconic.app_deployments(
{"deployer": deployer_lrn, "payment": tx.hash}, all=True
{"deployer": record.attributes.deployer, "payment": tx.hash}, all=True
)
if len(used):
# Check that payment was used for deployment of same application
@ -858,7 +858,7 @@ def confirm_payment(laconic: LaconicRegistryClient, record, deployer_lrn, paymen
return False
used = laconic.app_deployment_removals(
{"deployer": deployer_lrn, "payment": tx.hash}, all=True
{"deployer": record.attributes.deployer, "payment": tx.hash}, all=True
)
if len(used):
logger.log(