Admins cannot partially withdraw tokens from WinnablesTicketManager
Summary
Incorrect check will prevent Admin from withdrawing less than his balance of tokens.
Root Cause
In withdrawTokens() we revert if the current balance is bigger than the amount to be withdrawn, which is incorrect, because we might want to withdraw less than the current balance.
Internal pre-conditions
There must be some tokens in the contract
External pre-conditions
No response
Attack Path
No response
Impact
The impact is that the admin will not be able to withdraw the amount specified unless he selects the whole balance.
Raspy Spruce Parrot
Low/Info
Admins cannot partially withdraw tokens from
WinnablesTicketManager
Summary
Incorrect check will prevent Admin from withdrawing less than his balance of tokens.
Root Cause
In withdrawTokens() we revert if the current balance is bigger than the amount to be withdrawn, which is incorrect, because we might want to withdraw less than the current balance.
Internal pre-conditions
External pre-conditions
No response
Attack Path
No response
Impact
The impact is that the admin will not be able to withdraw the amount specified unless he selects the whole balance.
PoC
No response
Mitigation