Closed shkangr closed 11 months ago
Merging #270 (dfee64b) into main (3b52b29) will increase coverage by
1.83%
. Report is 2 commits behind head on main. The diff coverage is100.00%
.:exclamation: Current head dfee64b differs from pull request most recent head c48ee9a. Consider uploading reports for the commit c48ee9a to get more accurate results
@shkangr haven't looked thoroughly but are we testing below cases?
-1, 0, 1, 0.0000000001, -0.000000000001, " ", " -1", " 0", -Integer.MAX, Integer.MAX, 99, 100, 101, 999, 1000, 10001, 9999, 10000, 10001, 99999, 100000, 1000001
do we also force the minimum amount? i.e., reject the request with less than 100 NCG.
@Junyong-Suh
case1. -1 NCG : transaction failed ( don't transfer NCG )
case2. 0 NCG : transaction failed ( don't transfer NCG )
case3. 0.0000000001 NCG : transaction failed, Invalid Format error at GQL ( don't transfer NCG )
case4. -0.0000000001 NCG : transaction failed, Invalid Format error at GQL ( don't transfer NCG )
case5. " " NCG : transaction failed, Invalid Format error at GQL ( don't transfer NCG )
I expect it'll works like below cases.
case1. 99 NCG : Refund NCG. Since amount is less than NCG_MINIMUM ( don't transfer NCG to WNCG )
case2. 100, 101, 999 NCG : Base Fee Range
case3. 1000, 9999, 10000 NCG : 1% Fee Range
case4. 10001, 99999, 100000 NCG : 2% Fee Range
case5. 100001 NCG : Transfer 100000 AND Refund ( dont transfer NCG -> NCG ) for left 1 NCG
@shkangr @lounlee shouldn't reject the whole transfer instead of sending the partial?
case5. 100001 NCG : Transfer 100000 AND Refund ( dont transfer NCG -> NCG ) for left 1 NCG
@Junyong-Suh Currently, doesn't reject the whole transfer. If a user try to transfer Amount over NCG_MAXIMUM, bridge transfer amount of NCG_MAXIMUM NCG, and refund ( back to user ) for the left amount NCG.
We have 24 hours rules, so user have to re-transfer after the transaction before.
If we have to appliy new policy ( reject the whole transfer instead of sending the partial ), additional works are needed.
@shkangr i see. if the current process is to send as much as possible and refund the rest, that should be good. any thoughts @lounlee ?
This PR has 320
quantified lines of changes. In general, a change size of upto 200
lines is ideal for the best PR experience!
Was this comment helpful? :thumbsup: :ok_hand: :thumbsdown: (Email) Customize PullRequestQuantifier for this repository.
Update Fee Policy
Set Fee per Amount Range.
Applied Two Amount Range. ( Keep Base Fee Policy )
Local Test Cases