Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

reward address validation #341

Merged
merged 5 commits into from
Sep 26, 2022
Merged

reward address validation #341

merged 5 commits into from
Sep 26, 2022

Conversation

ozgunozerk
Copy link
Contributor

Solves #336

Few words explaining this PR, it will be wordy but worth reading.

I couldn't find a good function to import from polkatod which will validate the reward address in sr25519 format.

So, I exported the backend function to validate that (we were already doing the validation on the backend). However, the exposed functions are always async because of tauri invoke.

This new validation function being async, had caused more troubles than I expected, and had to create new extra variables to get around the problems.
@isSerge please review the new code, maybe the same functionality can be achieved with simpler logic, but however I tried, it was causing some minor bugs in places. That is the best I can come up with.

@ozgunozerk ozgunozerk self-assigned this Sep 22, 2022
@ozgunozerk ozgunozerk requested a review from isSerge September 22, 2022 17:16
@ozgunozerk
Copy link
Contributor Author

Wonderful, thanks @isSerge

@ozgunozerk ozgunozerk enabled auto-merge (squash) September 26, 2022 13:51
@ozgunozerk ozgunozerk merged commit 4d3a8e8 into main Sep 26, 2022
@ozgunozerk ozgunozerk deleted the issue2 branch September 26, 2022 14:58
@ozgunozerk ozgunozerk added this to the Audit Fixes milestone Sep 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Trail of Bits audit - Issue #2 (insufficient validation on importing reward address)
3 participants