From 8e8df97f70352fa2a6a5601859be85c8f46e628f Mon Sep 17 00:00:00 2001 From: Mauro Piazza Date: Wed, 6 Nov 2024 19:51:29 +0100 Subject: [PATCH] fix(adapter.cpp): add check on operation & registered xerc20 symbols --- cpp/contracts/adapter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/contracts/adapter.cpp b/cpp/contracts/adapter.cpp index 201c8dc8..2d0b0a2c 100644 --- a/cpp/contracts/adapter.cpp +++ b/cpp/contracts/adapter.cpp @@ -199,6 +199,7 @@ void adapter::settle(const name& caller, const operation& operation, const metad auto idx_registry = _registry.get_index(); auto search_token_bytes = idx_registry.find(operation.token); check(search_token_bytes != idx_registry.end(), "underlying token does not match with adapter registry"); + check(search_token_bytes->xerc20_symbol == operation.amount.symbol, "registered xerc20 symbols differs from the operation one"); checksum256 event_id; // output pam::check_authorization(get_self(), operation, metadata, event_id);