-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Hot-fix] TSS amount precision (#176)
### What Fix TSS's database amount precision to be compliant with the Stellar network amount precision. ### Why The database amount was configured to NUMERIC(10,7), which allows the maximum value of 999.9999999. This is not compliant with the Stellar network amounts though, which according with the [docs](https://developers.stellar.org/docs/fundamentals-and-concepts/stellar-data-structures/assets#amount-precision) supports numbers from 0.0000001 to 922,337,203,685.4775807.
- Loading branch information
1 parent
e12d7db
commit b2b7a88
Showing
6 changed files
with
19 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
internal/db/migrations/2024-02-05.0-tss-transactions-table-amount-constraing.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-- +migrate Up | ||
|
||
ALTER TABLE public.submitter_transactions | ||
ALTER COLUMN amount TYPE NUMERIC(19,7); | ||
|
||
-- +migrate Down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters