Skip to content

Conversation

@ZeroWave022
Copy link
Contributor

  • Fixes wrong usdValue in Amount
  • Removes duplicate amountsTransaction.usdValue and Wallet.usdValue. Use Transaction.amount.usdValue and Wallet.balance.usdValue instead
  • Improved Amount.toString
  • Rewrites parts of RequestHandler

@ZeroWave022 ZeroWave022 added the bug Something isn't working label Apr 30, 2023
@Walledgarden Walledgarden merged commit cb4a62b into tipccjs:main Apr 30, 2023
@ZeroWave022 ZeroWave022 deleted the bug-fixes branch April 30, 2023 16:56
@paulofreitas
Copy link

While this has already been merged, I should make some notes:

  • Both Transaction.usd_value and Wallet.usd_value are part of the API schema - the fact that you also have Amount.usdValue is merely an implementation detail to bring utility to Amount instances as they are one of the most important models on the API
  • Transaction.usd_value is the USD value of the transaction at the time it occurred - it will never be the same as Transaction.amount.usdValue, the current USD value of the same amount. Both values ​​are useful - you need the first to know if the transaction is in profit or loss
  • Wallet.usd_value should be the same as Wallet.amount.usdValue, but as mentioned earlier, it's part of the schema - you usually bring API data as is, you don't mess with them 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants