Skip to content

Fee not excluded in positive primary XRP change #6

@zgrguric

Description

@zgrguric

Correct calculation in test Tx6 Test

(fee 12 drops)
In this case self.eventList.primary is -3 XRP
Balance change self.balanceChanges is [ -3.000012 XRP ] = -3 - 0.000012

Incorrect calculation and wrong test Tx10 Test

(fee 200 drops)
In this case Fee should be excluded from primary value since this is logic when negative XRP is returned as in Tx6 Test.
Sample case would be when user issues Payment to self or even Approves NFT offer, pays fee and result yields positive XRP due to trade.

In this case self.eventList.primary is 20.172088 XRP, but should be 20.172288 XRP with fee excluded.
Balance change self.balanceChanges [ 20.172088 XRP ] != 20.172088 - (-0.000200)

Other affected test is Tx9 Test

See samples: here and here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions