Commit 2a8c960
Soumya Mohapatra
Add time-range filtering, ORDER BY, OutstandingBalance, and unit tests
- Issue #3: Thread From/To *time.Time params through all 6 layers for
IssuedBalance, ListRedeemedTokens, and RedeemedBalance. SQL uses
cond.Gte/cond.Lte on stored_at column.
- Issue #4: Thread SortBy/SortDirection to ListRedeemedTokens SQL.
SortByQuantity maps to ORDER BY amount ASC/DESC.
- Issue #5: Add unit tests for IssuedBalance, RedeemedTokens,
RedeemedBalance, and OutstandingBalance (happy path, error
propagation, edge cases).
- Issue #6: Add OutstandingBalance method to IssuerWallet
(IssuedBalance minus RedeemedBalance) with overflow guard.1 parent fbe4a85 commit 2a8c960
14 files changed
Lines changed: 467 additions & 147 deletions
File tree
- token
- driver
- mock
- services
- identity/role
- mock
- storage/db
- driver
- sql/common
- tokens/mock
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | | - | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
94 | | - | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
98 | | - | |
| 100 | + | |
| 101 | + | |
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
101 | 106 | | |
102 | 107 | | |
103 | 108 | | |
| |||
184 | 189 | | |
185 | 190 | | |
186 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
187 | 195 | | |
188 | 196 | | |
189 | 197 | | |
| |||
0 commit comments