Skip to content

Commit

Permalink
Reworked the reward amount parsing a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
vsubhuman committed Nov 11, 2021
1 parent 9a5c8b7 commit efcbde7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,13 @@ export async function rawGetTransactions(
?.get(rewardAddr.payment_cred());
// happens if the MIR is to another pot
if (rewardAmount == null) continue;
const rewardAmountStr = rewardAmount.is_positive()
? rewardAmount.as_positive().to_str()
: ('-' + rewardAmount.as_negative().to_str());
implicitOutputSum.add({
identifier: defaultToken.defaultIdentifier,
networkId: defaultToken.defaultNetworkId,
amount: new BigNumber(String(rewardAmount.as_i32())),
amount: new BigNumber(rewardAmountStr),
});
}
}
Expand Down
30 changes: 15 additions & 15 deletions packages/yoroi-extension/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit efcbde7

Please sign in to comment.