eos42 / Chintai-issues

A github to collect issues for the Chintai dApp
https://jungle.chintai.io
3 stars 4 forks source link

Uncaught (in promise) TypeError #57

Closed monsterd0n closed 6 years ago

monsterd0n commented 6 years ago

Hi, When using Chintai and using the following values in "Lend":

interest rate: 0000000000000010000000000 Amount: 01010011101010101010

and submitting, Chintai never processes but instead gives the following error message:

main.894012ad.js:1 Uncaught (in promise) TypeError: Cannot read property 'message' of undefined at e.handleTxErrors (main.894012ad.js:1) at e. (main.894012ad.js:1) at n (main.894012ad.js:1) at Generator._invoke (main.894012ad.js:1) at Generator.e.(anonymous function) [as throw] (https://eos.chintai.io/static/js/main.894012ad.js:$ at n (main.894012ad.js:1) at main.894012ad.js:1

This is due to a multiplication overflow assertion on EOSIO:

{"code":500,"message":"Internal Service Error","error":{"code":3050003,"name":"eosio_assert_message_exception","what":"eosio_assert_message assertion failure","details":[{"message":"assertion failure with message: multiplication overflow","file":"wasm_interface.cpp","line_number":930,"method":"eosio_assert"},{"message":"pending console output: ","file":"apply_context.cpp","line_number":61,"method":"exec_one"}]}}

However, when you use the same values for "borrow", Chintai properly shows an "Alert: Assertion Error" (image attached).

screenshot 2018-10-12 at 14 27 04

Is there a bug bounty for this?

screenshot 2018-10-12 at 14 15 40
PhillipHamnett commented 6 years ago

We are aware of such issues and restrict the values of interest to 2 decimal places to prevent it from happening.

monsterd0n commented 6 years ago

Oh ok, but im confused what you mean "to prevent it from happening" because it is happening.

PhillipHamnett commented 6 years ago

You shouldn't be able to enter more than 2 decimal places for the interest. If you can then I'd have to see what Andrew says. He is away this weekend but will look on Monday

On Fri, 12 Oct 2018, 15:06 monsterd0n, notifications@github.com wrote:

Oh ok, but im confused what you mean "to prevent it from happening" because it is happening.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/eos42/Chintai-issues/issues/57#issuecomment-429318791, or mute the thread https://github.com/notifications/unsubscribe-auth/AE9OQfpmgTTAy0By6j0CvbadrBq8j_0Mks5ukJO4gaJpZM4XZXMK .

monsterd0n commented 6 years ago

Oh ok, yeah I definitely can do that hence the multiplication overflow in the "lend" tab. But on the "borrow" tab you guys have handled it properly. Waiting to see what Andrew will say on Monday. Thanks for the great application btw! :-)

acoutts commented 6 years ago

This is handled now.