Skip to content

Commit

Permalink
Add HasCallStack to help debugging Rosetta errors
Browse files Browse the repository at this point in the history
Rosetta's RestAPI errors have some kind of issue with them right now,
which is helped by adding a `HasCallStack` constraint to this
assertion function.
  • Loading branch information
edmundnoble committed Dec 16, 2024
1 parent dba1fc0 commit c99baf1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/unit/Chainweb/Test/Rosetta/RestAPI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ accountBalanceTests tio envIo =
where
req = AccountBalanceReq nid (AccountId "sender00" Nothing Nothing) Nothing

checkBalance :: HasCallStack => AccountBalanceResp -> Decimal -> IO ()
checkBalance resp bal1 = do
let b0 = head $ _accountBalanceResp_balances resp
b1 = kdaToRosettaAmount bal1
Expand Down

0 comments on commit c99baf1

Please sign in to comment.