Frankencoin-ZCHF / frankencoin-dapp

Frankencoin Web App to interact with the Eco System
https://frankencoin.com/
MIT License
0 stars 4 forks source link

Challenge Bid - No check for balance #67

Open samclassix opened 3 weeks ago

samclassix commented 3 weeks ago

How to recreate

Screenshot 2024-06-10 at 1 25 45 PM Screenshot 2024-06-10 at 1 29 58 PM
samclassix commented 3 weeks ago

I. cancel challenge, works II. transferFrom, needs balance calc and check on app, otherwise SC will throw an error

Most likely Smart Contract Error Signature?: 0xe450d38c

if (msg.sender == _challenge.challenger) {
            // allow challenger to cancel challenge without paying themselves
} else {
            zchf.transferFrom(msg.sender, _challenge.challenger, (size * liqPrice) / (10 ** 18));
}