Skip to content

Commit

Permalink
fix: recv-message auth
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrusVorwald committed Dec 4, 2024
1 parent 60399ed commit 13cfe18
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@

(define-public (recv-message (src-network-id (string-ascii 128)) (conn-sn-in int) (msg (buff 2048)) (implementation <xcall-impl-trait>))
(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))))

0 comments on commit 13cfe18

Please sign in to comment.