Skip to content

Commit

Permalink
fix(adapter.cpp): add check on operation & registered xerc20 symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
gitmp01 committed Nov 6, 2024
1 parent 822ae62 commit 8e8df97
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cpp/contracts/adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ void adapter::settle(const name& caller, const operation& operation, const metad
auto idx_registry = _registry.get_index<adapter_registry_idx_token_bytes>();
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);
Expand Down

1 comment on commit 8e8df97

@gitmp01
Copy link
Collaborator Author

@gitmp01 gitmp01 commented on 8e8df97 Nov 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix #58

Please sign in to comment.