On certain tokens with high d.p, the value sent is rounded down #68
Labels
No Label
ussd/user-reported
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: grassrootseconomics/sarafu-vise#68
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Point out where this code is with tests.
The function
handlers/application/menuhandler.go
Line 1840 in e914d059e2
func (h *MenuHandlers) ValidateAmount(ctx context.Context, sym string, input []byte) (resource.Result, error) {
ValidateAmount
handles the user's amount input and writing it to storedb.DATA_AMOUNTThe
handlers/application/menuhandler.go
Line 1966 in e914d059e2
func (h *MenuHandlers) InitiateTransaction(ctx context.Context, sym string, input []byte) (resource.Result, error) {
InitiateTransaction
function reads the transaction data and initializes a transactionIn the
store/tokens.go
Line 23 in e914d059e2
func ParseAndScaleAmount(storedAmount, activeDecimal string) (string, error) {
InitiateTransaction
, thestore.ParseAndScaleAmount(data.Amount, data.ActiveDecimal)
scales the amount using the active decimal value of the tokenTests
TestValidateAmount
for theValidateAmount
functionTestInitiateTransaction
for theInitiateTransaction
functionTestParseAndScaleAmount
for theParseAndScaleAmount
function in store/tokens_test.go