Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISSUE-25: add amount and balance v2 to support high-precision floating point #26

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions src/app_ledger/should_be_generated/domain/protos/ledger.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,21 @@ enum AccountType {
Expense = 6;
}

/// Amount/Balance relationship:
/// Balance +/- Amount = Balance
/// Balance - Balance = Amount
/// Amount +/- Amount = Amount
/// Balance + Balance = Undefined
message Amount {
uint64 version = 1; // since v1
uint64 value = 2 [deprecated = true]; // since v1, deprecated in v2
string value_v2 = 3; // since v2
}

message Balance {
uint64 version = 1; // since v1
uint64 value = 2; // since v1
uint64 value = 2 [deprecated = true]; // since v1, deprecated in v2
string value_v2 = 3; // since v2
}

message Account {
Expand All @@ -41,16 +53,6 @@ message AccountMetadata {
uint64 high_inclusive = 4; // since v1
}

/// Amount/Balance relationship:
/// Balance +/- Amount = Balance
/// Balance - Balance = Amount
/// Amount +/- Amount = Amount
/// Balance + Balance = Undefined
message Amount {
uint64 version = 1; // since v1
uint64 value = 2; // since v1
}

enum TransactionType {
UnknownTransactionType = 0;
Debit = 1;
Expand Down