Open ic-dstar opened 10 months ago
Hey @ic-dstar, Thanks for reporting the issue.
Feel free to submit a pull request so it can be quickly resolved.
I'll add more extensive tests for the get_transactions()
fn later to prevent future errors.
Hey @ic-dstar, Your PR has been merged into the main branch. Let me know if any other issue comes up.
If It has 3 transactions, call get_transactions fail with Natural subtraction underflow. you can test it if set a length less than start (by search inside transactions).
the bug cause by this line. https://github.com/NatLabs/icrc1/blob/2ede9a69a6d9d15802d44dafb5403e767269e27b/src/ICRC1/lib.mo#L352
function SB.sclice accept argument (buffer, start, end) https://github.com/NatLabs/icrc1/blob/2ede9a69a6d9d15802d44dafb5403e767269e27b/src/ICRC1/Utils.mo#L261
but the code call it , SB.slice(transactions, tx_start_index, req.length).
it should fix to
could you fix this? or may I pull a request.