Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds /account/balance endpoint #1047

Closed
wants to merge 4 commits into from
Closed

Conversation

LindaOrtega
Copy link
Contributor

@LindaOrtega LindaOrtega commented May 12, 2020

  • blocker: have /local return the block hash and block height of the block where the local command was run in. Currently, it returns the parents of the block and (+1 of the block height).
  • Research possible bug (checkpointer error keeps being thrown when I hit this endpoint in non-genesis case) Can't replicate and it seems to work fine with a local mining node now.

-- Value of the transaction in atomic units represented as an
-- arbitrary-sized signed integer.
amount :: Integer
amount = floor $ k * (realToFrac $ (10 :: Integer) ^ numDecimals)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the correct approach?

@LindaOrtega LindaOrtega marked this pull request as ready for review May 13, 2020 19:10
Copy link
Contributor

@sirlensalot sirlensalot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with suggestion for unit test on atomic unit function

-- | Guarantees that the `ChainId` given actually belongs to this
-- `ChainwebVersion`.
readChainIdText :: ChainwebVersion -> T.Text -> Maybe ChainId
readChainIdText v c = do
cid <- readMaybe @Word (T.unpack c)
mkChainId v cid


kdaToRosettaAmount :: Decimal -> Amount
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest a quick unit test for just this function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I merged this PR into the #1050 and added a unit test for kdaToRosettaAmount there

@LindaOrtega LindaOrtega mentioned this pull request May 21, 2020
23 tasks
@LindaOrtega
Copy link
Contributor Author

Closing this as it was merged into #1050

@LindaOrtega LindaOrtega closed this Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants