From 13cfe188534f495639434b8a8bc02591aa91202a Mon Sep 17 00:00:00 2001 From: CyrusVorwald <90732384+CyrusVorwald@users.noreply.github.com> Date: Wed, 4 Dec 2024 18:38:57 -0500 Subject: [PATCH] fix: recv-message auth --- .../stacks/contracts/connections/centralized-connection.clar | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/stacks/contracts/connections/centralized-connection.clar b/contracts/stacks/contracts/connections/centralized-connection.clar index 87fc68ad..828c21d0 100644 --- a/contracts/stacks/contracts/connections/centralized-connection.clar +++ b/contracts/stacks/contracts/connections/centralized-connection.clar @@ -96,7 +96,7 @@ (define-public (recv-message (src-network-id (string-ascii 128)) (conn-sn-in int) (msg (buff 2048)) (implementation )) (begin - (asserts! (is-eq tx-sender (var-get admin)) ERR_UNAUTHORIZED) + (asserts! (is-authorized) ERR_UNAUTHORIZED) (asserts! (is-none (map-get? receipts {network-id: src-network-id, conn-sn: conn-sn-in})) ERR_DUPLICATE_MESSAGE) (map-set receipts {network-id: src-network-id, conn-sn: conn-sn-in} true) (as-contract (contract-call? .xcall-proxy handle-message src-network-id msg implementation)))) \ No newline at end of file